if(sscanf(params, "u", targetid))
#1

How to make /locate command also works without typing the playerid that i want to locate.
example:
/locate 4 --> Player 4 location is %s
/locate (without ID) --> your location is %s

so how to make it work for me also ?

pawn Код:
CMD:locate(playerid,params[])
{
    new string[128], targetid;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "/locate [playerid]");
    format(string,sizeof(string),"his location is %s", GetPlayerZone(targetid));
    SendClientMessage(playerid,COLOR_WHITE,string);
    return 1;
}
Reply


Messages In This Thread
if(sscanf(params, "u", targetid)) - by AnonScripter - 21.12.2013, 19:56
Re: if(sscanf(params, "u", targetid)) - by kristo - 21.12.2013, 20:00
Re: if(sscanf(params, "u", targetid)) - by Jstylezzz - 21.12.2013, 20:01
Re: if(sscanf(params, "u", targetid)) - by AnonScripter - 21.12.2013, 20:07
Re: if(sscanf(params, "u", targetid)) - by Pottus - 21.12.2013, 20:59
Re: if(sscanf(params, "u", targetid)) - by Brandon_More - 21.12.2013, 21:50
Re: if(sscanf(params, "u", targetid)) - by Konstantinos - 21.12.2013, 22:17

Forum Jump:


Users browsing this thread: 4 Guest(s)