Plugin Cerut: War/Mix System
Descriere (adica ce face el mai exact): As dori un plugin de War/Mix stabil.
Serverul impune conditii strict HLDS/REHLDS?: ReHLDS
Ai cautat pluginul?(daca da, precizeaza cum): Da, l-am cautat peste tot pe google. Am gasit cateva, dar aparent ele nu ruleaza cum trebuie pe server, ori sunt foarte vechi. Inclusiv pe eXtreamCs l-am cautat. Am vrut sa-l cumpar pe cel de la CSA-Panel, dar nu merge sa-mi activez contul pe site-ul lor. Am vrut sa-l folosesc pe cel a lui vLd si Hades, dar mi-a dat ceva errori la compliare, iar resursele necesare nu se mai pot downloada.
Necesita mod special?: Nu cred ca necesita un mod special
Cerere Plugin War/Mix
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
Forum rules
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
- j a h k 0-
- Membru, skill +4
- Posts: 1536
- Joined: 26 Jan 2016, 10:24
- Detinator Steam: Da
- CS Status: segmentation fault
- SteamID: /ID/jkhalibu
- Reputatie: Utilizator neserios
Restrictie moderator [permanent]
Membru Club eXtreamCS (3 luni)
Nume anterior: Jah# - Fond eXtream: 0
- Location: Chişinău, Republic Of Moldova
- Has thanked: 69 times
- Been thanked: 13 times
- Contact:
Am eu addons de mix, dar este de vanzare pentru detalii da-mi add pe steam : https://steamcommunity.com/id/jkhalibu/
-
- Membru, skill +1
- Posts: 169
- Joined: 10 Aug 2015, 16:09
- Detinator Steam: Da
- SteamID: PedoBearJB
- Fond eXtream: 0
- Location: sys_admin
- Has thanked: 1 time
- Contact:
- Capy Trifoi
- Membru, skill 0
- Posts: 61
- Joined: 23 Apr 2020, 07:43
- Detinator Steam: Da
- CS Status: On
- Detinator server CS: RESPAWN.CS-GAME.RO
- SteamID: capymuncasitalent
- Fond eXtream: 0
- Has thanked: 5 times
- Been thanked: 5 times
- robbencsgo
- Membru, skill 0
- Posts: 96
- Joined: 31 Aug 2019, 19:14
- Detinator Steam: Da
- CS Status: aimer
- SteamID: an prevat
- Fond eXtream: 0
- Has thanked: 9 times
- Been thanked: 11 times
- Contact:
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <colorchat>
#pragma semicolon 1
#define PLUGIN "Mix Plugin"
#define VERSION "2.1"
#define AUTHOR "robben"
#define ACCES_COMENZI ADMIN_KICK
#define SWAP_SCORE 15
#define MAX_SCORE 16
#define ACE_KILLS 5
new bool:g_respawnon, bool:g_mixon, bool:g_swaped, g_roundtype, bool:g_chat;
new g_score[6];
new Time[33], g_Frags[33];
new TAG[] = "[MIX]";
new COM[] = "BLUEGAME";
new DemoName[] = "MIX_BLUEGAME";
public plugin_init() {
register_plugin(
.plugin_name = PLUGIN,
.version = VERSION,
.author = AUTHOR
);
register_logevent("RoundEnd", 2, "1=Round_End");
register_event("SendAudio", "Terro_Win", "a", "2=%!MRAD_terwin");
register_event("SendAudio", "CT_Win", "a", "2=%!MRAD_ctwin");
register_event("DeathMsg", "DeathMessage", "a" );
register_clcmd("say", "cmd_say");
register_clcmd("say .start", "cmd_Start", ACCES_COMENZI);
register_clcmd("say !start", "cmd_Start", ACCES_COMENZI);
register_clcmd("say /start", "cmd_Start", ACCES_COMENZI);
register_clcmd("say .warm", "cmd_Warm", ACCES_COMENZI);
register_clcmd("say !warm", "cmd_Warm", ACCES_COMENZI);
register_clcmd("say /warm", "cmd_Warm", ACCES_COMENZI);
register_clcmd("say .score", "cmd_score", ACCES_COMENZI);
register_clcmd("say !score", "cmd_score", ACCES_COMENZI);
register_clcmd("say /score", "cmd_score", ACCES_COMENZI);
register_clcmd("say .specall", "cmd_Spec", ACCES_COMENZI);
register_clcmd("say !specall", "cmd_Spec", ACCES_COMENZI);
register_clcmd("say /specall", "cmd_Spec", ACCES_COMENZI);
register_clcmd("say .stop", "cmd_Stop", ACCES_COMENZI);
register_clcmd("say !stop", "cmd_Stop", ACCES_COMENZI);
register_clcmd("say /stop", "cmd_Stop", ACCES_COMENZI);
register_clcmd("say .rr", "cmd_restart", ACCES_COMENZI);
register_clcmd("say !rr", "cmd_restart", ACCES_COMENZI);
register_clcmd("say /rr", "cmd_restart", ACCES_COMENZI);
register_clcmd("say .on", "cmd_chaton", ACCES_COMENZI);
register_clcmd("say !on", "cmd_chaton", ACCES_COMENZI);
register_clcmd("say /on", "cmd_chaton", ACCES_COMENZI);
register_clcmd("say .off", "cmd_chatoff", ACCES_COMENZI);
register_clcmd("say !off", "cmd_chatoff", ACCES_COMENZI);
register_clcmd("say /off", "cmd_chatoff", ACCES_COMENZI);
}
public plugin_natives()
{
register_native("mix_is_mix_on", "_CheckMix");
register_native("mix_did_ace", "_CheckAce");
register_native("mix_check_chat", "_CheckChat");
}
public bool:_CheckMix()
{
return g_mixon;
}
public _CheckAce(Player)
{
CheckAce(Player);
}
public bool:_CheckChat()
{
return g_chat;
}
public client_connect(id)
{
g_Frags[id] = 0;
}
public Terro_Win() {
if(g_roundtype == 1 )
g_score[0]++;
if(g_roundtype == 2)
g_score[3]++;
}
public CT_Win() {
if(g_roundtype == 1)
g_score[1]++;
if(g_roundtype == 2)
g_score[2]++;
}
public cmd_say(id) {
if(g_chat && !(get_user_flags(id) & ACCES_COMENZI))
{
ColorChat(id, GREEN, "%s ^01Canalul SAY este blocat, foloseste^04 say_team.", TAG);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public cmd_chaton(id)
{
new szName[33];
get_user_name(id,szName,charsmax(szName));
if(!(get_user_flags(id) & ACCES_COMENZI))
return PLUGIN_HANDLED;
if(!g_mixon)
{
ColorChat(id, GREEN, "%s ^01Nu este nici un mix in desfasurare in acest moment.", TAG);
return PLUGIN_HANDLED;
}
if(!g_chat)
{
ColorChat(id, GREEN, "%s ^01Chat-ul este deja activat!", TAG);
return PLUGIN_HANDLED;
}
else
{
g_chat = false;
ColorChat(0, GREEN, "%s ^01ADMIN^04 %s ^01a activat chat-ul.", TAG, szName);
}
return PLUGIN_HANDLED;
}
public cmd_chatoff(id)
{
new szName[33];
get_user_name(id,szName,charsmax(szName));
if(!(get_user_flags(id) & ACCES_COMENZI))
return 0;
if(!g_mixon)
{
ColorChat(id, GREEN, "%s ^01Nu este nici un mix in desfasurare in acest moment.", TAG);
return PLUGIN_HANDLED;
}
if(g_chat)
{
ColorChat(id, GREEN, "%s ^01Chat-ul este deja dezactivat!", TAG);
return PLUGIN_HANDLED;
}
else
{
g_chat = true;
ColorChat(0, GREEN, "%s ^01ADMIN^04 %s ^01a dezactivat chat-ul.", TAG, szName);
}
return PLUGIN_HANDLED;
}
public DeathMessage() {
new Killer = read_data(1);
new Victim = read_data(2);
CheckAce(Victim);
if(Killer == Victim || !Killer || cs_get_user_team(Killer) == cs_get_user_team(Victim))
{
return PLUGIN_HANDLED;
}
g_Frags[Killer]++;
if(g_respawnon)
{
respawn(Victim);
cs_set_user_money(Victim, 16000);
}
return PLUGIN_HANDLED;
}
public respawn(Victim) {
Time[Victim] = 3;
set_task(1.0,"countdown", Victim, _, _, "a", 6);
}
public countdown(Victim)
{
Time[Victim]--;
if(Time[Victim] == 1)
{
ExecuteHamB(Ham_CS_RoundRespawn, Victim);
}
}
public RoundEnd() {
new iPlayers[32], iNum, player[32];
get_players(iPlayers, iNum, "ch");
for(new i = 0; i < iNum; i++)
{
player = iPlayers;
CheckAce(player[i]);
}
if(g_roundtype == 1)
ColorChat(0, GREEN, "[SCORE] ^01Terrorists^04 %d - %d ^01Counter-Terrorists", g_score[0], g_score[1]);
if(g_roundtype == 2)
ColorChat(0, GREEN, "[SCORE] ^01Counter-Terrorists^04 %d - %d ^01Terrorists", g_score[2], g_score[3]);
if(!g_swaped && g_score[0] + g_score[1] == SWAP_SCORE)
{
g_score[2] = g_score[0];
g_score[3] = g_score[1];
g_swaped = true;
g_roundtype = 2;
swap_teams();
server_cmd("sv_restart 1");
ColorChat(0, GREEN, "%s ^01Echipele s-au schimbat cu succes.", TAG);
ColorChat(0, GREEN, "%s ^01A inceput a 2-a repriza.", TAG);
}
if(g_swaped && g_score[2] >= MAX_SCORE || g_swaped && g_score[3] >= MAX_SCORE)
{
EndMix();
}
}
public EndMix() {
g_mixon = false;
g_chat = false;
g_roundtype = 0;
g_respawnon = true;
g_swaped = false;
g_score[0] = 0;
g_score[1] = 0;
g_score[2] = 0;
g_score[3] = 0;
g_score[4] = 0;
g_score[5] = 0;
server_cmd("mp_startmoney 16000");
server_cmd("mp_freezetime 0");
server_cmd("mp_roundtime 10");
server_cmd("mp_buytime 15");
server_cmd("sv_restart 1");
ColorChat(0, GREEN, "%s ^01Meciul s-a terminat!", TAG);
ColorChat(0, GREEN, "%s ^01Plugin creat de^04 robben ^01pentru^04 %s", TAG, COM);
return PLUGIN_HANDLED;
}
public cmd_score(id) {
if(!g_mixon)
{
ColorChat(id, GREEN, "%s ^01Nu este nici un mix in desfasurare in acest moment.");
return PLUGIN_HANDLED;
}
if(g_roundtype == 1)
ColorChat(id, GREEN, "[SCORE] ^01Terrorists^04 %d - %d ^01Counter-Terrorists", g_score[0], g_score[1]);
if(g_roundtype == 2)
ColorChat(id, GREEN, "[SCORE] ^01Counter-Terrorists^04 %d - %d ^01Terrorists", g_score[2], g_score[3]);
return PLUGIN_HANDLED;
}
public cmd_Start(id) {
new players[32], num;
get_players(players, num);
new mapname[33];
get_mapname(mapname, charsmax(mapname));
new szName[33];
get_user_name(id,szName,charsmax(szName));
if(g_mixon)
{
ColorChat(id, GREEN, "%s ^01Este deja in desfasurare un mix.", TAG);
return 0;
}
if(get_user_flags(id) & ACCES_COMENZI)
{
g_mixon = true;
g_roundtype = 1;
g_chat = false;
g_respawnon = false;
g_swaped = false;
g_score[0] = 0;
g_score[1] = 0;
g_score[2] = 0;
g_score[3] = 0;
g_score[4] = 0;
g_score[5] = 0;
server_cmd("mp_startmoney 800");
server_cmd("mp_freezetime 7");
server_cmd("mp_roundtime 1.75");
server_cmd("mp_buytime 0.15");
server_cmd("mp_forcecamera 2");
server_cmd("sv_restart 1");
ColorChat(0, GREEN, "%s ^01ADMIN^04 %s ^01a pornit meciul.", TAG, szName);
for(new i = 0; i < num; i++)
{
client_cmd(players[i], "record ^"%s_%s^"", DemoName, mapname);
ColorChat(players[i], GREEN, "[AUTO-DEMO] ^01Inregistram ^"%s_%s^"",DemoName, mapname);
}
}
else
{
ColorChat(id, GREEN, "%s ^01Nu ai acces pentru a folosi aceasta comanda.", TAG);
}
return PLUGIN_HANDLED;
}
public cmd_Stop(id) {
new szName[33];
get_user_name(id,szName,charsmax(szName));
if(!g_mixon)
{
ColorChat(id, GREEN, "%s ^01Nu este nici un mix in desfasurare in acest moment.", TAG);
return PLUGIN_HANDLED;
}
if(get_user_flags(id) & ACCES_COMENZI)
{
g_mixon = false;
g_chat = false;
g_roundtype = 0;
g_respawnon = true;
g_swaped = false;
g_score[0] = 0;
g_score[1] = 0;
g_score[2] = 0;
g_score[3] = 0;
g_score[4] = 0;
g_score[5] = 0;
server_cmd("mp_startmoney 16000");
server_cmd("mp_freezetime 0");
server_cmd("mp_roundtime 10");
server_cmd("mp_buytime 15");
server_cmd("sv_restart 1");
ColorChat(id, GREEN, "%s ^01ADMIN^04 %s ^01a oprit meciul",TAG, szName);
}
else
{
ColorChat(id, GREEN, "%s ^01Nu ai acces pentru a folosi aceasta comanda.", TAG);
}
return PLUGIN_HANDLED;
}
public cmd_restart(id) {
new szName[33];
get_user_name(id,szName,charsmax(szName));
if(!g_mixon)
{
ColorChat(id, GREEN, "%s ^01Nu este nici un mix in desfasurare in acest moment.");
return 0;
}
if(get_user_flags(id) & ACCES_COMENZI)
{
if(g_roundtype == 1)
{
g_score[0] = 0;
g_score[2] = 0;
server_cmd("sv_restart 1");
ColorChat(0, GREEN, "%s ^01ADMIN^04 %s ^01a repornit prima repriza.", TAG, szName);
}
else if(g_roundtype == 2)
{
g_score[1] = g_score[0];
g_score[3] = g_score[2];
server_cmd("sv_restart 1");
ColorChat(0, GREEN, "%s ^01ADMIN^04 %s ^01a repornit a doua repriza.", TAG, szName);
}
}
else
{
ColorChat(id, GREEN, "%s ^01Nu ai acces pentru a folosi aceasta comanda.", TAG);
}
return PLUGIN_HANDLED;
}
public cmd_Warm(id) {
new szName[33];
get_user_name(id,szName,charsmax(szName));
if(g_mixon)
{
ColorChat(id, GREEN, "%s ^01Nu poti porni rundele de WarmUp in timpul mixului.", TAG);
return PLUGIN_HANDLED;
}
if(get_user_flags(id) & ACCES_COMENZI)
{
g_mixon = false;
g_roundtype = 0;
g_chat = false;
g_respawnon = true;
g_swaped = false;
server_cmd("mp_startmoney 16000");
server_cmd("mp_freezetime 0");
server_cmd("mp_roundtime 10");
server_cmd("mp_buytime 15");
server_cmd("sv_restart 1");
ColorChat(0, GREEN, "%s ^01ADMIN^04 %s ^01a pornit rundele de WarmUp.", TAG, szName);
}
else
{
ColorChat(id, GREEN, "%s ^01Nu ai acces pentru a folosi aceasta comanda.", TAG);
}
return PLUGIN_HANDLED;
}
public cmd_Spec(id) {
new szName[33];
get_user_name(id,szName,charsmax(szName));
if(g_mixon)
{
ColorChat(id, GREEN, "%s Nu poti pune jucatorii spec in timpul mixului.", TAG);
return 0;
}
if(get_user_flags(id) & ACCES_COMENZI)
{
server_cmd("sv_restart 1");
static players;
for(players = 1; players <= get_maxplayers(); players++)
{
if (is_user_connected(players))
{
user_silentkill(players);
cs_set_user_team(players,3);
}
}
ColorChat(0, GREEN, "%s ^01ADMIN^04 %s ^01a mutat toti jucatorii la spectator", TAG, szName);
}
else
{
ColorChat(id, GREEN, "%s ^01Nu ai acces pentru a folosi aceasta comanda.", TAG);
}
return PLUGIN_HANDLED;
}
// Swap Teams
public swap_teams() {
new players[32], num;
get_players(players, num);
for(new i = 0; i < num; i++)
delayswap(players[i]);
}
public changeTeam(id) {
switch(cs_get_user_team(id))
{
case CS_TEAM_CT: cs_set_user_team(id, CS_TEAM_T);
case CS_TEAM_T: cs_set_user_team(id, CS_TEAM_CT);
}
}
delayswap(id)
{
switch(id)
{
case 1..7: set_task(0.1, "changeTeam", id);
case 8..15: set_task(0.2, "changeTeam", id);
}
}
public CheckAce(id)
{
new szName[33];
get_user_name(id,szName,charsmax(szName));
if(g_Frags[id] >= ACE_KILLS - 1)
{
ColorChat(0, GREEN, "%s ^04%s ^01a realizat un^04 %sACE", TAG, szName, g_Frags[id] == ACE_KILLS ? "":"SEMI-");
client_cmd(0, "spk vox/buzwarn");
}
g_Frags[id] = 0;
}
Daca te-am ajutat, lasa si tu un +1