Jump to content

[HELP] Whats wrong with script?? [SOLVED]


Clydian

Recommended Posts

local aPickup = createPickup ( -49.7573, -269.5133, 6.6331, 3, 1273, 0, 0 ) 
  
function showPropertyInfo ( player ) 
   outputChatBox ( "| Īpašums: 'Alus & Co.' |", player ) 
   outputChatBox ( "| Cena: 150000 | 5min ienākums: 5000 | Pārdošanas cena: 60000 |", player ) 
   outputChatBox ( "| Lai iegādātos šo īpašumu, rakstiet: /buyproperty. Lai pārdotu /sellproperty |", player ) 
    
end 
addEventHandler ( "onPickupHit", aPickup, showPropertyInfo ) 
  
function whenBuyProperty(player, commandName) 
    local money = getPlayerMoney(player) 
    if (money > 150000) then 
        outputChatBox("You have succesfully bought an interior!", player) 
    end 
end 

So basicly i want to make two commands.

/buyproperty

/sellproperty

How can i make that when player types /buyproperty it shows if it has enought money, on not that much money?

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...