Raised This Month: $ Target: $400
 0% 

attempting to optimize code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 05-31-2016 , 09:26   Re: attempting to optimize code
Reply With Quote #4

Quote:
Originally Posted by Shattered Heart Lynx View Post
Why are you checking g_isalive in every condition?
new on pawn but i stop learning and I'm starting again from scratch

Quote:
Originally Posted by OciXCrom View Post
Not even close to good. This is somewhat better:

PHP Code:
if(g_isalive[id])
{
    switch(
g_level[id])
    {
        case 
100 .. 199:
        {
            switch(
get_user_team(id))
            {
                case 
1cs_set_user_model(id"Model_1_T")
                case 
2cs_set_user_model(id"Model_1_CT")
            }
        }
        case 
200:
        {
            switch(
get_user_team(id))
            {
                case 
1cs_set_user_model(id"Model_2_T")
                case 
2cs_set_user_model(id"Model_2_CT")
            }
        }
    }

ty so much
sirerick 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 18:39.


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