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

PUGMod Lite 0.0.5


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
CookieCrumbler
Senior Member
Join Date: Feb 2013
Location: Australia
Old 02-10-2018 , 11:25   PUGMod Lite 0.0.5
Reply With Quote #1

PUGMod Lite v 0.0.5
Basic functionally for administrating a PUG / SCRIM
Comes with some cool features such as ;

Auto Spectator on Connect -The MOTD and Team Select menu are both blocked on connect and player is auto sent to Spectator.

Team Lock 5v5 - Specs can't join a team when there is 5 players on each team ( 5 CT's and 5 T's ). Specs can sub in if someone leaves.

Shield Blocked - Players cannot buy shield.

Players can Switch between CS 1.6 and CS 1.5 KNIFE by typing /knife in chat.

Teams auto switch [ CT to T & T to CT ] when /ht and all 4 /ot say commands are executed.

CS 1.5 Fast Sniper Switch (Awp/Scout Fast Switch)


Installations & Requirements
AMXMODX 1.8.3 Dev Branch

Must install Deagles' Map Manager v3.25Beta for /vote to work.
/vote executes dmap_rockthevote which force the vote.
If you dont want to use deagsmapmanager change dmap_rockthevote to amx_mapvote in the .sma

Commands

[ All Players ]
/knife Type to switch back and forth between CS1.6 and CS1.5 Knife.

[ Admins with ban flag ]
/rs Execs sv_restartround
/lo3 Exes lo3.cfg
/ht Exes ht.cfg
/ot Exes ot1.cfg
/ot2 Exes ot2.cfg
/ot3 Exes ot3.cfg
/ot4 Exes ot4.cfg
/at Turns Alltalk on - Everyone can talk to eachother
/ato Turns Alltalk off - Only teamates can talk to eachother
/maps Opens amx_mapmenu
/vote Executes dmap_rockthevote to rock the vote with Deagsmapmanager or you can change this in the code to use amx mapvote

New Features Coming Soon
-Optimize code & Fix loose indentations
-ADD Dead Team Talk - Dead and alive players on the same team can voice chat with and hear eachother.
-Add /captain

*Add /Start to automate the entire match & Code entire match sequencing
*Admin types /start and all players are moved to spectator. Team Locker CVAR switches to 0 T and 0 CT to prevent players joining a team.
*Admin who typed start is presented with a menu to select Captain for each team.
*Teams Locked to 1 T and 1 CT
Once there is 1 player on each team ;
*Round Restart * Print MSG * auto execute knife round
*On knife round end auto exec lo3
*After 15 rounds auto swap the teams and auto execute second round
*After 30 rounds if its a tie auto swap the teams and auto execute overtime round.
*After either 3 rounds (mr3) or 5 rounds (mr5) auto swap the teams and execute the second half of overtime
*Print scores in chat at halftime and overtime halftime


Change Log
Code:
v.0.0.5 Current Version
Added CS 1.5 Fast Sniper Switch (Awp/Scout Fast Switch)
Credit: MPNumB -Fast Sniper Switch (Awp Fast Switch)


v.0.0.4
Added swap team code when /ht and all the /ot's are executed

v.0.0.3
Added Block Shield

v.0.0.2 
Integrated PUG Auto Spec on Connect & 5v5 Team lock

v.0.0.1 First Version

You MUST CREATE and PUT a lo3.cfg , ht.cfg , ot.cfg , ot1.cfg , ot2.cfg, ot3.cfg , ot4.cfg
file in your cstrike directory
Attached Files
File Type: sma Get Plugin or Get Source (pugmod_lite.sma - 884 views - 11.9 KB)
__________________
--------------------------------------------------
C is for cookie ... thats good enuff 4 me

Last edited by CookieCrumbler; 03-23-2018 at 20:47.
CookieCrumbler is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-10-2018 , 16:48   Re: PUGMod Lite 0.0.3
Reply With Quote #2

Is PUG Mod sort of a competitive type game mode like in CS:GO?
__________________
Relaxing is offline
CookieCrumbler
Senior Member
Join Date: Feb 2013
Location: Australia
Old 02-10-2018 , 21:32   Re: PUGMod Lite 0.0.3
Reply With Quote #3

Quote:
Originally Posted by Relaxing View Post
Is PUG Mod sort of a competitive type game mode like in CS:GO?
PUG just means pick up game, Its basically 5v5 competitive cs.



**UPDATE** 11th February 2018


Plugin has been updated to v 0.0.5
Added fast sniper switch like in Counterstrike 1.5
* Fast Sniper Switch (AWP Fast Switch) by Numb
* Description:
* This plugins brings back the old feature from CS1.5 times. You were able to shoot a bullet with AWP or Scout, switch to Knife , and then switch back to AWP and shoot again faster .
* In result you get that you can fire your next bullet faster than
* if you would have waited for original bullet 'reload'.


