Search the Community
Showing results for tags 'visibility'.
-
Dear users, if in a resource I create many lua files, one for functions, one for variables, one for events, ecc..., are they all visible between them? If I declare a variable in a.lua, can I edit it in b.lua and output in c.lua? I need some particular declaration? Thanks
-
I have a problem with the visibility of outputChatBox. So it's part of a GUI. You press the button on the GUI, it sends the command to the server, the server checks if you have the money for the stuff and if you have, you got a fancy new weapon, but if you don't, the server triggers a clientside event, wich outputs the message, that you don't have enough money. The problem is, that the message, that warns you, that you don't have the money, appears for every online player. CLIENTSIDE function nomoney() outputChatBox("Nincs rá pénzed.") end addEvent("nomoney", true) addEventHandler("nomoney", resourceRoot, nomoney) SERVERSIDE function Deagleb() money = getPlayerMoney(client) if money>=100 then setPlayerMoney(client, money-100) giveWeapon(client, 24, 14, true) else triggerClientEvent("nomoney", resourceRoot) end end addEvent("Deagle", true) addEventHandler("Deagle", resourceRoot, Deagleb) Thanks for the help.
-
So, my problem is, that i made a GUI, and when it opens, it opens for all the players online and the setElementFrozen affects every player, etc. The GUI is attached to markers, so when you enter the marker, the GUI pops up. But it pops up for everyone. If you're not in the ACL group, you're not allowed to use the GUI, so it closes, when you press a button and outputs a message that you're not allowed to use it. I have the same problem with outputChatBox. The message appears for everyone. So my question is, that how could is make the GUI appear and affect only the actual user, and the outputChatBox appear only for the player i want? If you need the Scripts, just let me know and I'll instert it here. Thanks for the help.
- 5 replies
-
- 1
-
- gui
- graphical user interface
-
(and 3 more)
Tagged with: