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