SA-MP Forums Archive
In need - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: In need (/showthread.php?tid=166535)



In need - willsuckformoney - 09.08.2010

Anyone got that GetClosestPlayer Function? I'ma need it


Re: In need - Kayla.S - 09.08.2010

This?

GetClosestPlayer(1);

https://sampwiki.blast.hk/wiki/Useful_Fu...tClosestPlayer


Re: In need - Kar - 09.08.2010

lol he ment the stock/public

dw already gave him. no need to continue this


Re: In need - Kayla.S - 09.08.2010

Ahh silly me. >.<


Re: In need - willsuckformoney - 09.08.2010

lol well, anyone wanna tell me how to use this right? xD


Re: In need - (.Aztec); - 09.08.2010

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
lol well, anyone wanna tell me how to use this right? xD
Sure.

Parameters:
(playerid)

If ID 1 is next to ID 0, and you are ID 0, using this function would return 1.
"GetClosestPlayer(playerid);"
Returns: ID 1.

pawn Код:
COMMAND:taze(playerid, params[])
{
    if(File[playerid][Faction] == 1)
    {
        GameTextForPlayer(GetClosestPlayer(playerid), "~r~Tazed!", 1000, 1);
        TogglePlayerControllable(GetClosestPlayer(playerid), 0);
    }
    return 1;
}



Re: In need - willsuckformoney - 09.08.2010

^^ That helped with the last errors i had with my command xD Thanks, off to sleep!


Re: In need - (.Aztec); - 09.08.2010

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
^^ That helped with the last errors i had with my command xD Thanks, off to sleep!
No problemo.