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

pawn Код:
CMD:locate(playerid,params[])
{
    new string[128], targetid;
    if(sscanf(params, "u", targetid))
    {
        format(string,sizeof(string),"You location is %s", GetPlayerZone(playerid));
        SendClientMessage(playerid,COLOR_WHITE,string);
        return 1;
    }
    format(string,sizeof(string),"Targets location is %s", GetPlayerZone(targetid));
    SendClientMessage(playerid,COLOR_WHITE,string);
    return 1;
}
Simple as this. Instead of sending a message with the usage, you just show your own location.
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)