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

pawn Код:
CMD:locate(playerid, params[])
{
    if (isnull(params))
    {
        new
            string[64];
        format(string, sizeof (string),"Your location is %s", GetPlayerZone(playerid));
        SendClientMessage(playerid, COLOR_WHITE, string);
    }
    else
    {
        new
            targetid;
        if (!sscanf(params, "u", targetid))
        {
            if (targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Invalid player");
            new
                string[64];
            format(string, sizeof (string), "Target's 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: 3 Guest(s)