HUD
Functions

GM: can Use ELS

Called before a player tries to toggle ELS lights or Sirens.

Used in: VCMod ELS addon.

Client GM:VC_canUseELS(Entity ply, Enitty ent, String type)

Arguments

1. Entity ply; Player
Player who is doing it.

2. Enitty ent; Entity
Vehicles entity.

3. String type; Type
What the player is attempting to use. Available types: "manual_on", "manual_off", "lights_on", "lights_off", "lights_cycle", "siren_on", "siren_off", "siren_cycle".

Returns

1. Boolean If it should allow player to do it or not.

Example

hook.Add("VC_canUseELS", "VC_canUseELS", function(ply, ent, type)
	if type == "manual_on" then
		print("Player :"..ply:Nick().." is attempting to use manual siren, stopping.")
		local can = false
		return can
	end
end)
Page modified:
...2018-11-02 09:24:35