AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] Pug Setup (v2.0.7, 2021-11-03) (https://forums.alliedmods.net/showthread.php?t=244114)

splewis 07-13-2014 21:50

[CS:GO] Pug Setup (v2.0.7, 2021-11-03)
 
1 Attachment(s)
csgo-pug-setup

This is a plugin meant to help people run pug games with their friends. Its original use case was making setting up a 10man with my friends easier, and that is the primary use case.

It also contains some addon plugins that do various others things. Read about them here: https://github.com/splewis/csgo-pug-setup#addon-plugins

Here are some in-game screenshots of what the user menus look like: http://imgur.com/a/WvHHY

The overall experience is similar to CEVO or ESEA scrim servers, and significant work was done to make it easy to install and use without needing much technical knowledge.


Please see the README on github as the primary source for information.

----------> Latest release readme <----------
Current development readme


Changelog
https://github.com/splewis/csgo-pug-...r/CHANGELOG.md

FAQ
https://github.com/splewis/csgo-pug-...sked-Questions

Note: do not pm me for support. Post here so others can help and learn from the answers.

boombee 07-14-2014 10:54

Re: [CS:GO] Pug Setup (v1.0.0, 2014-7-13)
 
Didn't try it yet, but does it print to team chat the mates' cash? Like Old zBlock

[$1234] NAME
[$1234] NAME
[$1234] NAME
[$1234] NAME
[$1234] NAME

splewis 07-14-2014 16:03

Re: [CS:GO] Pug Setup (v1.0.0, 2014-7-13)
 
Quote:

Originally Posted by boombee (Post 2167472)
Didn't try it yet, but does it print to team chat the mates' cash? Like Old zBlock

[$1234] NAME
[$1234] NAME
[$1234] NAME
[$1234] NAME
[$1234] NAME

No. The point is to make setup easier, not add helper game mechanics like money printout or damage reports.

boombee 07-14-2014 22:59

Re: [CS:GO] Pug Setup (v1.0.0, 2014-7-13)
 
Quote:

Originally Posted by splewis (Post 2167613)
No. The point is to make setup easier, not add helper game mechanics like money printout or damage reports.

Maybe add those and cvars to put enable/disable?

versatile_bfg 07-15-2014 00:33

Re: [CS:GO] Pug Setup (v1.0.0, 2014-7-13)
 
Here is the code I used with warmod and this round money plugin.

You don't have to use it but if you wanted to add it you can. =)

Does money on event round_start:

PHP Code:

#pragma semicolon 1

#include <sourcemod>
#include <sdktools>
#include <cstrike>

// Offsets
new g_iAccount = -1;

public 
Plugin:myinfo = {
    
name "Round Money [BFG]",
    
author "Versatile_BFG",
    
description "Displays team's money on round start",
    
version "0.1",
    
url "www.sourcemod.net"
};

public 
OnPluginStart()
{
    
HookEvent("round_start"Event_Round_Start);
    
g_iAccount FindSendPropOffs("CCSPlayer""m_iAccount");
}

public 
Event_Round_Start(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
the_money[MAXPLAYERS 1];
    new 
num_players;
    
    
// sort by money
    
for (new 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) > 1)
        {
            
the_money[num_players] = i;
            
num_players++;
        }
    }
    
    
SortCustom1D(the_moneynum_playersSortMoney);
    
    new 
String:player_name[64];
    new 
String:player_money[10];
    new 
String:has_weapon[1];
    new 
pri_weapon;
    
    
// display team players money
    
for (new 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) > 1)
        {
            
PrintToChat(i"\x01 \x03 Team Money");
        }
        for (new 
0num_playersx++)
        {
            
GetClientName(the_money[x], player_namesizeof(player_name));
            if (
IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == GetClientTeam(the_money[x]))
            {
                
pri_weapon GetPlayerWeaponSlot(the_money[x], 0);
                if (
pri_weapon == -1)
                {
                    
has_weapon ">";
                }
                else
                {
                    
has_weapon "\0";
                }
                
IntToMoney(GetEntData(the_money[x], g_iAccount), player_moneysizeof(player_money));
                
PrintToChat(i"\x01$%s \x04%s> \x03%s"player_moneyhas_weaponplayer_name);
            }
        }
    }
}

/**
 *  get the comma'd string version of an integer
 * 
 * @param  OldMoney            the integer to convert
 * @param  String:NewMoney    the buffer to save the string in
 * @param  size                the size of the buffer
 * @noreturn
 */

