![]() |
Global Functions
A nifty addition to the game would be able to establish functions on a global scope (Functions accessible to all npcs).
Maybe have all NPCs automatically run this on creation: "function onCreated() this.join("globalfunc");" This would be very appreciated, and quite useful. e.g.: PHP Code:
PHP Code:
|
It would be easier to make a functionlibrary class and have a player.weapons loop, with findweapon, and with a join() function. You can use the function 'isinclass(str)' to check to see if the weapon is already in the class. Have a clientside part of the script run, while watching a checksum of the weapons to see if any changes have been made, and if so, run the serverside loop to join every weapon to the class.
Worth a try. |
Ooor we could just have a global functions class that's automatically joined.. >_>
But yeah, I'd love to have a globally joined class. I'd also like to see the ability to join classes with clientside functions to a player, so we can call them without going to the serverside.. PHP Code:
PHP Code:
-Coughs.- Aaanyway.. |
How about making it so public functions in the Control-NPC can be called without using ("Control-NPC").function();
|
public function already exists. it has for a while, my friend yaharii has used it many times.
|
Hmm, I'm gonna mess around with those functions out of boredom and i have no one on my server execpt Idling staff members. =] So for no complaining of what i do, eh?
|
| All times are GMT +2. The time now is 01:43 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.