DarkRP.PlayerBoughtDoor
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 has bought a door |
---|---|
Syntax |
GAMEMODE:PlayerBoughtDoor(Player ply, Entity ent, number amount)
|
Returns | nil |
Arguments
The player who bought it
The door that was bought
The cost of the door
Examples[edit]
Description | logs purchases |
---|---|
Code | hook.Add( "PlayerBoughtDoor", "example", function(ply, ent, cost)
ply:ChatPrint(ply:Nick() .. " bought a " .. ent:GetClass() .. " $" .. cost)
end)
|
Output | A print message |