![]() |
Weapon -> Class
Hey everybody,
I'm having a bit of a tough time here. I've tried seperating the GUI initialization lines from my weapon script and placed them in a class. Here's the general layout: Weapon Script: PHP Code:
PHP Code:
The problem that I am having is if the player has just logged on and tries to turn on the NPC, the status switches, but the GUI does not hide/show. If I hit "Apply" on the script window, it works. This is obviously very inconvenient, and indicates something is wrong. Any suggestions? I also plan on using a TStaticVar, defined in another class, to allow changes to the GUI to be extremely easy. But I'm having trouble passing the TStaticVar inbetween scripts. Thanks in advance! |
If a class only is joined on clientside, it breaks if it has the //#CLIENTSIDE text in it.
|
This is because classes don't join immediately when you log on, but the script continues. This is highly annoying, as scripts that rely on a class will break on initiation.
You might be able to do something like this: PHP Code:
I'm not even sure if what I suggested will work, because the class may never join if it is waiting for the next 'frame'. In that case this MIGHT work: PHP Code:
|
I personally just do the following:
Class Script: PHP Code:
PHP Code:
I.e: PHP Code:
|
Why not just join the class serverside?
|
Quote:
|
Quote:
|
Quote:
|
A solution is still preferred if you start joining classes to GUI's.
|
Quote:
|
I tried these solutions, but it still refuses to work.
Any other suggestions? |
PHP Code:
PHP Code:
|
| All times are GMT +2. The time now is 02:35 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.