AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Public Pug Mod (https://forums.alliedmods.net/showthread.php?t=306602)

EFFx 04-06-2018 22:48

Public Pug Mod
 
1 Attachment(s)
PUBLIC PUG MOD


Plugin release: 04/06/2018
Last plugin update: 08/28/2019

- Description
I've made this pugmod for public brazilian servers, but, recently, I decided to post it here, people may could like it. So, let me explain what it does:

Code:

1. MD3 System
- It's 3 rounds at start, when X team win the first round, it'll restart, if that team win again, the team will start with one more point. If the other team win, the MD3 will be tied and the LIVE begins.

2. Spec caller
- When there's less than X players in Y team (value controlled by cvar), the pug will call someone from spectators if there's at least one there. It'll call X times before the pug kick a random player from spectators (value controlled by cvar).

3. Server redirect.
- When someone join on the server or get transfered to spectators after the pug be completed, a menu will open asking if he wants to go to another server (list from .ini file).

4. Comunication
- Alive players can hear the dead player's mic (ON/OFF)

5. AFK kicker
- If there's an AFK, the pug could kick if he don't move.

6. Multi-kills show
- If someone kill X players (value controlled by cvar), his/their name(s) will be showed at the new round.

7. Ace message
- If someone kills the entire enemy team, his name will be showed at the new round.

8. Server needing players
- If theres less than X players (value controlled by cvar), the pug will countdown until the match get canceled due insufficient players.

9. Round deagle
- The admins can transfer all the players to spectator and starts a round deagle for team choose.

10. Votemap
- The votemap starts after the match's end. If there's than X players (value controlled by cvar), the votemap will cancel and continue when there's sufficient players.

11. Reset server
- When there's no players, the pug reset the server.

12. Force ready
- Players can be forced to be ready and their punishments can be changed by a cvar.

13. Scoreboard's colors.
- The scoreboard's color can be changed with a cvar.

14. Match's scores
- The game's scores can be changed.

- Cvars
Code:

; Config file to change the pug's cvar value

// Number of players to start the game.
pugeffx_minplayers                "10"

// Number of player per team.
pugeffx_plrlmt                        "5"

// Number of calls that the pug do before kick someone from spectators.
pugeffx_chamados                "4"

// Number of players for cancel the match.
pugeffx_miado_num                "8"

// Countdown time to cancel the match
pugeffx_miado_countdown                "60"

// Number of players for the pug change the map to de_dust2 (if its not d2)
pugeffx_changemap_num                "4"

// Kick AFK
pugeffx_afk_kick                "1"

// AFK time
pugeffx_afk_time                "35"

// Gamename INFO ([Live], [MD3], etc...)
pugeffx_placar_gamename                "1"

// Alive players can hear the deads.
pugeffx_dead_mic                "1"

// .READY TAG
pugeffx_ready_prefix                "[READY]"

// Warmup money
pugeffx_respawn_money                "16000"

// Overtime money
pugeffx_overtime_money                "12000"

// Number of kills that the players need to show on "Multi kills" hud
pugeffx_multikills                "2"

// Force ready time.
pugeffx_forceready_time                "30"

// Force ready's punishment.
// Punishments list: "ready", "spec", "kick", "nothing"
pugeffx_forceready_punishment        "ready"

// Scoreboard color
// Color's list
// yellow, red, blue, pink, purple, white, green, orange, random or RGB format.
// RGB format example: "200 20 150"
pugeffx_cor_placar                "green"

// Info color (LAST ROUND, MATCH POINT, etc)
pugeffx_cor_aviso                "red"

// No grenades on warmup.
pugeffx_lock_grenades                "1"

// Reset server when it's empty.
pugeffx_reset_server                "1"

// Kick admins on spec if they don't join when the pug is calling.
pugeffx_kick_admin_spec        "0"

// Show teammate's money on freezetime (0 = OFF, 1 = hud message, 2 = sprite over player's head)
pugeffx_show_money                "2"

// Max time that teams can open surrender vote.
pugeffx_max_surrender_votes        "3"

// Surrender vote delay (in seconds)
pugeffx_surrender_vote_delay        "300"

// Randomize teams
pugeffx_randomize_vote                "1"

- Necessary Includes
- CromChat = https://forums.alliedmods.net/showthread.php?t=295046
- Dhudmessage = https://forums.alliedmods.net/showthread.php?t=149210

- Credits
- OciXCrom's Best Player MOTD = https://forums.alliedmods.net/showthread.php?t=302153

- Change LOG
Spoiler


OBS:Bem, agora ninguém mais recebe dinheiro nas minhas costas. Sou o criador de todos os pugs que estão rolando ai e os moleques dizendo que eles fizeram. Fazer oque né, agora ninguém mais vende :).

iceeedr 04-06-2018 23:35

Re: Public Pug Mod
 
PHP Code:


