Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. ```lua
  2. AddRemoteEvent("BuyHouse", function(player, house)
  3.     if PlayerData[player].cash < houses[house].price then
  4.         return AddPlayerChat(player, _("not_enought_cash"))
  5.     end
  6.  
  7.     if getHouseOwner(player) ~= 0 then
  8.         AddPlayerChat(player, _("already_house_owner"))
  9.     else
  10.         PlayerData[player].cash = PlayerData[player].cash - houses[house].price
  11.         houses[house].owner = tonumber(PlayerData[player].accountid)
  12.         DestroyText3D(houses[house].txtentities[2])
  13.         houses[house].txtentities[2] = CreateText3D( _("owner").." "..GetPlayerName(player), 10, houses[house].text[1] , houses[house].text[2], houses[house].text[3], 0, 0, 0 )        
  14.     end
  15. end)
  16. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement