Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```lua
- AddRemoteEvent("BuyHouse", function(player, house)
- if PlayerData[player].cash < houses[house].price then
- return AddPlayerChat(player, _("not_enought_cash"))
- end
- if getHouseOwner(player) ~= 0 then
- AddPlayerChat(player, _("already_house_owner"))
- else
- PlayerData[player].cash = PlayerData[player].cash - houses[house].price
- houses[house].owner = tonumber(PlayerData[player].accountid)
- DestroyText3D(houses[house].txtentities[2])
- houses[house].txtentities[2] = CreateText3D( _("owner").." "..GetPlayerName(player), 10, houses[house].text[1] , houses[house].text[2], houses[house].text[3], 0, 0, 0 )
- end
- end)
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement