Better way to do this?
#6

Quote:
Originally Posted by CutX
Посмотреть сообщение
you don't need a switch in your TEAM_BUM case, as from the code you supplyed, there's only one option. CITY_LS

so instead of:
PHP код:
 case TEAM_BUM:
        {
            switch(
curCity)
            {
                case 
CITY_LS:
                {
                    new
                        
randomsizeof(BumSpawnsLS) );
                    
SetPlayerPos(playeridBumSpawnsLS[r][0], BumSpawnsLS[r][1], BumSpawnsLS[r][2]);
                    
SetPlayerFacingAngle(playeridBumSpawnsLS[r][3]);
                }
            }
            
#if defined USE_ANTI_TEAMKILL
                
SetPlayerTeam(playeridTEAM_BUM);
            
#endif
        

you could just write

PHP код:
     case TEAM_BUM:
    {
        new 
randomsizeof(BumSpawnsLS) );
        
SetPlayerPos(playeridBumSpawnsLS[r][0], BumSpawnsLS[r][1], BumSpawnsLS[r][2]);
        
SetPlayerFacingAngle(playeridBumSpawnsLS[r][3]);
        
#if defined USE_ANTI_TEAMKILL
            
SetPlayerTeam(playeridTEAM_BUM);
        
#endif
    

Sorry, I should have made it clear that I was working on "TEAM_BUM" and that they're going to have LS, LV, and SF coordinates aswell.
Reply


Messages In This Thread
Better way to do this? - by 2KY - 24.12.2013, 17:55
Re: Better way to do this? - by 2KY - 24.12.2013, 18:02
Re: Better way to do this? - by Patrick - 24.12.2013, 18:03
Re: Better way to do this? - by 2KY - 24.12.2013, 18:06
Re: Better way to do this? - by CutX - 24.12.2013, 18:12
Re: Better way to do this? - by 2KY - 24.12.2013, 18:14

Forum Jump:


Users browsing this thread: 1 Guest(s)