18.03.2017, 23:13
(
Last edited by Toroi; 18/03/2017 at 11:45 PM.
)
A timer is a timer. The timer is your 'certain period'.
Create a global variable somewhere on the top of your gamemode, under your includes.
https://sampwiki.blast.hk/wiki/Scripting_Basics#Declaration
Create a function to handle your timer, in this case you can make a short function to set the value of your new variable to zero.
https://sampwiki.blast.hk/wiki/Scripting_Basics#Functions
Now, everytime a player issues your command, check with conditional statements if the value of your variable is 1, if it is, return an error message of your likes. If the value of the variable is zero, change it to 1 and run your function with the use of SetTimer and set whatever time you want.
https://sampwiki.blast.hk/wiki/SetTimer
Also, omg rep! I couldn't be more pleased to help you. In fact i wouldnt if you wouldnt give reputation, its the most important thing in this world. A simple 'thanks' is better than that tho.
Create a global variable somewhere on the top of your gamemode, under your includes.
https://sampwiki.blast.hk/wiki/Scripting_Basics#Declaration
Create a function to handle your timer, in this case you can make a short function to set the value of your new variable to zero.
https://sampwiki.blast.hk/wiki/Scripting_Basics#Functions
Now, everytime a player issues your command, check with conditional statements if the value of your variable is 1, if it is, return an error message of your likes. If the value of the variable is zero, change it to 1 and run your function with the use of SetTimer and set whatever time you want.
https://sampwiki.blast.hk/wiki/SetTimer
Also, omg rep! I couldn't be more pleased to help you. In fact i wouldnt if you wouldnt give reputation, its the most important thing in this world. A simple 'thanks' is better than that tho.