From Official DarkRP Wiki
|This page refers to DarkRP 2.4.3. This information may be incorrect as of later versions.|
Check here for a up-to-date list of hooks.
|Description||Called when a player attempts to buy a vehicle. This hook gets the money amount.|
GAMEMODE:GetVehicleCost(Player ply, Entity ent)
|Returns||cost (number): The cost of the vehicle.|
The player who is attempting to buy the vehicle.
The Vehicle that is being bought
|Description||Makes Vehicles free for admins|
hook.Add( "GetVehicleCost", "FreeAdminVehicles", function( objPl ) if objPl:IsAdmin( ) then return 0 end end );
|Output||All admins will get free Vehicles|