HUD
Functions

GM: can Switch Seat

Called when a player attemps to switch seats from within the vehicle. Works for driver and passenger seats.

Used in: VCMod Main addon.

Server GM:VC_canSwitchSeat(Entity ply, Entity ent_from, Entity ent_to)

Arguments

1. Entity ply; Player
Player who is switching the seat.

2. Entity ent_from; Seat from
The seat entity of the vehicle the player is about to switch from.

3. Entity ent_to; Seat to
The seat entity of the vehicle the player is about to switch to.

Returns

1. Boolean If it should allow player to switch the seat.

Example

hook.Add("VC_canSwitchSeat", "VC_canSwitchSeat", function(ply, ent_from, ent_to)
	print("Player :"..ply:Nick().." is attempting to switch seats from: "..ent_from:VC_getName("Seat").." to: "..ent_to:VC_getName("seat")..".")
	local can = false
	return can
end)
Page modified:
...2019-08-09 20:04:21