Squirrel/Functions/Timers/Delete

From Liberty Unleashed Wiki
Jump to: navigation, search

Syntax

  1. 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

  1. function onPlayerJoin( player )
  2. {
  3. exampletimer <- NewTimer( "example", 5000, 0, player );
  4. }
  5.  
  6. function example( player )
  7. {
  8. MessagePlayer( "This is the function my timer is calling on..", pPlayer );
  9. }
  10.  
  11. function onPlayerPart( player, PartID )
  12. {
  13. exampletimer.Delete();
  14. }

As you can see, you must use the timers variable and then the .delete() to remove it.

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox