Squirrel/Functions/Timers/Delete
From Liberty Unleashed Wiki
Revision as of 11:58, 16 November 2012 by Phildeman101 (Talk | contribs)
Syntax
Delete()
How it works
The timer delete function works by removing any timer you have defined in your script. Therefore, any new timer you create must be assigned a variable.
Example
function onPlayerJoin( player ) { exampletimer <- NewTimer( "example", 5000, 0, player ); } function example( player ) { MessagePlayer( "This is the function my timer is calling on..", pPlayer ); } function onPlayerPart( player, PartID ) { exampletimer.Delete(); }
As you can see, you must use the timers variable and then the .delete() to remove it.