playerid - 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)
+--- Thread: playerid (
/showthread.php?tid=408361)
playerid -
Scofield62 - 17.01.2013
Hi guys. I need some help.
I got a callback and a timer.
Where i use the timer i can give the timer the id of the player. I want to give the id of the player for the test, how can i do that? Give THE playerid for the test
Код:
forward test();
public test()
{
SendClientMessage(playerid,0xFFFFFFAA,);
}
I use it with "for(new playerid;playerid<MAX_PLAYERS;playerid++)" in the callback but is there any chance to give somehow the playerid from somewhere?
Respuesta: playerid -
Fabio11 - 17.01.2013
Use SetTimerEx
pawn Код:
forward test(playerid);
public test(playerid)
{
SendClientMessage(playerid,0xFFFFFFAA,);
}
// Where you put your timer:
SetTimerEx("test", 1000, false, "i", playerid);
Check this
https://sampwiki.blast.hk/wiki/SetTimerEx
Re: playerid -
Scofield62 - 17.01.2013
Thank You!!
So it will give the playerid for the callback??
Respuesta: playerid -
Fabio11 - 17.01.2013
It will send the playerid info to the public callback, yes.