Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Zombie Class: Rage Zombie [v1.5]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 01-02-2011 , 08:41   Re: [ZP] Zombie Class: Rage Zombie [v1.4]
Reply With Quote #10

Time for suggestions

1-
Code:
public client_putinserver(id) {     g_bConnected[id] = true }
Since you have knowledge in bits you should try to use the following method for all booleans in ur plugin bcoz it will require less memory usage, which means ur plugin will be more effecient
Code:
// Using bits will be far more effecient new g_bitConnectedPlayers // This variable will allow us to use one var only to store all connected player's indexs' #define MarkUserConnected(%0)   ( g_bitConnectedPlayers |= ( 1 << ( %0 & 31 ) ) ) #define ClearUserConnected(%0)  ( g_bitConnectedPlayers &= ~( 1 << ( %0 & 31 ) ) ) #define IsUserConnected(%0)  ( g_bitConnectedPlayers & ( 1 << ( %0 & 31 ) ) ) // Put this in thos forwards public client_connect(id) MarkUserConnected(id) public client_disconnect(id) ClearUserConnected(id) some_function( id ) {     // To check if user is connected     if ( IsUserConnected(id) )     {         // ...     } }
2- u should try to use static variables especially in FM_CmdStart

3-
Code:
public fw_PlayerPreThink(id) {     if (!g_bAlive[id] || !g_bIsRage[id] || !g_bInRage[id])         return FMRES_IGNORED         set_user_maxspeed(id, get_pcvar_float(cvar_maxspeed))         return FMRES_IGNORED }
It would be better to cache the speed cvar bcoz prethink is called very often
4-
Code:
replace_all(szMsg, 190, "!w", "^0")
I think you should remove this coz u know what it is supposed to do and it is in da wrong place
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
 



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 16:14.


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