AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Switch or SetPlayerBit (https://forums.alliedmods.net/showthread.php?t=183565)

DoviuX 04-23-2012 08:37

Switch or SetPlayerBit
 
Which is better for setting random classes like:
PHP Code:

zombieid ] = random_num1);
switch( 
zombieid ] ) {
    case 
1: {
        Do 
this if zombies class is first.
    }
    case 
2: {
        Do 
this if zombies class is second.
    }
        
etc...


Or is it better like this:
PHP Code:

zombieid ] = random_num1);
switch( 
zombieid ] ) {
    case 
1: {
        
SetPlayerBitzombie1id );
        
ResetPlayerBitzombie2id );
    }
    case 
2: {
        
SetPlayerBitzombie2id );
        
ResetPlayerBitzombie1id );
    }
        
etc...


Which is better for later scripting like models, sounds and prethink ?

ProIcons 04-23-2012 09:54

Re: Switch or SetPlayerBit
 
2nd


All times are GMT -4. The time now is 07:45.

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