COMMAND PROBLEM: Help
#2

You're comparing the value of the id variable before sscanf has actually split it from the string and stored it. You should be comparing it after sscanf has done its job, because the variable is defaulting to 0 and your ID is probably 0, so it will never get any further than that. Just re-order them:

pawn Код:
if(sscanf(params, "u", id)) return SCM(playerid, C_RED, "USAGE: /arrest <nick/id>");
if( id == playerid ) return SCM( playerid, COLOR_RED, "Cant chase yourself! ");
Hope that makes sense!
Reply


Messages In This Thread
COMMAND PROBLEM: Help - by BigAl - 25.09.2011, 20:03
Re: COMMAND PROBLEM: Help - by JaTochNietDan - 25.09.2011, 20:09
Re: COMMAND PROBLEM: Help - by BigAl - 25.09.2011, 20:10

Forum Jump:


Users browsing this thread: 2 Guest(s)