14.10.2016, 12:16
How come i cant use a variable in a different command as a check?
If(stunned[targetid] = 0 <-- If the player is not tazed, im setting this variable to 1 if the player is tazed and removing it when the timer has elapsed.
However its not working it gave me a warning on compiling, and ingame its not sending the client message
Says "possibly unintended assignment" on that line.
Anyone that knows a good solution for this?
Код:
CMD:cuff(playerid, params[]) { new targetid; if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,"{ff387a}[Admin]:{ffffff} /cuff [ID | Name]"); if(gTeam[playerid] != TEAM_COP || gTeam[playerid] == TEAM_FBI || gTeam[playerid] == TEAM_CIA || gTeam[playerid] == TEAM_ARMY) return SendClientMessage(playerid, COLOR_WHITE, "{ff0000}[Error]: {ffffff}This command is restricted to the LEO class."); if(stunned[targetid] = 0) return SendClientMessage(playerid, COLOR_WHITE, "You have to taze the player before you can cuff him!");
However its not working it gave me a warning on compiling, and ingame its not sending the client message
Says "possibly unintended assignment" on that line.
Anyone that knows a good solution for this?