RSSy MYGO.pl Opublikowano Listopad 13, 2022 o 19:32 RSSy Udostępnij Opublikowano Listopad 13, 2022 o 19:32 Hi. Can anyone help me with modifying this plugin? I am using it for a respawn server, and this plugin only gives you slot1 in hand and I would like it to give you slot1 or 2 depending on what slot you had before you died. Can someone help ? Here is the plugin. Code: #include <amxmodx> #include <hamsandwich> #include <fun> #pragma semicolon 1 #define MAX_PLAYERS 32 enum WeaponsData { WEAPONS[32], NUM } new g_eWeapons[ MAX_PLAYERS + 1 ][WeaponsData]; public plugin_init( ) { register_plugin( "Save Weapons On Death", "1.0a", "maqi" ); RegisterHam( Ham_Killed, "player", "Event_HamKilledPre", 0 ); RegisterHam( Ham_Spawn, "player", "Event_PlayerSpawnPost", 1 ); } public client_connect( iIndex ) g_eWeapons[iIndex][NUM] = 0; public Event_HamKilledPre( iIndex ) { new iWeapons[32]; get_user_weapons( iIndex, iWeapons, g_eWeapons[iIndex][NUM] ); g_eWeapons[iIndex][WEAPONS] = iWeapons; return HAM_IGNORED; } public Event_PlayerSpawnPost( iIndex ) { new sWeapon[32]; for( new i = 0; i < g_eWeapons[iIndex][NUM]; i++ ) { get_weaponname( g_eWeapons[iIndex][WEAPONS][i], sWeapon, charsmax(sWeapon) ); give_item( iIndex, sWeapon ); } g_eWeapons[iIndex][NUM] = 0; return HAM_IGNORED; } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi