AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved team score (https://forums.alliedmods.net/showthread.php?t=332393)

kww 05-09-2021 15:41

team score
 
Hi! How can I set team score? Im trying to swap teams but when I am doing it, team score remains as it is

lexzor 05-09-2021 16:36

Re: team score
 
User sv_restart or create a loop that set players score. Example of loop
PHP Code:

for(new iiNumi++)
{
    
iPlayer iPlayer[i]

    if(
is_user_connected(iPlayer))
    {
        
set_user_frags(iPlayer0)
        
cs_set_user_deaths(iPlayer0)
    }



LondoN 05-09-2021 16:44

Re: team score
 
Quote:

Originally Posted by lexzor (Post 2746388)
User sv_restart or create a loop that set players score. Example of loop
PHP Code:

for(new iiNumi++)
{
    
iPlayer iPlayer[i]

    if(
is_user_connected(iPlayer))
    {
        
set_user_frags(iPlayer0)
        
cs_set_user_deaths(iPlayer0)
    }



he said team score [rounds] not player score

Code:

enum ScoreData
{
        TERO_SCORE = 0,
        TERO_SCORE_AFTER_SWAP,
        CT_SCORE,
        CT_SCORE_AFTER_SWAP
};

new g_Score [ ScoreData ];

// later
new bool: Swap;
Swap ? g_Score [ TERO_SCORE ]++ : g_Score [ TERO_SCORE_AFTER_SWAP ]++;
Swap ? g_Score [ CT_SCORE ]++ : g_Score [ CT_SCORE_AFTER_SWAP ]++;

try this way

Bugsy 05-09-2021 21:05

Re: team score
 
You can try what's here

https://forums.alliedmods.net/showthread.php?t=155667

kww 05-10-2021 10:15

Re: team score
 
Quote:

Originally Posted by Bugsy (Post 2746406)

So it's impossible w/o Orpheu?

jimaway 05-10-2021 14:00

Re: team score
 
Quote:

Originally Posted by kww (Post 2746443)
So it's impossible w/o Orpheu?

you can change what players see in the scoreboard by sending/altering TeamScore message. this will only change it visually until server sends another message. you will also need work-around for mp_winlimit and any other server cvar that might end the game early

the orpheu solution works a lot better so i'd recommend using that


All times are GMT -4. The time now is 02:35.

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