Raised This Month: $ Target: $400
 0% 

if, elseif, bool?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Garrey
Member
Join Date: Jan 2010
Old 03-19-2014 , 18:03   if, elseif, bool?
Reply With Quote #1

Hei guys.. wanted to ask is this possible?

PHP Code:
new bool:g_mute[33];

public 
plugin_init()
{    
    
set_task(120.0"ShowMessage");
    
    
register_clcmd("say /us""cmdToggle")
    return 
PLUGIN_CONTINUE
}
public 
cmdToggle(i){
    
g_mute[i] = !g_mute[i];
    if ((
g_mute[i] = true)) {
        
client_cmd(i"setinfo ^"mute^" ^"off^"")
    }
    else if ((
g_mute[i] = false)) {
        
client_cmd(i"setinfo ^"mute^" ^"on^"")
    }
    
    
ColorChat(i"^3You have^4 %sabled^3 sounds",(g_mute[i] ? "en":"dis") );
}
public 
ShowMessage(i) {
    if((
g_mute[i] = true)) {
        
ColorChat(i"^3To turn ^4OFF^3 sounds - say ^1/us");
    }
    else {
        
ColorChat(i"^3To turn ^4ON^3 sounds - say ^1/us");
    }
    

__________________
People are like music, some speak the truth and others are just noise..
Garrey is offline
 


Thread Tools
Display Modes

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 06:00.


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