In need
#1

Anyone got that GetClosestPlayer Function? I'ma need it
Reply
#2

This?

GetClosestPlayer(1);

https://sampwiki.blast.hk/wiki/Useful_Fu...tClosestPlayer
Reply
#3

lol he ment the stock/public

dw already gave him. no need to continue this
Reply
#4

Ahh silly me. >.<
Reply
#5

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

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;
}
Reply
#7

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)