Timers - 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: Timers (
/showthread.php?tid=387462)
Timers -
CrazyChoco - 24.10.2012
Hay, i want to do like when player spawn, it will show him in clientmessage how many miliseconds it did take him :3, I am not sure, but is this also releated to timers?
Re: Timers -
RedFusion - 24.10.2012
GetTickCount is better for this in my opinion.. Check out these links below
GetTickCount
Tutorial
Re: Timers -
gtakillerIV - 24.10.2012
Make a new global variable:
Under OnPlayerRequestClass:
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
spawncount = GetTickCount();
return 1;
}
Under OnPlayerSpawn:
PHP код:
new spawntimestring[87];
format(spawntimestring, 87, "It took you %d to select your class and spawn", GetTickCount() - spawncount);
SendClientMessage(playerid, -1, spawntimestring);