Raised This Month: $ Target: $400
 0% 

bool question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-22-2013 , 23:11   bool question
Reply With Quote #1

is it possible to have bools in the function brackets?

public function(id, bool:etc )
{

}


and then you can just do this in other functions..


function(id, true)

or

function(id, false)

if so how to i make up the function with the bool ?

EDIT:
ok figured one way out

PHP Code:
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /true""cmdTest"0);
    
register_clcmd("say /false""cmdTest1"0);
}

public 
cmdTest(id)
{
    
Test(idtrue)    
}

public 
cmdTest1(id)
{
    
Test(idfalse)
}

public 
Test(idbool:hmm )
{
    switch(
hmm)
    {
        case 
trueclient_print(idprint_center"I AM TRUE");
        case 
falseclient_print(idprint_center"I AM FALSE");
    }

is there any other more effective ways ?
__________________

Last edited by Blizzard_87; 04-22-2013 at 23:27.
Blizzard_87 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 10:53.


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