stock IntToMoney(OldMoneyString:NewMoney[], size)
{
    new 
String:Temp[32];
    new 
String:OldMoneyStr[32];
    new 
tempChar;
    new 
RealLen 0;

    
IntToString(OldMoneyOldMoneyStrsizeof(OldMoneyStr));

    for (new 
strlen(OldMoneyStr) - 1>= 0i--)
    {
        if (
RealLen == && RealLen != strlen(OldMoneyStr) && != strlen(OldMoneyStr)-1)
        {
            
tempChar OldMoneyStr[i];
            
Format(Tempsizeof(Temp), "%s,%s"tempCharTemp);
        }
        else
        {
            
tempChar OldMoneyStr[i];
            
Format(Tempsizeof(Temp), "%s%s"tempCharTemp);
        }
        
RealLen++;
    }
    
Format(NewMoneysize"%s"Temp);
}

public 
SortMoney(elem1elem2, const array[], Handle:hndl)
{
    new 
money1 GetEntData(elem1g_iAccount);
    new 
money2 GetEntData(elem2g_iAccount);
    
    if (
money1 money2)
    {
        return -
1;
    }
    else if (
money1 == money2)
    {
        return 
0;
    }
    else
    {
        return 
1;
    }


Could be an easier way to do it. I was done by 1260 with his original GameTech Warmod.

Pan32 07-24-2014 20:34

Re: [CS:GO] Pug Setup (v1.0.0, 2014-7-13)
 
Getting this bug:

L 07/24/2014 - 17:10:10: [SM] Native "FormatTime" reported: Invalid time format or buffer too small
L 07/24/2014 - 17:10:10: [SM] Displaying call stack trace for plugin "pugsetup.smx":
L 07/24/2014 - 17:10:10: [SM] [0] Line 358, csgo/addons/sourcemod/scripting/pugsetup.sp::Command_Start()
L 07/24/2014 - 17:10:10: [SM] [1] Line 609, csgo/addons/sourcemod/scripting/pugsetup.sp::ReadyToStart()
L 07/24/2014 - 17:10:10: [SM] [2] Line 225, csgo/addons/sourcemod/scripting/pugsetup.sp::Timer_CheckReady()

splewis 07-24-2014 21:00

Re: [CS:GO] Pug Setup (v1.0.0, 2014-7-13)
 
Quote:

Originally Posted by Pan32 (Post 2173256)
Getting this bug:

L 07/24/2014 - 17:10:10: [SM] Native "FormatTime" reported: Invalid time format or buffer too small
L 07/24/2014 - 17:10:10: [SM] Displaying call stack trace for plugin "pugsetup.smx":
L 07/24/2014 - 17:10:10: [SM] [0] Line 358, csgo/addons/sourcemod/scripting/pugsetup.sp::Command_Start()
L 07/24/2014 - 17:10:10: [SM] [1] Line 609, csgo/addons/sourcemod/scripting/pugsetup.sp::ReadyToStart()
L 07/24/2014 - 17:10:10: [SM] [2] Line 225, csgo/addons/sourcemod/scripting/pugsetup.sp::Timer_CheckReady()

Does the server happen to be running Windows? I suspect that the time formatting may not support as many specifiers on windows - I usually only test on Linux servers.

Pan32 07-24-2014 22:08

Re: [CS:GO] Pug Setup (v1.0.0, 2014-7-13)
 
Indeed, I'm running on a windows machine. The bug itself seems to be whenever everyone is ready, the game just doesn't start.

splewis 07-24-2014 22:11

Re: [CS:GO] Pug Setup (v1.0.0, 2014-7-13)
 
Quote:

Originally Posted by Pan32 (Post 2173293)
Indeed, I'm running on a windows machine. The bug itself seems to be whenever everyone is ready, the game just doesn't start.

It's an easy fix with changing the time formatting. I should have a 1.1 tonight. :)

In the meantime, you can disable the demo recording cvar and it will work normally.

Pan32 07-24-2014 22:15

Re: [CS:GO] Pug Setup (v1.0.0, 2014-7-13)
 
Quote:

Originally Posted by splewis (Post 2173297)
It's an easy fix with changing the time formatting. I should have a 1.1 tonight. :)

In the meantime, you can disable the demo recording cvar and it will work normally.

Since you're updating, could you add a extra option on the plugin to set a password to be executed on lo3? I know you can do it through standard.cfg, but would be easy to control so.

EDIT: actually, everytime you go live and the passworg gets setted up, it seems like it always gets reset to none.


All times are GMT -4. The time now is 07:19.

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