03.03.2014, 17:47
(
Последний раз редактировалось SPA; 03.03.2014 в 18:33.
)
Hello, iv a problem sometimes in server the weapons slots cant be access i mean when you have a gun you keep getting disarmed for no reason what the cause?
Here is code:
Here is code:
Код:
forward ResetMinigunEvent(); public ResetMinigunEvent() { for(new i = 0; i < MAX_PLAYERS; i++) { if(DMZone[i] < 1 && GodMode[i] == 0) { if(!IsPlayerConnected(i)) continue; RemovePlayerWeapon(i, 38); } } MinigunEvent = false; GameTextForAll("~N~~N~~N~~N~~r~~h~MINIGUN-EVENT ~R~ENDED",5000,5); return 1; } stock RemovePlayerWeapon(playerid, weaponid) { new plyWeapons[12]; new plyAmmo[12]; for(new slot = 0; slot != 12; slot++) { new wep, ammo; GetPlayerWeaponData(playerid, slot, wep, ammo); if(wep != weaponid) GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]); } ResetPlayerWeapons(playerid); for(new slot = 0; slot != 12; slot++) GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]); return 1; }