Squirrel/Server/Functions/Players/RemoveFromVehicle
From Liberty Unleashed Wiki
(Difference between revisions)
Jack Bauer (Talk | contribs) (→Example) |
|||
Line 1: | Line 1: | ||
− | {{Squirrel/Title|RemoveFromVehicle}} | + | {{Squirrel/Title|Player.RemoveFromVehicle}} |
+ | This function removes player from a vehicle. | ||
== Arguments == | == Arguments == | ||
Line 6: | Line 7: | ||
== Example == | == Example == | ||
+ | |||
+ | This command will force yourself out of the vehicle. | ||
+ | |||
<code lang="squirrel"> | <code lang="squirrel"> | ||
function onPlayerCommand( player, cmd, text ) | function onPlayerCommand( player, cmd, text ) | ||
− | + | { | |
+ | if ( cmd == "out" ) | ||
{ | { | ||
− | + | player.RemoveFromVehicle(); | |
− | + | } | |
− | + | ||
− | } | + | return 1; |
+ | } | ||
</code> | </code> | ||
− | + | === Notes === | |
− | + | ||
− | == Notes == | + | |
The call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in in this example. More info about this in the corresponding page. | The call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in in this example. More info about this in the corresponding page. | ||
+ | |||
+ | == Related Functions == | ||
+ | |||
+ | {{Squirrel/Server/Functions/Players}} |
Latest revision as of 23:37, 19 October 2010
This function removes player from a vehicle.
[edit] Arguments
- player - The player to be forced out of the vehicle.
[edit] Example
This command will force yourself out of the vehicle.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "out" ) { player.RemoveFromVehicle(); } return 1; }
[edit] Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
[edit] Related Functions
- FindPlayer
- GetClosestPlayer
- Player.Alpha
- Player.Angle
- Player.Armour
- Player.Cash
- Player.Class
- Player.ClearWeapons
- Player.Colour
- Player.ColouredName
- Player.EnterVehicle
- Player.ExitVehicle
- Player.ForceToSpawnScreen
- Player.Frozen
- Player.GetBoundariesLower
- Player.GetBoundariesUpper
- Player.GetIgnored
- Player.Health
- Player.ID
- Player.IP
- Player.Immune
- Player.Island
- Player.LUID
- Player.Marker
- Player.MarkerScale
- Player.MarkerSprite
- Player.Muted
- Player.Name
- Player.Nametag
- Player.NametagColour
- Player.Ping
- Player.Pos
- Player.RemoveFromVehicle
- Player.RemoveLimb
- Player.Score
- Player.SetAnim
- Player.SetBoundaries
- Player.SetIgnored
- Player.SetIgnoredBy
- Player.SetVehicleEnterDoor
- Player.SetWeapon
- Player.Skin
- Player.Spawn
- Player.Spawned
- Player.Team
- Player.Train
- Player.Vehicle
- Player.VehicleSeat
- Player.Velocity
- Player.VirtualWorld
- Player.WantedLevel
- Player.Weapon
- Player.SetWeapon
- Player.WeaponAmmo
- Player.WeaponState