AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   show scor on round start (https://forums.alliedmods.net/showthread.php?t=20099)

ch3cker 11-01-2005 12:33

show scor on round start
 
i just want to add hudmessage on the round start under the message "Prepair to fight"
here is my code :

Code:

public eNewRound()
{
new CT, T
        if (read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0))
        {
            CT = g_teamScore[0]
            T = g_teamScore[1]
                g_firstBlood = 1
                g_C4Timer = 0
                ++g_roundCount
               
                if (RoundCounter)
                {
                        set_hudmessage(0, 255, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
                        show_hudmessage(0, "%L", LANG_PLAYER, "PREPARE_FIGHT", g_roundCount)
                        set_hudmessage(0, 0, 255, -1.0, 0.45, 0, 6.0, 6.0, 0.5, 0.15, 1)
                        show_hudmessage(0, "Terroristen: %d^nCounterTerroristen: %d", CT, T)
                }
               
                if (RoundCounterSound)
                        play_sound("misc/prepare")
               
                if (KillingStreak)
                {
                        new appl[32], ppl, i
                        get_players(appl, ppl, "ac")
                       
                        for (new a = 0; a < ppl; ++a)
                        {
                                i = appl[a]
                               
                                if (g_streakKills[i][0] >= 2)
                                        client_print(i, print_chat, "* %L", i, "KILLED_ROW", g_streakKills[i][0])
                                else if (g_streakKills[i][1] >= 2)
                                        client_print(i, print_chat, "* %L", i, "DIED_ROUNDS", g_streakKills[i][1])
                        }
                }
        }
}

i added this code too (this is from the Hostname Changer V 1.1 and the code is from Johnny got his gun so all credits for this code goes to him)

Code:

public teamScore(id) {
        new team[2]
        read_data(1, team, 1)
        g_teamScore[(team[0]=='C')? 0 : 1] = read_data(2)

        return PLUGIN_CONTINUE
}

and
Code:

new g_teamScore[2]
during the complimetime (i dont now how to write :lol: :lol: ) comes no errors, but in the game there comes no hudmessage now. I found in the logs this message, but i dont now wat tho do now:
Code:

L 11/01/2005 - 17:28:07: String formatted incorrectly - parameter 6 (total 5)
L 11/01/2005 - 17:28:07: [AMXX] Displaying debug trace (plugin "miscstats.amxx")
L 11/01/2005 - 17:28:07: [AMXX] Run time error 25: parameter error
L 11/01/2005 - 17:28:07: [AMXX]    [0] miscstats.sma::eNewRound (line 520)

so can someone help me plz ???

Edit:
this is from the miscstats plugin.

Zenith77 11-01-2005 12:36

what line is 520 ?

ch3cker 11-01-2005 13:20

oh sorry ^^
Code:

                        show_hudmessage(0, "%L", LANG_PLAYER, "PREPARE_FIGHT", g_roundCount)
this is line 520

but i think this is correctly, because i didnt anything on this line


All times are GMT -4. The time now is 23:40.

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