Jump to content

Help needed


manve1

Recommended Posts

When i made my script ( from help of community ) i cant buy things.. and it has to be shop panel.. please have a look and tell me whats wrong:

CLIENT:

  
function BuyWeapon1 () 
if(source == button1) then 
triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_colt") 
end 
end 
  

SERVER:

  
        if(weapon_name == "weapon_colt") then 
            if(player_money >= tonumber(price_colt)) then 
                giveWeapon(source, 22, 1) 
                takePlayerMoney(source, tonumber(price_colt)) 
                outputChatBox("You bought a colt.", source, 0, 255, 0) 
            else 
                outputChatBox("You do not have enough money to buy a colt.", source, 255, 0, 0) 
            end 
  

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...