Raised This Month: $ Target: $400
 0% 

Help for a useful plugin?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-07-2010 , 05:51   Re: Help for a useful plugin?
Reply With Quote #8

Quote:
Originally Posted by Jelle View Post
PHP Code:
    if(get_user_team(id) != || get_user_team(id) != 2
to

PHP Code:
if ( get_user_team(id) == ) return 
Just an idea. Then you do not need two, but only one check. As I see it, it is a bit faster.
It's twice as fast( Only because the native is also called unnecessarily twice ). Somehow what I'd use is:

PHP Code:
switch( cs_get_user_teamid ) )
{
     case 
CS_TEAM_UNASSIGNEDCS_TEAM_SPECTATOR:
     {
          
//Action
     
}

Quote:
Originally Posted by drekes View Post
I looked over i.
But i don't understand what's wrong with the continue. I learned it this way.
You shouldn't use jumps( breaks, continues and returns ) as they just make the code harder to perceive and mess it up. You want to keep things simple and it's much easier to think that you eat if you'r hungry instead of if you'r not hungry you skip eating.

Last edited by SnoW; 07-07-2010 at 05:53.
SnoW is offline
Send a message via MSN to SnoW
 



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


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