Raised This Month: $ Target: $400
 0% 

Round End HUD HELP!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 01-26-2010 , 23:39   Round End HUD HELP!!
Reply With Quote #1

here it my code i get errors when compile need HELP!!


PHP Code:
#include <amxmodx>
#include <amxmisc>

#define MAX_PLAYERS 32

#define VERSION "1.0"

// Players Bool
new bool:g_bAlive[MAX_PLAYERS+1];

// Global Variables
new g_iMaxPlayers;

// Variables
new g_msgSyncGeneral;

public 
plugin_init() 
{
    
register_plugin(".::LG::. RoundEnd HUD"VERSION"Shuttle_Wave")
    
    
// Roundend Messages/Sounds
    
register_logevent("eLogRoundEnd"2"1=Round_End");
    
    
register_message(get_user_msgid("TextMsg"), "msgTextMsg");
    
    
// Sync Hud Message (general)
    
g_msgSyncGeneral CreateHudSyncObj();            // -1
    
    // Get Maxplayers
    
g_iMaxPlayers get_maxplayers();
}

// Block terrorist, counter-terrorist, round-draw, and restart messages
public msgTextMsg()
{
    static 
textmsg[22];
    
get_msg_arg_string(2textmsgcharsmax(textmsg));
    
    
// Game restarting, block message and replace with our own
    
if(equal(textmsg"#Game_will_restart_in") || equal(textmsg"#Game_Commencing") )
    {

    
// Terrorist or Guards won, block message and replace with our own
    
else if(equal(textmsg"#Hostages_Not_Rescued") || equal(textmsg"#Round_Draw") || equal(textmsg"#Terrorists_Win") || equal(textmsg"#CTs_Win") )
    }
}

public 
eLogRoundEnd()
{
    if(!
fnGetAliveTeamCount(CS_TEAM_T) && ( fnGetAliveTeamCount(CS_TEAM_CT) != ) )
    {
        {
            
// Guards Win
            
set_hudmessage(0100255, -1.0, -1.000.03.02.01.0, -1);
            
ShowSyncHudMsg(0g_msgSyncGeneral"Guards Win!^n^nAll Prisoners were killed...");
        }
    }

    
// Send the custom message, providing it's enabled
    
else if(!fnGetAliveTeamCount(CS_TEAM_CT) && ( fnGetAliveTeamCount(CS_TEAM_T) != ) )
    {
        
// Prisoners Win
        
set_hudmessage(25518030, -1.0, -1.000.03.02.01.0, -1);
        
ShowSyncHudMsg(0g_msgSyncGeneral"Prisoners Win!^n^nAll Guards were killed in action");
    }
    
    else
    {
        {
            
// No-one Won
            
set_hudmessage(02550, -1.0, -1.000.03.02.01.0, -1);
            
ShowSyncHudMsg(0g_msgSyncGeneral"No one won");
        }
    }
}

// Function to get alive team count
fnGetAliveTeamCount(CsTeams:Team)
{
    new 
iCount 0;
    for(new 
1<= g_iMaxPlayersi++)
    {
        if( ( 
g_bAlive[i] ) && ( cs_get_user_team(i) == Team ) )
            ++
iCount;
    }
    
    return 
iCount;

__________________
JailBreak Mod with Plugin API ( 90% ) Public

Last edited by shuttle_wave; 01-27-2010 at 00:00.
shuttle_wave is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-26-2010 , 23:46   Re: Round End HUD HELP!!
Reply With Quote #2

You are missing the code to execute if Line 44 evaluates to true

EDIT: Line 41 has no matching closing brace
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 01-27-2010 , 00:00   Re: Round End HUD HELP!!
Reply With Quote #3

someone fix it 4 me. i fixed the brackets
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-27-2010 , 00:08   Re: Round End HUD HELP!!
Reply With Quote #4

No you didn't, you just stuck it there without even trying....

PHP Code:
// Block terrorist, counter-terrorist, round-draw, and restart messages
public msgTextMsg()
{
    static 
textmsg[22];
    
get_msg_arg_string(2textmsgcharsmax(textmsg));
    
    
// Game restarting, block message and replace with our own
    
if(equal(textmsg"#Game_will_restart_in") || equal(textmsg"#Game_Commencing") )
    {
        
// put something here
    
}
    
// Terrorist or Guards won, block message and replace with our own
    
else if(equal(textmsg"#Hostages_Not_Rescued") || equal(textmsg"#Round_Draw") || equal(textmsg"#Terrorists_Win") || equal(textmsg"#CTs_Win") )
    {
        
// put something here
    
}

__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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:19.


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