Raised This Month: $32 Target: $400
 8% 

[SOLVED] Problem with conditions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GPhoenix97
Member
Join Date: Oct 2012
Location: Poland
Old 01-25-2013 , 17:18   [SOLVED] Problem with conditions
Reply With Quote #1

Hi!

PHP Code:
public Action:Event_BombPlantedHandle:event, const String:name[], bool:dontBroadcast )
{
    if( 
GetConVarIntgBombPlanted ) == )
    {
        new 
id GetClientOfUserIdGetEventIntevent"userid" ) );
        
        
decl String:Name32 ];
        
GetClientNameidNamesizeofName ) - );
        
        switch( 
GetConVarIntgPrintType ) )
        {
            case 
1:    PrintHintTextToAll("%t""Bomb_Planted"Name );
            case 
2:    PrintToChatAll("\x03%t""Bomb_Planted"Name );
            case 
3:    PrintCenterTextAll("%t""Bomb_Planted"Name );
        }
    }
    else if (
GetConVarInt (gBombDefused) == 1)
    {
        
EmitSoundToAll (gBombPlantSoundNamePath);
    }

I don't know why, but sound won't be emited.
If I'll delete "else if" sound will be emited

SOLVED
just left "if" instead of "else if"

Last edited by GPhoenix97; 01-25-2013 at 17:41.
GPhoenix97 is offline
Reply


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 09:47.


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