24.03.2017, 00:22
Hello,
Im a little stuck on an on duty pickup.
The problem is that the pickup spams every 2 seconds.
If your organization is id 4 it will spam going on and off duty.
If you are not, It spams the message that you are not allowed to do it.
Is there any way i can fix this?
Code:
Im a little stuck on an on duty pickup.
The problem is that the pickup spams every 2 seconds.
If your organization is id 4 it will spam going on and off duty.
If you are not, It spams the message that you are not allowed to do it.
Is there any way i can fix this?
Code:
Код:
if(pickupid==ArmyDuty) { if(PlayerOrg[playerid]==4) { if(PlayerInfo[playerid][USMCDuty] == 0) { Suited[playerid]=1; PlayerInfo[playerid][USMCDuty] = 1; PlayerInfo[playerid][LawDuty] = 1; GivePlayerWeaponEx(playerid, 27, 300); GivePlayerWeaponEx(playerid, 31, 300); GivePlayerWeaponEx(playerid, 24, 300); GivePlayerWeaponEx(playerid, 41, 500); SetPlayerArmourEx(playerid, 100); SetPlayerColor(playerid, 0x0000FFAA); SetPlayerSkin(playerid, 287); SendClientMessage(playerid, GREEN, "You are now on USMC duty, /usmchelp for help"); } else { Suited[playerid]=0; PlayerInfo[playerid][USMCDuty] = 0; PlayerInfo[playerid][LawDuty] = 0; PlayerInfo[playerid][FreeSkin] = 1; SetPlayerArmourEx(playerid, 0); ResetPlayerWeapons(playerid); SetPlayerSkin(playerid, 3); SetPlayerColor(playerid, COLOR_WHITE); SendClientMessage(playerid, GREEN, "You are not on USMC duty anymore. You can change ur skin for free once by using /freeskin"); } }else return SendClientMessage(playerid, RED, "You are not allowed to do this."); }