Raised This Month: $51 Target: $400
 12% 

Change winning rounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
theuser
Member
Join Date: Jul 2020
Old 09-16-2020 , 07:17   Change winning rounds
Reply With Quote #1

Hello
Is there a plugin that can change a team's winning rounds?
For example, with the Amx_Tr_Win "5" command, we can change tr wins round to 5


Last edited by theuser; 09-16-2020 at 07:19.
theuser is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 08-10-2021 , 23:13   Re: Change winning rounds
Reply With Quote #2

PHP Code:
#include <amxmodx>
#define PLUGIN "Set team scores"
#define AUTHOR "Alliedmods SEARCH function"
#define VERSION "1.0"

new gTeamScore;
new 
Score[2];

public 
plugin_init()
{
    
gTeamScore get_user_msgid("TeamScore"// Assign gTeamScore to the msgid that gets sent to the client.
    
set_msg_block(gTeamScoreBLOCK_SET// We block it, so the server doesn't send it when we don't want to.
    
register_clcmd"setscore""cmd_Setscore"ADMIN_KICK"<T> <CT> (sets score)"); // Register clcmd.
}

public 
cmd_Setscore() // If you want to, you can also pass an id here and print the info only to the command user.
{
    new 
arg[32], arg1[32];
    
read_argv1arg31 );
    
read_argv2arg131 );
    new 
l_scoreT str_to_num(arg);
    new 
l_scoreCT str_to_num(arg1);
    
Score[0] = l_scoreT;
    
Score[1] = l_scoreCT;
    
SetScore();
    
client_print(0print_chat"TEAM T = %i | TEAM CT = %i"l_scoreTl_scoreCT); // feel free to comment this out, or/and modify it as you want.
}

public 
SetScore(){ // Credits to somebody else, found on alliedmodders by SEARCHING (incredible technology, right?)
    
message_begin(MSG_ALL,gTeamScore
    
write_string("TERRORIST")
    
write_short(Score[0])
    
message_end()
    
message_begin(MSG_ALL,gTeamScore
    
write_string("CT")
    
write_short(Score[1])
    
message_end()
    } 
Usage: setscore x x
first number being for T's and second for CT's.


->> Credits for the msg stuff: https://forums.alliedmods.net/showthread.php?t=233339
__________________

Last edited by deprale; 08-10-2021 at 23:16.
deprale is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-11-2021 , 02:11   Re: Change winning rounds
Reply With Quote #3

Just to be clear this won't change the team actual winning amount.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 08-11-2021 , 21:49   Re: Change winning rounds
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
Just to be clear this won't change the team actual winning amount.
Yes it's just visual, forgot to include that, I think he already has a "PUG" mod, judging by his post history at least... he probably counts rounds with his own variable but doesn't know how to modify the scoreboard visually, based on these assumptions I provided this code.
__________________
deprale is offline
Reply



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 16:16.


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