Plugin has been updated to v 0.0.4
Added Code to auto swap teams at halftime and also all 4 of the overtimes.
Blocked shield.
__________________
--------------------------------------------------
C is for cookie ... thats good enuff 4 me

Last edited by CookieCrumbler; 02-11-2018 at 09:38.
CookieCrumbler is offline
Hectik17
AlliedModders Donor
Join Date: Oct 2005
Old 02-13-2018 , 21:08   Re: PUGMod Lite 0.0.5
Reply With Quote #4

Looks like your on the way to a good pug mod. Once you add all the future updates it would be good to get a hltv auto rec and auto upload to a host for making demos of epic pugs. GL man
Hectik17 is offline
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 02-14-2018 , 03:19   Re: PUGMod Lite 0.0.5
Reply With Quote #5

It would be nice that if you add this feature:
When all the players in the server ( with/without admin ) has typed /ready in the chat then the match will start automatically. And does all the executions by itself. Most pugs have this and I do think it's an IMPORTANT feature
WhiteFang1319 is offline
Schoolbus
New Member
Join Date: Jan 2018
Old 02-14-2018 , 05:32   Re: PUGMod Lite 0.0.5
Reply With Quote #6

Thanks for the plugin, although I found it's not really necessary to install. The one function I need is "CS 1.5 Fast Sniper Switch (Awp/Scout Fast Switch)"
__________________
"If you have the opportunity to play this game of life you need to appreciate every moment. a lot of people don't appreciate the moment until it's passed."
- Kanye West -
Schoolbus is offline
shady101
Member
Join Date: Nov 2014
Location: USA
Old 02-14-2018 , 12:02   Re: PUGMod Lite 0.0.5
Reply With Quote #7

this seems promising. Would love to see that new features list done. Been looking for a good pug mod didn't think anyone was gonna make one
shady101 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 02-14-2018 , 18:30   Re: PUGMod Lite 0.0.5
Reply With Quote #8

It would be easier if you switched all "if (get_user_flags (id) & ADMIN_BAN) {"
for a macro like this:

#define isAdmin (% 1) (get_user_flags (% 1) & ADMIN_BAN)

example:

public overtime_three (id) {
if(isAdmin(id)) {
server_cmd("amx_swapteams")
set_task(0.8, "overtimethree", id)
}
}
iceeedr is offline
Send a message via Skype™ to iceeedr
CookieCrumbler
Senior Member
Join Date: Feb 2013
Location: Australia
Old 02-17-2018 , 04:31   Re: PUGMod Lite 0.0.5
Reply With Quote #9

Here is a bit of scrap work that i have been working on so far.

I am going to implement both a mechanism for people who only want admins to be able to create a lobby and another method that lets server owners let anyone start a lobby.

Also i will probably change this from the first 2 to join are captain(how it is now) to a vote for captain while they are in the lobby state.


PHP Code:
#include <amxmodx>
#include <cstrike>
#include <amxmisc>

#define PLUGIN "FutureGN PUGMod Match Sequencing"
#define VERSION "0.1"
#define AUTHOR "FutureGN"

new gamestate 0t_ready_players 0ct_ready_players 0round_start_counter 0round_end_counter 0first_a_score 0first_b_score 0sec_a_score 0sec_b_score 0total_a_score 0total_b_score 0

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /start""start_pug"ADMIN_ALL"Start PUGMod");
    
register_clcmd("say /stop""stop_pug"ADMIN_ALL"Stop PUGMod");
    
register_clcmd("say /ready""ready");
    
register_concmd("pug_team_swap""pug_swap"ADMIN_ALL);
    
    
register_event("TeamScore""team_score""a");
    
register_logevent("EventRoundStart"2"1=Round_Start");
    
register_logevent("EventRoundEnd"2"1=Round_End");
}

public 
start_pug(id) {
    new 
players get_playersnum()
    
    if(
gamestate >= ) {
    
server_cmd("say GAME in progress. Type /stop to cancel current game")
    return 
PLUGIN_HANDLED
    
}
    
    if(
players <= 9) {
    
server_cmd("say There is not enough people to start a PUG. 10 people required.");
    return 
PLUGIN_HANDLED
    
}

    if(
players >= 10) {
    
gamestate 1
    server_cmd
("pug_spec")
    
server_cmd("pug_team_limit 1")
    
server_cmd("sv_alltalk 1")
    
server_cmd("mp_roundtime 6")
    
server_cmd("sv_restart 1")    
    
client_print_color(idprint_team_red"^1 PUGMod started. ^4 All Players have been moved to Spectator. ^3 Alltalk is ON ^1 until the Game goes Live.")
    
client_print_color(idprint_team_red,"^3Lobby created. ^4First two people to join a team are captains.")
    
client_print_color(idprint_team_grey,"^3Both Captains must type /ready to commence the game")
    return 
PLUGIN_HANDLED
    
}
return 
PLUGIN_CONTINUE;   
}

