onPlayerUseDetonator

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This event is called when a player uses a remote detonator (weapon ID 12 in GTA3).

Syntax

  1. function onPlayerUseDetonator( Player plr )

Arguments

  • plr - This is the player who used the detonator

Returns

This event does not handle return values.

Example

This example will blow up the closest vehicle to a player when they use the detonator.

  1.  
  2. function onPlayerUseDetonator( plr )
  3. {
  4. local veh = GetClosestVehicle( plr );
  5. {
  6. if ( veh )
  7. {
  8. veh.Explode( plr );
  9. }
  10. }
  11. return 1;
  12. }
  13.  

Notes

The functions GetClosestVehicle and Vehicle.Explode were used in this example. More info about these in the corresponding pages.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox