/arrest
#4

Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
Instead of the sscanf above use something like this (not tested either, made up just now so it might be wrong):

pawn Код:
if(sscanf(params, "u", pid))
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
   
    for(new i = 0; i <= MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, 3.0, x, y, z))
        {
            SetPlayerPos(i, 0.0, 0.0, 0.0);
            break;
        }
    }
   
}
else
{
    //Code for SetPlayerPos(pid...)

}
Explaination: if(sscanf… checks if the player did not type in "u" (an ID, part of name), if he DID NOT it will do what is said in the brackets, otherwise it will go to "else".
Yup you are right
Reply


Messages In This Thread
/arrest - by AnonScripter - 13.01.2014, 13:01
Re: /arrest - by MatriXgaMer - 13.01.2014, 13:17
Re: /arrest - by Hansrutger - 13.01.2014, 13:27
Re: /arrest - by MatriXgaMer - 13.01.2014, 13:28
Re: /arrest - by Hansrutger - 13.01.2014, 13:38
Re: /arrest - by AnonScripter - 13.01.2014, 15:26
Re: /arrest - by Lyksus - 13.01.2014, 15:38

Forum Jump:


Users browsing this thread: 1 Guest(s)