31.05.2016, 17:14
Hello. I am looking for a function like OnPlayerSwitcWeapon but doesn't use RAM. It exists ?
(Je parle aussi franзais)
(Je parle aussi franзais)
new lastWeapon[MAX_PLAYERS]; public OnPlayerConnect(playerid) { lastWeapon[playerid] = 0; return 1; } public OnPlayerUpdate(playerid) { new w = GetPlayerWeapon(playerid); if(w != lastWeapon[playerid]) { OnPlayerChangeWeapon(playerid, w, lastWeapon[playerid]); } lastWeapon[playerid] = w; return 1; } OnPlayerChangeWeapon(playerid, newgun, oldgun) { return 1; } |