IIIIlllllIII Posted September 20, 2011 Share Posted September 20, 2011 hi 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
JR10 Posted September 20, 2011 Share Posted September 20, 2011 Here comes my point, you don't even know how to outputChatBox to one player, that's what copy+paste every code does. outputChatBox("You Dont Have Money to buy weapon",source) Link to comment
IIIIlllllIII Posted September 20, 2011 Author Share Posted September 20, 2011 Here comes my point, you don't even know how to outputChatBox to one player, that's what copy+paste every code does. outputChatBox("You Dont Have Money to buy weapon",source) thank you JR10 for the help yes i copy and past but i add more codes Link to comment
Cadu12 Posted September 20, 2011 Share Posted September 20, 2011 1º Learn english 2º Learn Lua scripting 3º If doesnt work, then it post on this forum. 4º ? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now