![]() |
Stock System Help!
Guys, I really need some help. I made a stock system, with basic functions ... The problem is, it uses a GUI, and that's only clientside ... How can I tell the NPC that you chose the 'buy' option? I've tried several things, but I'm out of ideas. !pissed! Thanks for any help!
Chris |
Let's say you called the button 'buy'.
NPC Code: That will trigger when you click that button. If your question is how to get it to the serverside, use a triggeraction. triggeraction(x, y, "action", "param", "param", "etc"); |
or use a triggeraction to add the weapon
|
PHP Code:
|
Quote:
My suggestion is to follow Bl0nkt's advice and use a triggerfunction, however instead of triggeraction, you should use triggerserver ( syntax: triggerserver("gui", <weaponname>, <actionname>, <param1>, <param2>, ...) ) |
Hello guys. Thanks for all the help. I really didn't expect to get so much help on this. Anyway, how do I talk to the client? I could add something in -System such as
PHP Code:
PHP Code:
Thanks, Chris |
Are you using a guiCTR or a custom image for it like
new GuiButtonCtrl(MyGui_NameOfButton) { ... } or a showimg script based on your mousex and mousey |
Quote:
^-- Good source of information |
Okay, thanks for all the help earlier, I managed to get it done.
Thanks guys. |
Quote:
'Why don't you contribute to it, then?' Because I'm lazy. And there are already enough half-wit scripters. Personally, I just don't put GUI in local NPCs. I hate it. If I need a GUI for something, I make a new system to handle whatever needs the GUI. i.e. if I want a shopping GUI, I'll make a Shopping system to deal with it rather than having each shop NPC create a new GUI on it's own. |
Quote:
|
| All times are GMT +2. The time now is 07:01 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.