Squirrel/Server/Functions/Vehicles/Marker
From Liberty Unleashed Wiki
(Difference between revisions)
m (Typo fix (and -> an)) |
(→Example 2. Setting) |
||
Line 25: | Line 25: | ||
if ( veh ) | if ( veh ) | ||
MessagePlayer( "This vehicle has marker type - " + veh.Marker, plr ); | MessagePlayer( "This vehicle has marker type - " + veh.Marker, plr ); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
else | else | ||
MessagePlayer( "You are not in a vehicle", plr ); | MessagePlayer( "You are not in a vehicle", plr ); |
Revision as of 14:19, 10 August 2013
This function sets/returns the vehicles radar marker type.
Syntax
int vehicle.Marker
vehicle.Marker = int value
Arguments
- value - The type of the blip. For reference, check here.
Example 1. Returning
This will tell the player the type of the marker on their vehicle when they type '/marker'.
function onPlayerCommand( plr, cmd, text ) { if ( cmd == "marker" ) { local veh = plr.Vehicle; if ( veh ) MessagePlayer( "This vehicle has marker type - " + veh.Marker, plr ); else MessagePlayer( "You are not in a vehicle", plr ); } return 1; }
Notes
The function MessagePlayer and event onPlayerCommand were used in these examples. More info about them in the corresponding pages.
Related Functions
- CreateVehicle
- FindVehicle
- GetClosestVehicle
- GetVehicleCount
- GetVehicleHandlingData
- GetVehicleIDFromName
- GetVehicleName
- SetVehicleHandlingData
- Vehicle.Alpha
- Vehicle.Angle
- Vehicle.Colour1
- Vehicle.Colour2
- Vehicle.Driver
- Vehicle.EngineDamage
- Vehicle.Explode
- Vehicle.Fix
- Vehicle.GetAddon
- Vehicle.GetPassenger
- Vehicle.GetHandlingData
- Vehicle.GetWheelStatus
- Vehicle.Health
- Vehicle.ID
- Vehicle.IdleRespawnTime
- Vehicle.IdleTime
- Vehicle.LightState
- Vehicle.Locked
- Vehicle.Marker
- Vehicle.MarkerScale
- Vehicle.MarkerSprite
- Vehicle.Model
- Vehicle.OneTime
- Vehicle.PassengerCount
- Vehicle.Pos
- Vehicle.Remove
- Vehicle.Respawn
- Vehicle.RespawnTime
- Vehicle.RGBColour1
- Vehicle.RGBColour2
- Vehicle.SetHandlingData
- Vehicle.SetWheelStatus
- Vehicle.SpawnAngle
- Vehicle.SpawnPos
- Vehicle.SetAddon
- Vehicle.SetEngineState
- Vehicle.SetRadio
- Vehicle.Siren
- Vehicle.SirenLight
- Vehicle.TaxiLight
- Vehicle.Velocity
- Vehicle.VirtualWorld
- Vehicle.Wrecked