SA-MP Forums Archive
get timer - 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: get timer (/showthread.php?tid=551036)



get timer - BoU3A - 16.12.2014

hello i've made a command to mute players with Settimer in minuts,
i want if the player was muted he get message you will be unmuted after blala minutes how to get the timer to format it and send message to player?


Re: get timer - XStormiest - 16.12.2014

Using the function SetTimerEx wich allow you to use an "playerid" parameter.

Example:
SetTimerEx("yourtimername", time*1000*60, repeat, "i", playerid);

"yourtimerhere" = your timer name, choose whatever you want.
time * 1000 * 60 = where time = the amount of time the admin choose to mute him for (in minutes).
repeat = true or false
"i" = integrer, since playerid is an number.
playerid = we tell the computer that the i=integrer from above, we want it to recognize this i as the id of the player that has been mued.

Hope you understand, im not gonna give you the code cause is big and it will pretty much confuse you even more.