Garry's Mod Wiki

SANDBOX:PlayerSpawnVehicle

  boolean SANDBOX:PlayerSpawnVehicle( Player ply, string model, string name, table table )

Description

Called to ask if player allowed to spawn a particular vehicle or not.

Arguments

1 Player ply
The player that wants to spawn that vehicle
2 string model
The vehicle model that player wants to spawn
3 string name
Vehicle name
4 table table
Table of that vehicle, containing info about it See VehicleTable structure.

Returns

1 boolean
Return false to disallow spawning that vehicle