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 door. This hook gets the money amount.|
GAMEMODE:GetDoorCost(Player ply, Entity ent)
|Returns||cost (number): The cost of the door.|
The player who is attempting to buy the door.
The door that is being bought
|Description||Makes doors free for admins|
hook.Add( "GetDoorCost", "FreeAdminDoors", function( objPl ) return objPl:IsAdmin( ) and 0 or GetConVarNumber( "doorcost" ); end );
|Output||All admins will get free doors|