Giter Site home page Giter Site logo

splewis / csgo-pug-setup Goto Github PK

View Code? Open in Web Editor NEW
413.0 413.0 93.0 1.63 MB

CS:GO Sourcemod plugin for setting up private pug/10man games

License: GNU General Public License v3.0

SourcePawn 99.52% Python 0.48%
counter-strike counter-strike-global-offensive csgo sourcemod

csgo-pug-setup's People

Contributors

andersodt avatar antipaste avatar atakanb avatar blakebill avatar borzaka avatar commanche2 avatar crashzk avatar extremelyd1 avatar ferks-fk avatar fiatjaf avatar hackebein avatar hibari233 avatar icyjan avatar ipsingh06 avatar jkroepke avatar jonbons avatar kartik727 avatar ledenmat avatar matias49 avatar moritzloewenstein avatar mumixam avatar nikolya-prodigy avatar ruaabbit avatar sanjaysrocks avatar savage93 avatar splewis avatar technoblazed avatar the-doggy avatar thetolek14 avatar zoidyzoidzoid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csgo-pug-setup's Issues

Snake team selection

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

When is the next release?

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.

Generic .setup configuration

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.

Live match - still able to set ready status

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.

Client i is not in game

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

Bug with pug leader.

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.

.pause qquestion

i think it would be appropriate to freeze all the players when the game is paused.

Demo directory

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 :(

Capt veto map issues

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

Optional vote for playing out overtime

Ideas:

  • enabled with 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)
  • also use 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)
  • pause with setting mp_overtime_halftime_pausetimer 1 while the vote is going on to pause clients on the regulation time panel

Auto demo recording

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

pugsetup.cfg and Knife rounds

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,

Better veto panel

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.

Translations

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.

Auto random teams?

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?

suggestion save leaver money to new player connection

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

problem liveon3

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

Ready system counts spectators

The ready system counts people who are spectating. Eg if there's 2 spectators the system will need 12 people to ready up.

map change , team swap vote and player color

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.
5632-radar

Mumble/teamspeak team mover

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.

Change file hierarchy to csgo default file hierarchy

Hi,

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

fail

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

Not working

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

this my code ok? i'm new in sourcemod i'm coding leaver ban and Substitution

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

Optional team locking cvar

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

chataliases.cfg isnt read

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 ;)

.pause

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.

Knife Rounds

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.

teamlocker bug

teamlocker bug player still can join 6v5 6v6 when set pugmaxplayer 5v5

CS GO PUG

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.