Module Player
Star Wars Vehicles Player Meta
Info:
- Author: Doctor Jew
Functions
ButtonDown(button) | Check if a player has a button down. |
ButtonUp(button) | Check if a player has a button up. |
ControlDown(control) | Check if a player has a SWVR control down. |
ControlUp(control) | Check if a player has a SWVR control up. |
ControlSet(control) | Check if a player has a control set. |
GetSWVehicle() | Get the player’s current SWVR vehicle, if any. |
Functions
- ButtonDown(button)
-
Check if a player has a button down.
Parameters:
- button Any KEY_CODE enum
Returns:
-
bool
If the button is down
See also:
- ButtonUp(button)
-
Check if a player has a button up.
Parameters:
- button Any KEY_CODE enum
Returns:
-
bool
If the button is up
See also:
- ControlDown(control)
-
Check if a player has a SWVR control down.
Parameters:
- control string The suffix of the control
Returns:
-
bool
If the control is down or not
See also:
Usage:
local eject = ply:ControlDown("eject")
- ControlUp(control)
-
Check if a player has a SWVR control up.
Parameters:
- control string The suffix of the control
Returns:
-
bool
If the control is up or not
See also:
Usage:
local eject = ply:ControlUp("eject")
- ControlSet(control)
-
Check if a player has a control set.
Parameters:
- control string The control to check
Returns:
-
bool
If the player has the control set
Usage:
local has_eject = ply:ControlSet("eject")
- GetSWVehicle()
-
Get the player’s current SWVR vehicle, if any.
Returns:
-
entity
The current vehicle entity or NULL