Quote:
Originally Posted by cessil
that's because it does it in order of the code
pawn Код:
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE: /cuff [Part of Name/Player ID]"); //gets targetid if(IsPlayerPolice[targetid] >= 1) return SendClientMessage(playerid, -2, "{ff0000}You cant arrest another police officer!"); //since you're a police this is triggered if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"{ff0000}[ERROR]: This player is not connected!"); if(playerid == targetid) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't cuff yourself");
so either move the playerid == targetid up or add an exception in the first (&& playerid != targetid)
|
hmm.. then follow cessil codes in my codes. Just change the order.