Raised This Month: $32 Target: $400
 8% 

Super Hero Module 2.002 & New Server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-13-2006 , 00:39   Re: Super Hero Module 2.002 & New Server
#33

Just a suggestion. Instead of plugins having to keep track of their super hero id and then switching a bool to true and false to keep track if they have the hero or not, why not let the module do that (Still keeping the sh_hero_init() forward, so other heros can do some stuff during that time). Like you could just create a native has_hero(id), to check if a client has a plugin's hero. And for natives that require a hero id, all you would have to do is keep track of which plugin registered which hero, which, last time I looked at your guys code can easily be done .

I beleive I did this in a mod I was creating. I just used a const AMX *amx pointer and then scanned through my class table and see if the pointer matched up with the calling plugin's amx.

This way, it's simpler, and avoids other plugins from being able to change other hero data.
Of course this may be bad design :/, please tell me.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode