DarkRP.PlayerBoughtDoor

From DarkRP
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]

DescriptionCalled when a player has bought a door
Syntax
GAMEMODE:PlayerBoughtDoor(Player ply, Entity ent, number amount)
Returnsnil

Arguments

  • ply (Player)
  • The player who bought it

  • ent (Entity)
  • The door that was bought

  • amount (number)
  • The cost of the door

    Examples[edit]

    Descriptionlogs purchases
    Code
    hook.Add( "PlayerBoughtDoor", "example", function(ply, ent, cost)
    	ply:ChatPrint(ply:Nick() .. " bought a " .. ent:GetClass() .. " $" .. cost)
    end)
    
    OutputA print message