/arrest /cuff problem
#8

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)
Reply


Messages In This Thread
/arrest /cuff problem - by YanLanger - 11.10.2014, 16:57
Re: /arrest /cuff problem - by DowntownGangster - 11.10.2014, 18:10
Re: /arrest /cuff problem - by YanLanger - 11.10.2014, 18:16
Re: /arrest /cuff problem - by IceBilizard - 11.10.2014, 19:16
Re: /arrest /cuff problem - by YanLanger - 11.10.2014, 19:24
Re: /arrest /cuff problem - by IceBilizard - 11.10.2014, 19:27
Re: /arrest /cuff problem - by YanLanger - 11.10.2014, 19:28
Re: /arrest /cuff problem - by cessil - 12.10.2014, 01:32
Re: /arrest /cuff problem - by Shaktimaan - 12.10.2014, 01:37
Re: /arrest /cuff problem - by Shaktimaan - 12.10.2014, 06:14

Forum Jump:


Users browsing this thread: 3 Guest(s)