public 
ready(id)
{
    if(
gamestate <= 3)
    {
        if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            
t_ready_players++
        }   
        
        
        if(
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
ct_ready_players++
        }   
        
        
        if(
gamestate == && t_ready_players == && ct_ready_players == )
        {
            
set_task(0.1"knife_round")
        }
        
        if(
gamestate == && t_ready_players == && ct_ready_players == 5) {
            
set_task(0.1"liveonthree")
        }
    }
}

public 
EventRoundStart(id)
{
    
round_start_counter++
    
total_a_score first_a_score sec_a_score
    total_b_score 
first_b_score sec_b_score

    
//* KNIFE ROUND *//
    
if(gamestate == && round_start_counter 1) {
        if(
first_a_score == 1) {
        
client_print_color(idprint_team_blue"^4The ^3CT Captain ^4won. ^4You pick the first teammate.")
        }
        if(
first_b_score == 1) {
        
client_print_color(idprint_team_red"^4The ^3T Captain ^4won. ^4You pick the first teammate.")
        }
        
gamestate 3
        server_cmd
("pug_team_limit 5")
        
client_print_color(idprint_team_red"^4Game will go ^3LIVE ^4once all 10 players type ^3 /ready")
    
        
t_ready_players 0
        ct_ready_players 
0
    
}
    
    
//* ROUND START COUNTER AND SCORE PRINT EVERY ROUND BETWEEN 1 AND 42  *//
    
if(gamestate >= && round_start_counter <= 42) {
        
client_print_color(idprint_team_grey"^3Round: ^4 %d - ^3Team A: ^4 %d - ^3Team B: ^4 %d",round_start_countertotal_a_scoretotal_b_score)
    }
    
    
//* 2ND HALF - EVERY ROUND START BETWEEN 16 AND 30  *//    
    
if(gamestate == && round_start_counter == 16) {
        
client_print_color(idprint_team_grey"First Half Score: Team A: %d Team B: %d"first_a_scorefirst_b_score)    
        
client_print_color(idprint_team_grey"Second Half is now LIVE.")
    }
    
    if(
gamestate == && round_start_counter <= 31 && round_end_counter <= 30) {
        
        if(
total_a_score == 16) {
        
client_print_color(idprint_team_grey"Team A WON the Match.")
        
set_task(0.1"stop_pug")
        }
        
        if(
total_b_score == 16) {
        
client_print_color(idprint_team_grey"Team B WON the Match.")
        
set_task(0.1"stop_pug")
        }
    }
    
    if(
gamestate == && round_start_counter == 31)
    if(
total_a_score == 15 && total_b_score == 15) {
    
gamestate 6
    round_start_counter 
30
    round_end_counter 
30    
    first_a_score 
0
    first_b_score 
=0
    sec_a_score 
0
    sec_b_score 
0
    total_a_score 
0
    total_b_score 

    
    server_cmd
("say The match is tied. Starting Overtime.")
    
server_cmd("mp_startmoney 10000")

    
server_cmd("sv_restart 1")
    }
    
    if(
gamestate == && round_start_counter == 31) {
        
client_print_color(idprint_team_grey"Overtime Started")        
        }    
    
    if(
gamestate == && round_start_counter == 34) {
        
client_print_color(idprint_team_grey"MR3 2nd Half is now LIVE.")
    }
    
    if(
gamestate == && round_start_counter == 36) {
        
client_print_color(idprint_team_grey"TOTAL SCORE - Team A: %d Team B: %d"total_a_scoretotal_b_score)
        
        if(
total_a_score == && total_b_score == 3) {
        
gamestate 8
        round_start_counter 
35
        round_end_counter 
35    
        first_a_score 
0
        first_b_score 
=0
        sec_a_score 
0
        sec_b_score 
0
        total_a_score 
0
        total_b_score 

    
        server_cmd
("say The match is tied. Starting Overtime.")
        
server_cmd("mp_startmoney 10000")

        
server_cmd("sv_restart 1")
        }            
    }
    
    if(
gamestate == && round_start_counter <= 36 && round_end_counter <= 35) {
        
        if(
total_a_score == 4) {
        
client_print_color(idprint_team_grey"Team A WON the Match.")
        
set_task(0.1"stop_pug")
        }
        
        if(
total_b_score == 4) {
        
client_print_color(idprint_team_grey"Team B WON the Match.")
        
set_task(0.1"stop_pug")
        }    
    }
}  

