Jump to content

need help with my script


IIIIlllllIII

Recommended Posts

hi

8)

i make shop panel and i need ur help guys

i make the shop for buy weapons and i have a small problem with it

when the player dont have money and press button to buy weapon the msg of the chat

(you dont have money to buy wepaon)

all players see this msg this my problem

i want this msg only on the player when he press button to buy weapon how i fix it oh

this the code server said

  
addEvent("gived",true)  
  
addEventHandler("gived",root,  
  
function() 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 150) then 
  
    takePlayerMoney(source,150)  
     
    giveWeapon ( source ,  24 )  
      
    setPedWeaponSlot(source, getSlotFromWeapon(24))  
      
      
local r, g, b = getPlayerNametagColor(source) 
outputChatBox ( "#FFFC17" .. getPlayerName ( source ) .. " has bought deagle $150 ..." , getRootElement(), r, g, b, true ) 
      
    else 
     
        outputChatBox("You Dont Have Money to buy weapon")  
end  
  
end  
  
  
  

the problem with the outputBox when the player press the Button he spam on the chat and all players see

the msg ( You Dont Have Money to buy weapon ) i want only the player see the msg of him self

i hope u understand me guys plz fix it

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