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