29.01.2015, 09:22
Why does this script give tasers to everyone , i'm trying that faction id 1 member could use it .
Код:
cmd(tazer, playerid, params[]) { new string[28+MAX_PLAYER_NAME]; if(Tazer[playerid] == 0) { if(PlayerInfo[playerid][pFaction] == 1) { SendClientMessage(playerid, -1, "You cannot use this command."); } GivePlayerWeapon(playerid, 23, 9999); format(string, sizeof(string),"%s has unholstered his tazer.", RemoveUnderScore(playerid)); ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE); Tazer[playerid] = 1; } else { SetPlayerAmmo(playerid, 23, 0); format(string, sizeof(string),"%s has holstered his tazer.", RemoveUnderScore(playerid)); Tazer[playerid] = 0; ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE); } return 1; }