Squirrel/Server/Functions/Vehicles/Respawn

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
 
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|Vehicle.Respawn}}
 
This function respawns the given vehicle.
 
This function respawns the given vehicle.
  

Latest revision as of 11:08, 11 October 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function respawns the given vehicle.

[edit] Syntax

  1. bool Vehicle.Respawn()

[edit] Arguments

  • none

[edit] Example

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "respawnveh" )
  5. {
  6. if ( text )
  7. {
  8. local veh = FindVehicle( text.tointeger() );
  9. if ( veh )
  10. {
  11. veh.Respawn();
  12. MessagePlayer( "Respawned vehicle ID: " + text, player );
  13. }
  14. }
  15. }
  16. }
  17.  

This command will respawn the given vehicle ID.

[edit] Notes

The call onPlayerCommand was used in in this example. More info about this in the corresponding page.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox