Raised This Month: $ Target: $400
 0% 

Please review my plugin, Any room for improvements?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 07-23-2013 , 11:55   Re: Please review my plugin, Any room for improvements?
Reply With Quote #4

1. Any variable created in pawn will be automatically zeroed. No need for "new afk = 0,...etc".
2. What if cl_cmd("kill") is blocked by other plugin ?? use user_kill(id).
3. What happens when two players of different team used /afk ??
PHP Code:
//Set previous team
        
cs_set_user_team(idteam); 
Where did you store previous team ?? Create an new array szAfkTeams[33] and store their team ids in this array. So when they come back from afk you can assign them to their correct team. Also same goes for afk( new afk[33] ).
4. Remove task at round end.
5.
PHP Code:
get_players ctplayersnum,"ae""CT");
    
get_players tplayersnum2,"ae""TERRORIST"); 
Are you trying to balance only alive players ?? if not use "e" instead of "ae".
6. Return PLUGIN_HANDLED in cl cmds.
7.
PHP Code:
if(is_user_alive(id) == 1
to
PHP Code:
if(is_user_alive(id)) 
and
PHP Code:
if(afk == 0
to
PHP Code:
if(!afk
8. What happenes when /balance is called by an admin in middle of the round. Its better to store a "bool:Balance = 1" when admin calls /balance and run function "ExecuteTeamBalancer" at round end by checking booleen. Same goes for /afk also.
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here
Shooting King is offline
 



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 06:28.


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