public openServers(id)
{
    
id -= TASK_OPENSERVERS
    
    
new szTittle[65]
    
formatex(szTittlecharsmax(szTittle), "\y[ \w%s\d - %L \y ]"g_szMenuPrefixLANG_PLAYER"SERVER_OPENSERVERS_MENU")
    new 
iMenu menu_create(szTittle"ask_handler")
    
    new 
szItem[6]
    
formatex(szItemcharsmax(szItem), "\y%L"LANG_SERVER"SERVER_MENU_OPTION_YES")
    
menu_additem(iMenuszItem)

    
formatex(szItemcharsmax(szItem), "\r%L"LANG_SERVER"SERVER_MENU_OPTION_NO")
    
menu_additem(iMenuszItem// you forget
    
    
menu_display(idiMenu)
}

public 
servers_handler(idiMenuiItem)
{
    if(
iItem == MENU_EXIT)
    {
        
menu_destroy(iMenu)
        return
    }
    
    new 
szServerName[MAX_PLAYERS], szServerIP[MAX_PLAYERS]
    
ArrayGetString(g_arServerNameiItemszServerNamecharsmax(szServerName))
    
ArrayGetArray(g_arServerIPiItemszServerIP)

    
CC_SendMatched(0CC_COLOR_TEAM"%s %L"g_szPrefixLANG_SERVER"SERVER_REDIRECTED"g_dUserData[id][szName], szServerName)
    
client_cmd(id"reconnect;connect %s"szServerIP)
    
client_cmd(id"^"reconnect^";^"connect^" %s"szServerIP// should be this way




EFFx 04-06-2018 23:53

Re: Public Pug Mod
 
Thank you, I didn't notice :)

WhiteFang1319 04-07-2018 13:19

Re: Public Pug Mod
 
Looks great man, I'll try it out when I get time. I hope this gets support because most of the pug mods aren't supported or just private

Natsheh 04-07-2018 18:16

Re: Public Pug Mod
 
Any screenshots or videos?

Btw great job making all that on your own.

Didnt check out the code hope its fine like you.

marcelowzd 04-08-2018 00:08

Re: Public Pug Mod
 
[PT-BR]
Vou ser honesto, já tive muito problema com host pegando meus plugins também sem a minha permissão, mas eu sempre deixei um presentinho neles. Muita gente também sempre quis muitos plugins que eu criava pro meu server multimods, como o VoteMod + VoteMap e o FPS Limiter e tentou se aproveitar da minha bondade.

[EN]
It is just a comment for the OP, he'll understand. But if needed, i can translate to EN so everyone can read.

Btw nice, gonna try it when my multimods is online again.

^SmileY 04-11-2018 08:44

Re: Public Pug Mod
 
A que ponto chegamos :\

A point that we arrived :\

Ps.
Some things in this plugin will not work in a Steam Server like sounds speak or other things

OciXCrom 04-11-2018 13:44

Re: Public Pug Mod
 
Please make sure you upload the latest version of cromchat.inc in your archive, since there may be issues if people try compiling newer plugins with an older version. Or even better, don't upload the .inc in the archive at all, but provide a direct download link from github next to the download button, so the version will always be the latest.

PS: instead of putting g_szPrefix as a %s parameter in every single message, you can use CC_SetPrefix in plugin_init() and it will automatically put the prefix in every message.

EFFx 04-11-2018 15:54

Re: Public Pug Mod
 
Quote:

Originally Posted by ^SmileY (Post 2587194)
A que ponto chegamos :\

A point that we arrived :\

Ps.
Some things in this plugin will not work in a Steam Server like sounds speak or other things

Pois é, fazer oq né.

Yup, that's it.

Quote:

Originally Posted by OciXCrom (Post 2587224)
Please make sure you upload the latest version of cromchat.inc in your archive, since there may be issues if people try compiling newer plugins with an older version. Or even better, don't upload the .inc in the archive at all, but provide a direct download link from github next to the download button, so the version will always be the latest.

PS: instead of putting g_szPrefix as a %s parameter in every single message, you can use CC_SetPrefix in plugin_init() and it will automatically put the brefix in every message.

You're right, I'mma do it.

tarsisd2 04-11-2018 20:18

Re: Public Pug Mod
 
are you the creator of ManagerX? i use on my 5x5 server in cz, it's very easy to control with comands like .md3 .rr .allspec .4fun and so on, i never found the source code, maybe you can add those simple comands so admins can use in chat

[bp] sou brasileiro tb, meus servidores são no cz, todos somente steam

[en] i'm a brazillian, my servers are on condition zero, all steam only


EDIT: the managerX i like that players don't have to type .ready we play among friends and clan, so when theres 10 players, just type .allspec, pistol round, chose team and then .md3, all of the match it's automated, on round 15 players are switched and all the admin has to do it's type .md3 again


All times are GMT -4. The time now is 00:08.

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