AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help PLease (https://forums.alliedmods.net/showthread.php?t=273031)

ayemnowan 10-11-2015 06:06

Help PLease
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <dhudmessage>

#define PLUGIN    "Team Score"
#define VERSION    "1.0"
#define AUTHOR    "Unknown"

#define TASK_GETPLAYER    37852

new g_SyncTeamCount

new ct_scoreterrorist_score;
new 
rounds_elapsed

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_event("TeamScore""team_score""a")

    
state OutOfRound

        g_SyncTeamCount 
CreateHudSyncObj()

        
register_logevent("LogEvent_Round_Start"2"1=Round_Start")
       
register_logevent("Logevent_Round_End"2"1=Round_End")

       
RegisterHam(Ham_Spawn"player""client_disconnect"true)
        
RegisterHam(Ham_Killed"player""client_disconnect"true)
    
set_task(1.0,"score_round",_,_,_,"b")
}

public 
team_score()
{
    new 
team[32];
    
read_data(1,team,31);
    if (
equal(team,"CT"))
    {
        
ct_score read_data(2);
    }
    else if (
equal(team,"TERRORIST"))
    {
        
terrorist_score read_data(2);
    }
}
    
public 
score_round()
{
    
set_dhudmessage(070200, -1.00.000.52.00.082.0true);
    
show_dhudmessage(0,"-=-COUNTER[%d]                       "ct_score);
    
    
set_dhudmessage(20000, -1.00.000.52.00.082.0true);
    
show_dhudmessage(0,"                        [%d]TERRORIST-=-"terrorist_score);




The scoreboard supposed to look like this COUNTER[%d]=[Round %d]=[%d]TERRORIST
[%d]=========[VS]=========[%d]


All times are GMT -4. The time now is 22:04.

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