public 
EventRoundEnd(id
{
    
round_end_counter++
    
    if(
gamestate == && round_end_counter == 15) {
        
client_print_color(idprint_team_grey"First Half ended. Teams will automatically swap.")
        
set_task(0.1"second_half")
    }

    if(
gamestate == && round_end_counter == 30) {
        
client_print_color(idprint_team_grey"Second Half ended.")
    }
    
    if(
gamestate == && round_end_counter == 33) {
        
client_print_color(idprint_team_grey"Overtime 1 - 1st Half ended. Teams will automatically swap.")
        
set_task(0.1"overtime_two")
    }
    
    if(
gamestate == && round_end_counter == 36) {
        
client_print_color(idprint_team_grey"Overtime 1 - 2nd Half ended.")
        
set_task(0.1"overtime_three")
    }    
    
    if(
gamestate == && round_end_counter == 39) {
        
client_print_color(idprint_team_grey"Overtime 2 - 1st Half ended. Teams will automatically swap.")
        
set_task(0.1"overtime_four")
    }
    
    if(
gamestate == && round_end_counter == 42) {
        
client_print_color(idprint_team_grey"Overtime 2 - 2nd Half ended.")
        
set_task(0.1"overtime_five")
    }    
}







public 
team_score()

    
    new 
team[32]
    
read_data(1,team,32)
    
    if(
gamestate == || gamestate == || gamestate == || gamestate == || gamestate == 11) {
    if (
equal(team,"CT"))
    { 
        
first_a_score read_data(2)
    }
    else if (
equal(team,"TERRORIST"))
    {
        
first_b_score read_data(2)
    }
    }

    if(
gamestate == || gamestate == || gamestate == || gamestate == 10) {    
    if (
equal(team,"TERRORIST"))
    { 
        
sec_a_score read_data(2)
    }
    else if (
equal(team,"CT"))
    {
        
sec_b_score read_data(2)
    }
    }
    
    
    return 
PLUGIN_CONTINUE
}

public 
pug_swap()
{        
    
SwapTeams();
}

SwapTeams()
{
    static 
iMaxPlayers;
    if(!
iMaxPlayers)
        
iMaxPlayers get_maxplayers();
    
    for(new 
id id <= iMaxPlayers id++)
    {
        if(!
is_user_connected(id))
            continue;
        
        if(
get_user_team(id) < 3)
            
cs_set_user_team(id_:(get_user_team(id)));
    }
}

public 
knife_round(id)
{
    
gamestate 2        
    server_cmd
("sv_restart 1")    
    
client_print_color(idprint_team_blue"^4Knife Round started. ^3Winner picks the first teammate.")
    
    
round_start_counter 0
    round_end_counter 
0
    
    
return PLUGIN_CONTINUE;
}
    
public 
liveonthree(id)
{
    
gamestate 4
    server_cmd
("mp_roundtime 1.75")    
    
server_cmd("sv_alltalk 0")
    
server_cmd("mp_mp_buytime 0.25 ")    
    
server_cmd("mp_c4timer 35")
    
server_cmd("mp_forcecamera 2")
    
server_cmd("mp_forcechasecam 2")    
    
server_cmd("sv_airaccelerate 100")
    
server_cmd("sv_restart 1")    
    
    
server_cmd("sv_restart 1")
    
client_print_color(idprint_team_red"^3 .::| FutureGN |::. ^4 1st Half is now LIVE.")
    
    
round_end_counter 0
    round_start_counter 
0
    first_a_score 
0
    first_b_score 
0    
    
    
return PLUGIN_CONTINUE
}

public 
second_half()
{
    
gamestate 5
    set_task
(0.1"pug_swap")
    
server_cmd("sv_restart 1")
    
    return 
PLUGIN_CONTINUE;
}

public 
overtime_two()
{    
    
gamestate 7
    
    set_task
(0.1"pug_swap")
    
server_cmd("sv_restart 1")
    
server_cmd("say MR3 2nd Half is now LIVE.")
}

public 
stop_pug() {
    
server_cmd("say The Match is Over !! Final Score: Team A: %d Team B: %d"total_a_scoretotal_b_score)
    
server_cmd("sv_alltalk 1")
    
server_cmd("exec normal.cfg")
    
server_cmd("sv_restart 1")
    
server_cmd("pug_team_limit 32")
    
gamestate 0
    round_end_counter 
0
    round_start_counter 
0
    first_a_score 
0
    first_b_score 
0
    t_ready_players 
0
    ct_ready_players 
0

    
return PLUGIN_HANDLED

__________________
--------------------------------------------------
C is for cookie ... thats good enuff 4 me

Last edited by CookieCrumbler; 02-23-2018 at 10:59.
CookieCrumbler is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-17-2018 , 13:04   Re: PUGMod Lite 0.0.5
Reply With Quote #10

You can create an array, no need to create hundreds of variables
Use total_score[2], ready_players[2], other_stuff_and_things[2]
__________________
Relaxing is offline
Reply


Thread Tools
Display Modes

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 04:47.


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