Raised This Month: $ Target: $400
 0% 

Switch or SetPlayerBit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 04-23-2012 , 08:37   Switch or SetPlayerBit
Reply With Quote #1

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 ?

Last edited by DoviuX; 04-23-2012 at 08:39.
DoviuX is offline
Send a message via Skype™ to DoviuX
ProIcons
Senior Member
Join Date: Jan 2009
Location: Greece - Salonica
Old 04-23-2012 , 09:54   Re: Switch or SetPlayerBit
Reply With Quote #2

2nd
__________________
function rb return $regsubex($$1-,/(.)/g,$+($chr(2) $+ $chr(3),$r(2,15),$chr(2),\1))
ProIcons is offline
Reply



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:45.


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