Module core.metatables.sh_vehicle
Shared Vehicle Metatable.
Module Overview
Functions
| vMeta:CarName() | Get the name of a vehicle. |
| vMeta:HasControlPermission(player) | Checks if a player has permission to control this vehicle. |
| vMeta:Stolen() | Check if a car is stolen. |
| vMeta:OwnerWarranted() | Check if a car is marked as wanted. |
| vMeta:Locked(boolean) | Check if a car is locked. |
| vMeta:InternalLocked() | Check if a car is internally locked. |
| vMeta:getVehicleLocation() | Function that returns the current location of the vehicle. |
| vMeta:GetHP() | Get the vehicle's HP. |
| vMeta:IsDestroyed() | Gets if the vehicle is "destroyed" |
- vMeta:CarName()
-
Get the name of a vehicle.
Returns:
-
string The name of the vehicle.
- vMeta:HasControlPermission(player)
-
Checks if a player has permission to control this vehicle.
Parameters:
- player The player entity to check permission for
Returns:
-
boolean True if the player has permission, false otherwise
- vMeta:Stolen()
-
Check if a car is stolen.
Returns:
-
boolean If the car is marked as stolen.
- vMeta:OwnerWarranted()
-
Check if a car is marked as wanted.
Deprecated:
-
This function is deprecated and may be removed in a future version.
Directly poll the owning entities warranted status.Returns:
-
boolean If the car is marked as wanted.
- vMeta:Locked(boolean)
-
Check if a car is locked.
Parameters:
- boolean If the car is locked.
- vMeta:InternalLocked()
-
Check if a car is internally locked.
Deprecated:
-
This function is deprecated and may be removed in a future version.
The interface for this system as been removed.Returns:
-
boolean If the vehicle has been internally locked.
- vMeta:getVehicleLocation()
-
Function that returns the current location of the vehicle.
Returns:
-
string The position of the vehicle.
- vMeta:GetHP()
-
Get the vehicle's HP.
Returns:
-
int
Current health.
- vMeta:IsDestroyed()
-
Gets if the vehicle is "destroyed"
Returns:
-
bool
If the vehicle is destroyed.