splewis / csgo-pug-setup Goto Github PK
View Code? Open in Web Editor NEWCS:GO Sourcemod plugin for setting up private pug/10man games
License: GNU General Public License v3.0
CS:GO Sourcemod plugin for setting up private pug/10man games
License: GNU General Public License v3.0
Hello, I have a server and I have a problem to find demo's directory. Before pug starts I setup the demo recorder on but when I see after the match I don't find any demo files.
Ps: This is a rent server and sorry for my bad english :(
autosetup not work when changelevel via console or admin force changelevel
Instead of the second half starting immediately, allow for a second warmup period where each player needs to ready up again.
I found a few plugins that sent client commands to join a mumble server/channel specified by the game server: https://forums.alliedmods.net/showthread.php?t=111113
Unfortunately, the steam browser was changed some years ago, which means this method will not work.
An alternative approach may be some program running elsewhere. Mumble has some pretty nice API support for third party programs. See: Ice and Mumo.
My initial guess is that the game server would expose some cvar saying it wants players moved that is read by another program (through rcon?) which talks to Mumble and moves players.
I have no experience with this type of thing, so I don't see myself getting it done anytime soon. It may be worth being a separate project entirely.
After switching the teams to spectator so the captains can select them, if a person joins and he was not in the server before, he is able to join any team.
Hello,
Why give me this error
pugsetup.sp(26) : error 139: could not find type "ConVar"
pugsetup.sp(27) : error 139: could not find type "ConVar"
pugsetup.sp(28) : error 139: could not find type "ConVar"
pugsetup.sp(29) : error 139: could not find type "ConVar"
pugsetup.sp(30) : error 139: could not find type "ConVar"
pugsetup.sp(31) : error 139: could not find type "ConVar"
pugsetup.sp(32) : error 139: could not find type "ConVar"
pugsetup.sp(33) : error 139: could not find type "ConVar"
pugsetup.sp(34) : error 139: could not find type "ConVar"
pugsetup.sp(35) : error 139: could not find type "ConVar"
pugsetup.sp(36) : error 139: could not find type "ConVar"
pugsetup.sp(37) : error 139: could not find type "ConVar"
pugsetup.sp(38) : error 139: could not find type "ConVar"
pugsetup.sp(39) : error 139: could not find type "ConVar"
pugsetup.sp(40) : error 139: could not find type "ConVar"
pugsetup.sp(41) : error 139: could not find type "ConVar"
pugsetup.sp(42) : error 139: could not find type "ConVar"
pugsetup.sp(43) : error 139: could not find type "ConVar"
pugsetup.sp(44) : error 139: could not find type "ConVar"
pugsetup.sp(45) : error 139: could not find type "ConVar"
pugsetup.sp(46) : error 139: could not find type "ConVar"
pugsetup.sp(47) : error 139: could not find type "ConVar"
pugsetup.sp(48) : error 139: could not find type "ConVar"
pugsetup.sp(49) : error 139: could not find type "ConVar"
pugsetup.sp(50) : error 139: could not find type "ConVar"
pugsetup.sp(51) : error 139: could not find type "ConVar"
I don't understand..
Regards,
Joob
I saw this plugin: https://forums.alliedmods.net/showthread.php?t=250224
And I realized I could make a .ready alias, that instead of calling Command_Ready, does the sm_ready command. This would simplify some code.
Hello @splewis , I have some ideas/tweaks
First one is about map change : After the mapvote, if the voted map is the same as the current map, the map won't changed again. Eg : The current map is de_dust2 and the players vote for de_dust2. In this case the map won't be changed in de_dust2, because de_dust2 is the current map
Second one : After the knife round, start a vote for swap/stay. Sometimes players argue on staying/swapping teams so this would be useful ...
Third one : I noticed that sometimes, after randomizing teams, there are 2 players with the same color. What I mean by that ? By default each player should have a different color , to be easily distinguished by the teammates. If 2 players have the same color, it might be confusing sometimes.
E.g. the leader gets a menu for each player, deciding which team they go on.
Might need an extra command to undo mistakes.
I'd like the server not to change map if a map vote brings the vote to the active map.
Hi, Good stuff!
I've been using your plugin. In order to use the knife round cvar I have to manually compile the .sp with the cvar='1' ? It seems to break the plugin when I do it.
Also, the pugsetup file is not generated.
lslima,
e.g. in gametypes.cfg
instead of
"Normal"
{
"config" "standard.cfg"
"maplist" "standard.txt"
}
"Normal"
{
"config" "standard.cfg"
"collection" "12345678"
}
@splewis As I said in the title, I translated the phrases to Romanian
Here they are : http://pastebin.com/egMYN4hv
When a match is live and underway, players can type .ready and it will set their status to [ready]. I did not test .unready but I'm assuming it still does the same thing since it is handled the same way .ready is. This is probably just a cosmetic bug for the scoreboard and is likely not to be a pressing issue.
However, I am unsure if when all 10 players ready up the match might Lo3 again / vote for a map / or capt veto the map/ etc. I haven't had a chance to test this and only found out about it last night in the middle of a match.
Hello,
I was wondering if i could get some help with the CS:GO pug server install. I have followed your guide, but the server isn't working. I don't see anywhere the "pugsetup.cfg" I think that is where my issue is. Can i please get assistance with this?
i think it would be appropriate to freeze all the players when the game is paused.
On rare occasions after team-swapping the defuse kit is greyed out (on the buywheel) for CT's.
Here is a screenshot: http://steamcommunity.com/id/splewis/screenshot/526128624943333840
(note that it even errors for a T here, the CTs see the same thing)
I was unable to get custom chat triggers to work in game so i added some LogMessage()
's to the code where chataliases.cfg is read and noticed some issues with reading the keyvalues. I fooled around with it but was unable to get it to traverse the keyvalues properly. I was also wonder why kv.JumpToKey("maps")
is in there. I look forward to seeing your fix as ive spent too much time trying to get it work ;)
change cvar sm_pugsetup_maplist from console still get old map list
I have the same issue as the previous guy. I have everything that i have downloaded in the right folders but i dont seem to have the pugsetup.cfg
Im not really good with all this, any help would be wonderfull
Thanks
suggestion save leaver money to new player connection
when some player leaver from pug and new player connect replace slot leaver player it start with 800 gold can replace player get money equal leaver player ?
sry i'm bad english
thank for consider
Simulating .setup with the following commands:
this my code good ? i'm new in sourcemod i'm coding leaver ban and Substitution
what should i fix ? in code plugin work but i need idea to code sourcemod if my code bad
what line i need to fix ? can you guide me to improve plugin
for goal plugin
if someone leaver count timer 120 sec if not reconnect or have new player replace [] leaver player will get banned 2 hr
and have Substitution Example. if game on live 5v5 i'm open server 12 [] 2 player on spectator can type .sub to queue for play game if someone in live game leaver or dc
#pragma semicolon 1
#define DEBUG
#define PLUGIN_AUTHOR "paruru"
#define PLUGIN_VERSION "1.01"
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include "include/pugsetup.inc"
#include "pugsetup/generic.sp"
Handle hasTimer[MAXPLAYERS+1];
int Sub[2];
/** ConVar handles **/
ConVar BanEnable;
public Plugin myinfo =
{
name = "ARG Ban and Substitution",
author = PLUGIN_AUTHOR,
description = "eiei",
version = PLUGIN_VERSION,
url = "paruru"
};
public void OnPluginStart()
{
BanEnable = CreateConVar("arg_ban", "1", "Whether the plugin is enabled");
AutoExecConfig(true, "arg_ban", "sourcemod/arg");
/** hook **/
HookEvent("player_disconnect", Event_PlayerDisconnect);
RegConsoleCmd("sm_sub", Sub);
AddChatAlias(".sub", "sm_sub");
RegConsoleCmd("sm_unsub",Unsub);
AddChatAlias(".unsub", "sm_unsub");
Sub[1] = null;
Sub[2] = null;
}
public void OnClientConnected(int client) {
if(!IsMatchLive())
return;
if(hasTimer[client] != INVALID_HANDLE)
{
KillTimer(hasTimer[client]); // kill timer dc timer when new player connect
hasTimer[client] = INVALID_HANDLE;
}
}
public Action Event_PlayerDisconnect(Handle event, const char[] name, bool dontBroadcast) {
if (!IsMatchLive())
return;
if(GetConVarInt(BanEnable) != 1)
return;
int userid = GetEventInt(event, "userid");
int client = GetClientOfUserId(userid);
int team = GetClientTeam(client);
if (team != CS_TEAM_T && team != CS_TEAM_CT)
return;
char auth[64];
GetClientAuthId(client, AuthId_Steam2, auth, sizeof(auth));
if(Sub[1] != null) //check if have Substitution in 1st queue
{
ChangeClientTeam(Sub[1], team); // change team 1st queue to dc player team
if(Sub[2] != null) //check if have 2nd queue
{
Sub[1] = Sub[2]; //move 2nd to first queue
Sub[2] = null;
}
else
{
Sub[1] = null;
}
}
else
{
Handle pack;
hasTimer[client] = CreateDataTimer(120.0, AfterAutoBalance, pack); //create timer count 2min if not reconnect or haven't new player replace slot
WritePackCell(pack, client);
WritePackString(pack, auth);
PugSetupMessageToAll("%s จะถูกแบนเป็นเวลา 2 ชม ถ้าไม่กลับมาเล่นหรือมีคนเข้ามาแทน",auth);
}
}
public Action AfterAutoBalance(Handle timer,Handle pack)
{
char auth[64];
int client;
ResetPack(pack);
ReadPackCell(pack);
ReadPackString(pack, auth, sizeof(auth));
ServerCommand("sm_addban 120 \"%s\" \"Left during live match\"", auth); // bannnnn
PugSetupMessageToAll("{LIGHT_RED}%s{NORMAL} ถูกแบนเป็นเวลา {LIGHT_RED}2{NORMAL} ชม เนื่องจากออกระหว่างการแข่งขัน",auth);
hasTimer[client] = INVALID_HANDLE;
}
public Action Sub(int client,int args)
{
if (!IsMatchLive())
{
PugSetupMessage(client,"ใช้ได้เฉพาะช่วงการแข่งขันเริ่มเท่านั้น"); //can use only live game
return Plugin_Handled;
}
if(GetClientTeam(client) != CS_TEAM_SPECTATOR) //check only spectator can use .sub
return Plugin_Handled;
if(Sub[1] == client || Sub[2] == client) // check if client in Substitution already
return Plugin_Handled;
char name[100];
GetClientName(client, name, sizeof(name));
if (Sub[1] == null)
{
Sub[1] = client;
PugSetupMessageToAll("{LIGHT_GREEN}%s {NORMAL}ได้สมัครเป็นตัวสำรอง",name); // make 1st queue Substitution
return Plugin_Handled;
}
else {
Sub[2] = client;
PugSetupMessageToAll("{LIGHT_GREEN}%s {NORMAL}ได้สมัครเป็นตัวสำรอง",name); // make 2nd queue Substitution
return Plugin_Handled;
}
return Plugin_Handled;
}
public Action Unsub(int client,int args)
{
if(GetClientTeam(client) != CS_TEAM_SPECTATOR)
return Plugin_Handled;
if(Sub[1] != client || Sub[2] != client)
return Plugin_Handled;
char name[100];
GetClientName(client, name, sizeof(name));
if (Sub[1] == client)
{
Sub[1] = null;
PugSetupMessageToAll("{LIGHT_GREEN}%s {NORMAL}ได้ยกเลิกเป็นตัวสำรอง",name); // un Substitution who in 1st queue
return Plugin_Handled;
}
else {
Sub[2] = null;
PugSetupMessageToAll("{LIGHT_GREEN}%s {NORMAL}ได้ยกเลิกเป็นตัวสำรอง",name); //un Substitution who in 2nd queue
return Plugin_Handled;
}
return Plugin_Handled;
}
sry i'm not good english
I'm not sure if anyone is interested in having translation-support in this. If so, let me know and I'll work on it.
When a map veto is being used, the captains get menus. The other players also get a menu of maps left, just for information purposes.
It should be possible to change that menu into just a display panel, which would be less confusing for players.
The team locker plugin: https://github.com/splewis/csgo-pug-setup/blob/master/scripting/pugsetup_teamlocker.sp
doesn't actually lock teams, and I have no idea why.
The idea for it is to block a team change if the destination team is "full", where full means having /2 the max players in the match.
Is it possible to automatically random the teams and go straight to the map veto/selection without picking a captain or needing a player to set-up once there are 10 people on the server?
Hi,
this error is trow on server console:
Version: master@6eb33f0482428c018736995e458928cff713f685
Dropped playername from server: Sorry, this pug is full.
L 12/23/2014 - 20:39:33: [SM] Plugin encountered error 25: Call was aborted
L 12/23/2014 - 20:39:33: [SM] Native "ThrowError" reported: Client 5 is not in game
L 12/23/2014 - 20:39:33: [SM] Displaying call stack trace for plugin "music.smx":
L 12/23/2014 - 20:39:33: [SM] [0] Line 65, D:\Program Files\Git\plugin\▒▒▒▒▒▒\include\csgocolors.inc::CPrintToChat()
L 12/23/2014 - 20:39:33: [SM] [1] Line 81, C:\Users\Ȥ\Downloads\music.sp::Timer_WelcomeMessage()
L 12/23/2014 - 20:39:46: [pugsetup.smx] winner=2, waiting=0
Going to intermission...
Hello, thanks for this great plugin,
Currently I'm still experiencing a bug where the pug leader is not set correctly after finishing the setup process. I'ts on version 1.4.1
Also, is it possible to add a bo3 map veto? If these 2 things can be done then it's just perfect!
Thanks for the hard work.
it draft player before veto (from latest source)
old it veto before draft
it make match can't play after changemap
e.g.
sm_pugsetup_lockteams 0/1
When 1, team joins check:
if we're in a 10man team selection - block it
if the game is live and the player is swapping teams - block it
if the game is live and the team being switched to has >= 5 (or nplayers/2) players
Oftentimes in our pugs the captain with the first pick gets too large of an advantage. One possible solution to this is to offer different player draft orders -- like a snake draft (1- 2 - 2 - 2- 2 -1).
Just an idea...
Ive noticed a issue when using capt veto maps after all the maps are veto'd and the server changes to the last remaining map, its like the plugin was reset, you have to do .setup again
A few people have requested it.
tag add every player join
teamlocker bug player still can join 6v5 6v6 when set pugmaxplayer 5v5
I have a few servers setup to load default settings with random teams on player join. Would it be possible to restrict the .setup and .10man commands to sourcemod admins only?
I'd like to know if it's possible to add a cvar that tells the script to make a pause vote? If one team calls pause the other team must reply.
This could be done by any player and is not restricted by .setup (leader) or captains.
Ability to have knife rounds before game starts, captains may choose their sides. Whoever wins may be able to choose to start on the Counter-Terrorist or Terrorist side.
sm_pugsetup_rws_display_on_menu not working it not show rws on captain draft menu
The ready system counts people who are spectating. Eg if there's 2 spectators the system will need 12 people to ready up.
Ideas:
sm_pugsetup_overtime_vote
to control whether a vote is done. If set to 0, the game proceeds normally (overtime played out depending on mp_overtime_enable)sm_pugsetup_overtime_ratio
to control the ratio of votes needed to have a successful overtime vote (e.g. .50 is majority, 1.0 is unanimous)mp_overtime_halftime_pausetimer 1
while the vote is going on to pause clients on the regulation time panelHi,
i prefer to extract a archiv 'as-is' without moving file around after extraction, like metamod and source archives.
Move follow files:
cfg/sourcemod/pugsetup -> csgo/cfg/sourcemod/pugsetup
configs/pugsetup -> csgo/addons/sourcemod/configs/pugsetup
scripting -> csgo/addons/sourcemod/scripting
translations -> csgo/addons/sourcemod/translations
With this it is easier to deploy servers with automation.
Cheers,
Jan
I'd like to have other ways to store player rws other than just clientprefs https://github.com/splewis/csgo-pug-setup/blob/master/scripting/pugsetup_rwsbalancer.sp
Not everyone has access to get SQLite running on a game server or wants to set up a MySQL server everywhere.
Potential additional storage schemes: (probably to be selectable by cvar)
Give the player a menu with a few things: game type (if we should do 10 man style team selection or allow players to set teams), players per team (1,2,3,5), which game config to execute (put them in cfg/sourcemod/team select), how map should be selected.
When do you release the next version of the plugin? I want to test it in a server to search any spanish translation fail and correct it.
GetTime returns a 32-bit timestamp.
Could also ask the .setup player to name the demo. (or ask if they want the demo)
The commands would be:
tv_record pug_mapname_time
Hello,
I have this errors when I compiled the file..
pugsetup/liveon3.sp(3) : error 017: undefined symbol "g_InStartPhase"
pugsetup/liveon3.sp(6) : error 017: undefined symbol "g_hOnGoingLive"
pugsetup/liveon3.sp(11) : error 017: undefined symbol "IsPlayer"
pugsetup/liveon3.sp(12) : error 017: undefined symbol "UpdateClanTag"
pugsetup/liveon3.sp(16) : error 017: undefined symbol "g_hQuickRestarts"
pugsetup/liveon3.sp(18) : error 017: undefined symbol "PugSetupMessageToAll"
pugsetup/liveon3.sp(31) : error 017: undefined symbol "g_InStartPhase"
pugsetup/liveon3.sp(34) : error 017: undefined symbol "PugSetupMessageToAll"
pugsetup/liveon3.sp(42) : error 017: undefined symbol "g_InStartPhase"
pugsetup/liveon3.sp(45) : error 017: undefined symbol "PugSetupMessageToAll"
pugsetup/liveon3.sp(51) : error 017: undefined symbol "g_InStartPhase"
pugsetup/liveon3.sp(54) : error 017: undefined symbol "g_MatchLive"
pugsetup/liveon3.sp(54) : warning 215: expression has no effect
pugsetup/liveon3.sp(55) : error 017: undefined symbol "g_InStartPhase"
pugsetup/liveon3.sp(55) : warning 215: expression has no effect
pugsetup/liveon3.sp(56) : error 017: undefined symbol "g_hOnLive"
pugsetup/liveon3.sp(60) : error 017: undefined symbol "PugSetupMessageToAll"
Regards,
Joob
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.