Raised This Month: $ Target: $400
 0% 

Round End HUD HELP!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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