Squirrel/Server/Functions/Vehicles/Marker

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example 1. Returning)
(Example)
 
Line 26: Line 26:
 
veh.Marker = BLIPTYPE_ARROWONLY;
 
veh.Marker = BLIPTYPE_ARROWONLY;
 
else
 
else
MessagePlayer( "[#ff00ff]You are not in a vehicle", plr );
+
MessagePlayer( "[#00ff00]*System* [#ff0000]You are not in a vehicle", plr );
 
}
 
}
 
 

Latest revision as of 14:21, 10 August 2013

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

This function sets/returns the vehicles radar marker type.

[edit] Syntax

  1. int vehicle.Marker
  1. vehicle.Marker = int value

[edit] Arguments

  • value - The type of the blip. For reference, check here.

[edit] Example

This will tell the player the type of the marker on their vehicle when they type '/marker'.

  1.  
  2. function onPlayerCommand( plr, cmd, text )
  3. {
  4. if ( cmd == "Arrow" )
  5. {
  6. local veh = plr.Vehicle;
  7. if ( veh )
  8. veh.Marker = BLIPTYPE_ARROWONLY;
  9. else
  10. MessagePlayer( "[#00ff00]*System* [#ff0000]You are not in a vehicle", plr );
  11. }
  12. return 1;
  13. }
  14.  
  15. function onPlayerExitingVehicle( player, vehicle )
  16. {
  17. vehicle.Marker = false;
  18.  
  19. return 0;
  20. }
  21.  

[edit] Notes

The function MessagePlayer and event onPlayerCommand were used in these examples. More info about them in the corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox