AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hide-n-Seek war mod help (https://forums.alliedmods.net/showthread.php?t=107401)

NucL3ra 10-26-2009 04:56

Hide-n-Seek war mod help
 
Ok , I'm trying to make my own hidenseek war mod and i have another problem.

Hide-N-Seek war means : Team A stays 5 rounds CT even if they die even if they don't , then Team A goes to T and Team B goes to CT another 5 rounds.

The problem is that i don't know how to calculate each wined round for every team.

I mean every time Team A wins a round they get rounds_team_1++ , and every time Teams B wins i want they to get rounds_team_2++. Take care that after a half of match the teams will switch. At the end of the match i also want to calculate the winner. That would be easy tho something like:

if (rounds_team_2 > rounds_team_1) showhns_msg(0, "Team 2 won the match") else showhns_msg(0 "Team 1 won the match";

I don't know how to calcualte each round. If someone can give me some clues or informations i'd be pleased :).

NucL3ra 10-26-2009 07:54

Re: Hide-n-Seek war mod help
 
Also i'm not getting any chat message for this code:

Code:

    if(TerroristsWin)
    {
        formatex(HudMsg, 191, "Echipa T a castigat runda .");
        if(g_ScrimOn)
        {
            if(g_ScrimType == SCRIM_POINTS)
                {
                if ((get_user_team(id) == 1)&&((g_MaxScrimRounds/2) - g_ScrimRounds <=5))
                    {
                    cs_team1_rounds++;
                    new message[192];
                    formatex(message, 191, "Echipa 1 a castigat runda.");
                    ShowMsg_HnsMsg(0, message, scrim);
                    }
                    else
                    {
                    cs_team2_rounds++;
                    new message[192];
                    formatex(message, 191, "Echipa 2 a castigat runda.");
                    ShowMsg_HnsMsg(0, message, scrim);
                    }
                if ((get_user_team(id == 1)&&(g_MaxScrimRounds/2) - g_ScrimRounds >5))
                    {
                    cs_team2_rounds++;
                    new message[192];
                    formatex(message, 191, "Echipa 2 a castigat runda.");
                    ShowMsg_HnsMsg(0, message, scrim);
                    }
                else    {
                    cs_team1_rounds++;
                    new message[192];
                    formatex(message, 191, "Echipa 1 a castigat runda.");
                    ShowMsg_HnsMsg(0, message, scrim);
                    }
                }

        }


Redfalcon 10-26-2009 08:06

Re: Hide-n-Seek war mod help
 
Post it in PHP.

unnyquee 10-26-2009 09:14

Re: Hide-n-Seek war mod help
 
Because there's no such function as ShowMsg_HnsMsg.

You can use this stock:
PHP Code:

stock ShowMsg_HnsMsg(indexmessage[])
{
      
client_print(indexprint_centermessage);


This will print to players, with default color (con_color cvar), a centered text.. Like "You don't have enough money", or "You can't buy more..." kind of message :)

NucL3ra 10-26-2009 14:27

Re: Hide-n-Seek war mod help
 
Actually it is in Exolent's HNS Plugin , that's the command for printing chat messages.

unnyquee 10-26-2009 14:59

Re: Hide-n-Seek war mod help
 
PHP Code:

if ((get_user_team(id == 1)&&(g_MaxScrimRounds/2) - g_ScrimRounds >5)) 

=>

PHP Code:

if ((get_user_team(id) == 1)&&(g_MaxScrimRounds/2) - g_ScrimRounds >5)) 


NucL3ra 10-26-2009 15:22

Re: Hide-n-Seek war mod help
 
I modified that one but i still don't get any chat message at the end of the round...


All times are GMT -4. The time now is 17:43.

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