SA-MP Forums Archive
Which callback? - 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: Which callback? (/showthread.php?tid=620047)



Which callback? - Gotham - 25.10.2016

Hi guys,
I want to know which callback should we put things like if(getplayerping(playerid) == 1000) , those are when he is "Playing" not spawning , connecting etc. , Where should I put this?


Re: Which callback? - Kaliber - 25.10.2016

In a Timer


Re: Which callback? - Gotham - 06.11.2016

Sorry for bumping but , How to make a timer for that?


Re: Which callback? - StR_MaRy - 06.11.2016

like this
Код HTML:
if(getplayerping(playerid) == 1000) return SetTimerEx("GetPlayerPingTimer", 1000, 0, "i", playerid);
and then you do

Код HTML:
function GetPlayerPingTimer(playerid)
{
     Kick(playerid)
}



Re: Which callback? - justice96 - 06.11.2016

Better use y_timers:

Код:
timer PlayerPing[1000]
{
      // do whatever you want
}