DarkRP.GetVehicleCost
Jump to navigation
Jump to search
ply (Player)
ent (Entity)
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. |
---|
Syntax[edit]
Description | Called when a player attempts to buy a vehicle. This hook gets the money amount. |
---|---|
Syntax |
GAMEMODE:GetVehicleCost(Player ply, Entity ent)
|
Returns | cost (number): The cost of the vehicle. |
Arguments
The player who is attempting to buy the vehicle.
The Vehicle that is being bought
Examples[edit]
Description | Makes Vehicles free for admins |
---|---|
Code | hook.Add( "GetVehicleCost", "FreeAdminVehicles", function( objPl )
if objPl:IsAdmin( ) then return 0 end
end );
|
Output | All admins will get free Vehicles |