Quote:
Originally Posted by Wesley221
Max wasnt wrong with his code. That would actually work.
pawn Код:
CMD:kill(playerid, params[]) return if(GetPlayerWantedLevel(playerid, >= 1)) ? SendClientMessage(playerid, -1, "Can't use kill when wanted") : SetPlayerHealth(playerid, 0);
This will check if your wanted level is 1 or higher, if thats true, it will send the message. When it is 0, it will just kill you.
pawn Код:
if( (GetPlayerWantedLevel(playerid) >= 1 ) ?[THEN] SendClientMessage(playerid, ....) :[ELSE] SetPlayerHealth(playerid...);
|
Max was wrong with his code. I don't know if you did not notice but there's a difference in doing
pawn Код:
if(GetPlayerWantedLevel(playerid, >= 1))
and
pawn Код:
if(GetPlayerWantedLevel(playerid) >= 1)
[url=https://sampwiki.blast.hk/wiki/GetPlayerWantedLevel]GetPlayerWantedLevel[url] returns the players wanted level, does not store it in an extra parameter.