its not settimer its SetTmer
ok now its for making a function run after the given time example:
pawn]USAGE: SetTimer(funcname[],interval,repeating);[/pawn]
lets make a timer heal for example
[pawn]stock PlayerHealth()
{
SetPlayerHealth(playerid,100);
}
[/pawn]
the command:
[pawn]else if (strcmp(cmd, "!heal", true) == 0) {
SetTimer("PlayerHealth",5000,0); // PlayerHealth function will be submitted after 5seconds
SendCleintMessage(playerid, GREEN,"You will be healed in 5seconds to prevent abuse..");
}
return 1;
}[/pawn]
ok now lets learn the usage of each function:
SetTimer(funcname[],interval,repeating);
funcname[] : the name of the function that should be submitted
interval: how much time you wait for the function to start
repeating: how many times repeating if we put 0 just once if 1 never endz...
and the counts of the timers = 1000 = 1second 10000 = 10sec 60000 = 1min etc..
example2:
if you want the player not to die
add this function
[pawn]else if (strcmp(cmd, "!neverdiel", true) == 0) {
SetTimer("neverdie",5000,1); // now the player will be healed every 5 seconds
SendCleintMessage(playerid, GREEN,"You used neverdie function..");
}
return 1;[/pawn]
[pawn]stock neverdie()
{
SetPlayerHealth(playerid,100);
}
[/pawn]
Hope it helps