playerid
#1

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?
Reply
#2

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
Reply
#3

Thank You!! So it will give the playerid for the callback??
Reply
#4

It will send the playerid info to the public callback, yes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)