HUD
Functions

GM: CD can Add

Called when player tries to add a new car dealer.

Used in: VCMod Main addon.

Server GM:VC_CD_canAdd(Entity ply, Vector pos, Angle ang)

Arguments

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

2. Vector pos; Position
The position where the car dealer would be placed.

3. Angle ang; Angle
The angle of the would-be car dealer.

Returns

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

Example

hook.Add("VC_CD_canAdd", "VC_CD_canAdd", function(ply, pos, ang)
	local dist = pos:Distance(Vector(0,0,0))
	if dist < 1000 then
		print("Player :"..ply:Nick().." is creating a new car dealer that is too close to map center, not allowing.")
		local can = false
		return can
	end
end)
Page modified:
...2018-11-02 09:24:35