public interface

Vehicle

implements Destroyable Proxyable<T>
net.gtaun.shoebill.object.Vehicle

Summary

Constants
int INVALID_ID
Public Methods
abstract void attachTrailer(Vehicle trailer)
Attaches a trailer to the vehicle
abstract static Vehicle create(int modelId, float x, float y, float z, int interiorId, int worldId, float angle, int color1, int color2, int respawnDelay)
Create a Vehicle with params.
abstract static Vehicle create(int modelId, AngledLocation loc, int color1, int color2, int respawnDelay, boolean addsiren)
Create a Vehicle with params.
abstract static Vehicle create(int modelId, Vector3D pos, float angle, int color1, int color2, int respawnDelay)
Create a Vehicle with params.
abstract static Vehicle create(int modelId, Vector3D pos, int interiorId, int worldId, float angle, int color1, int color2, int respawnDelay)
Create a Vehicle with params.
abstract static Vehicle create(int modelId, Location loc, float angle, int color1, int color2, int respawnDelay)
Create a Vehicle with params.
abstract static Vehicle create(int modelId, float x, float y, float z, float angle, int color1, int color2, int respawnDelay)
Create a Vehicle with params.
abstract void detachTrailer()
Detaches a trailer from the vehicle (check with isTrailerAttached())
abstract static Collection<Vehicle> get()
abstract static Vehicle get(int id)
abstract float getAngle()
abstract int getColor1()
abstract int getColor2()
abstract VehicleComponent getComponent()
abstract VehicleDamage getDamage()
abstract VehicleState getDoors()
Get the state (open or close) of the doors This function was introduced in 0.3.7
abstract float getHealth()
abstract int getId()
abstract int getInterior()
abstract AngledLocation getLocation()
abstract int getModelId()
abstract String getModelName()
abstract static int getPoolSize()
Gets the vehicle's pool size
abstract int getRespawnDelay()
abstract Quaternion getRotationQuat()
abstract int getSirenState()
Returns the siren state of the vehicle
abstract VehicleParam getState()
abstract Vehicle getTrailer()
Gets the trailer that is attached to the vehicle
abstract Velocity getVelocity()
abstract VehicleState getWindows()
Get the state (open or close) of the windows This function was introduced in 0.3.7
abstract int getWorld()
abstract boolean hasSiren()
Returns if the vehicle has been initialized with siren (addsiren parameter)
abstract boolean isPlayerIn(Player player)
Checks if a specific player is in the vehicle
abstract boolean isStatic()
abstract boolean isStreamedIn(Player forPlayer)
Checks if the vehicle is streamed-in for a specific player
abstract boolean isTrailerAttached()
Checks if any trailer is attached to the vehicle
abstract void putPlayer(Player player, int seat)
Puts a player into that vehicle
abstract void repair()
Sets the health of the vehicle to 1000 and repairs all visual damages
abstract void respawn()
Destroys and spawns the vehicle
abstract void setAngle(float angle)
abstract void setAngularVelocity(Velocity velocity)
abstract void setColor(int color1, int color2)
Sets the color of the vehicle (https://wiki.sa-mp.com/wiki/Vehicle_Color_IDs)
abstract void setDoors(VehicleState vehicleState)
Sets the vehicle's door state
abstract void setHealth(float health)
abstract void setInterior(int interior)
abstract void setLocation(float x, float y, float z)
abstract void setLocation(Location loc)
abstract void setLocation(AngledLocation loc)
abstract void setLocation(Vector3D pos)
abstract void setNumberPlate(String number)
Sets the number plate of the vehicle
abstract void setPaintjob(int paintjobId)
Sets the paintjob of the vehicle
abstract void setParamsForPlayer(Player player, boolean objective, boolean doorsLocked)
Sets different parameters for a specific player
abstract void setVelocity(Velocity velocity)
abstract void setWindows(VehicleState vehicleState)
Sets the vehicle's window state
abstract void setWorld(int worldId)
[Expand]
Inherited Methods
From interface net.gtaun.shoebill.object.Destroyable
From interface net.gtaun.shoebill.object.Proxyable

Constants

public static final int INVALID_ID

Constant Value: 65535 (0x0000ffff)

Public Methods

public abstract void attachTrailer (Vehicle trailer)

Attaches a trailer to the vehicle

Parameters
trailer The trailer to attach

public static abstract Vehicle create (int modelId, float x, float y, float z, int interiorId, int worldId, float angle, int color1, int color2, int respawnDelay)

Create a Vehicle with params. If the Creation fails, it will throw a CreationFailedException.

Parameters
modelId Modelid of the Vehicle.
x X-Pos where the Vehicle should be.
y Y-Pos where the Vehicle should be.
z Z-Pos where the Vehicle should be.
interiorId Interiorid where the Vehicle should be.
worldId Worldid where the Vehicle should be.
angle R(otation)-Pos where the Vehicle should be.
color1 First color of the Vehicle.
color2 Second color of the Vehicle.
respawnDelay The time in seconds when the Vehicle gets respawned if there is no player in it.
Returns
  • The created Vehicle.

public static abstract Vehicle create (int modelId, AngledLocation loc, int color1, int color2, int respawnDelay, boolean addsiren)

Create a Vehicle with params. If the Creation fails, it will throw a CreationFailedException.

Parameters
modelId Modelid of the Vehicle.
loc Location where the Vehicle should be.
color1 First color of the Vehicle.
color2 Second color of the Vehicle.
respawnDelay The time in seconds when the Vehicle gets respawned if there is no player in it.
Returns
  • The created Vehicle.

public static abstract Vehicle create (int modelId, Vector3D pos, float angle, int color1, int color2, int respawnDelay)

Create a Vehicle with params. If the Creation fails, it will throw a CreationFailedException.

Parameters
modelId Modelid of the Vehicle.
pos Vector3D-Pos where the Vehicle should be.
angle R(otation)-Pos where the Vehicle should be.
color1 First color of the Vehicle.
color2 Second color of the Vehicle.
respawnDelay The time in seconds when the Vehicle gets respawned if there is no player in it.
Returns
  • The created Vehicle.

public static abstract Vehicle create (int modelId, Vector3D pos, int interiorId, int worldId, float angle, int color1, int color2, int respawnDelay)

Create a Vehicle with params. If the Creation fails, it will throw a CreationFailedException.

Parameters
modelId Modelid of the Vehicle.
pos Vector3D-Pos where the Vehicle should be.
interiorId Interiorid where the Vehicle should be.
worldId Worldid where the Vehicle should be.
angle R(otation)-Pos where the Vehicle should be.
color1 First color of the Vehicle.
color2 Second color of the Vehicle.
respawnDelay The time in seconds when the Vehicle gets respawned if there is no player in it.
Returns
  • The created Vehicle.

public static abstract Vehicle create (int modelId, Location loc, float angle, int color1, int color2, int respawnDelay)

Create a Vehicle with params. If the Creation fails, it will throw a CreationFailedException.

Parameters
modelId Modelid of the Vehicle.
loc Location where the Object should be.
angle R(otation)-Pos where the Vehicle should be.
color1 First color of the Vehicle.
color2 Second color of the Vehicle.
respawnDelay The time in seconds when the Vehicle gets respawned if there is no player in it.
Returns
  • The created Vehicle.

public static abstract Vehicle create (int modelId, float x, float y, float z, float angle, int color1, int color2, int respawnDelay)

Create a Vehicle with params. If the Creation fails, it will throw a CreationFailedException.

Parameters
modelId Modelid of the Vehicle.
x X-Pos where the Vehicle should be.
y Y-Pos where the Vehicle should be.
z Z-Pos where the Vehicle should be.
angle R(otation)-Pos where the Vehicle should be.
color1 First color of the Vehicle.
color2 Second color of the Vehicle.
respawnDelay The time in seconds when the Vehicle gets respawned if there is no player in it.
Returns
  • The created Vehicle.

public abstract void detachTrailer ()

Detaches a trailer from the vehicle (check with isTrailerAttached())

public static abstract Collection<Vehicle> get ()

public static abstract Vehicle get (int id)

public abstract float getAngle ()

public abstract int getColor1 ()

public abstract int getColor2 ()

public abstract VehicleComponent getComponent ()

public abstract VehicleDamage getDamage ()

public abstract VehicleState getDoors ()

Get the state (open or close) of the doors This function was introduced in 0.3.7

Returns
  • VehicleState object for the vehicle (doors)

public abstract float getHealth ()

public abstract int getId ()

public abstract int getInterior ()

public abstract AngledLocation getLocation ()

public abstract int getModelId ()

public abstract String getModelName ()

public static abstract int getPoolSize ()

Gets the vehicle's pool size

Returns
  • Vehicle's pool size

public abstract int getRespawnDelay ()

public abstract Quaternion getRotationQuat ()

public abstract int getSirenState ()

Returns the siren state of the vehicle

Returns
  • If the sirens are on (-1 = not activated yet, 0 = off, 1 = on)

public abstract VehicleParam getState ()

public abstract Vehicle getTrailer ()

Gets the trailer that is attached to the vehicle

Returns
  • The attached trailer

public abstract Velocity getVelocity ()

public abstract VehicleState getWindows ()

Get the state (open or close) of the windows This function was introduced in 0.3.7

Returns
  • VehicleState object for the vehicle (windows)

public abstract int getWorld ()

public abstract boolean hasSiren ()

Returns if the vehicle has been initialized with siren (addsiren parameter)

Returns
  • If the vehicle has a siren

public abstract boolean isPlayerIn (Player player)

Checks if a specific player is in the vehicle

Parameters
player The player to check
Returns
  • If the player is in the vehicle

public abstract boolean isStatic ()

public abstract boolean isStreamedIn (Player forPlayer)

Checks if the vehicle is streamed-in for a specific player

Parameters
forPlayer The player to check
Returns
  • If the vehicle is streamed-in for the player

public abstract boolean isTrailerAttached ()

Checks if any trailer is attached to the vehicle

Returns
  • If there is a trailer attached

public abstract void putPlayer (Player player, int seat)

Puts a player into that vehicle

Parameters
player Player to put in
seat Which seat he should sit in

public abstract void repair ()

Sets the health of the vehicle to 1000 and repairs all visual damages

public abstract void respawn ()

Destroys and spawns the vehicle

public abstract void setAngle (float angle)

public abstract void setAngularVelocity (Velocity velocity)

public abstract void setColor (int color1, int color2)

Sets the color of the vehicle (https://wiki.sa-mp.com/wiki/Vehicle_Color_IDs)

Parameters
color1 First color
color2 Second color

public abstract void setDoors (VehicleState vehicleState)

Sets the vehicle's door state

Parameters
vehicleState The new state

public abstract void setHealth (float health)

public abstract void setInterior (int interior)

public abstract void setLocation (float x, float y, float z)

public abstract void setLocation (Location loc)

public abstract void setLocation (AngledLocation loc)

public abstract void setLocation (Vector3D pos)

public abstract void setNumberPlate (String number)

Sets the number plate of the vehicle

Parameters
number The String to display on the plate

public abstract void setPaintjob (int paintjobId)

Sets the paintjob of the vehicle

Parameters
paintjobId The paintjobid (https://wiki.sa-mp.com/wiki/Paintjob)

public abstract void setParamsForPlayer (Player player, boolean objective, boolean doorsLocked)

Sets different parameters for a specific player

Parameters
player Which player should be affected
objective If the objective should be open / closed
doorsLocked If the doors should be locked

public abstract void setVelocity (Velocity velocity)

public abstract void setWindows (VehicleState vehicleState)

Sets the vehicle's window state

Parameters
vehicleState The new state

public abstract void setWorld (int worldId)