AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Solved Admin War Plugin (https://forums.alliedmods.net/showthread.php?t=324541)

allroundernaman 05-19-2020 08:19

Admin War Plugin
 
DIRECTLY JUMP TO LAST POST
IF YOU WANT TO SAVE YOUR TIME AND GET THE PLUGIN.


Hi All!
I will try my best to describe what I want. Well, I have already posted this topic in the scripting area, but they told me to post here. https://forums.alliedmods.net/showth...58#post2700958
Also, I have seen this but of no use of what I am looking for: https://forums.alliedmods.net/showthread.php?t=303504

BACK TO THE TOPIC.
So basically I need a Admin War plugin, where admin has the privilege to start a war by typing something in the chat like /startwar. Or a console command.

War doesn't need to check the minimum player count. It must start when an admin executes this command. Now what happens when admin executes this command, all players go to spec, and Admin (Who started the war) has the right to choose two players. He must be shown a menu with a list of all players. Now he will select two players and they both will become captain.
Both players get assigned to either team (CT and T) and all others remain in spec.
Then the first round goes up with a knife. KNIFE IS COMPULSORY.
The captain who wins gets the chance to select a team. After that, he gets a menu of list of players.
They choose a player and then the menu goes to another captain. Likewise, every player gets divided into different teams. Also, there must be a timeout if the winning captain doesn't choose a player within x seconds.

Now teams get created. War must start like Auto-Mix. 15 rounds in both teams. The team who wins 16 rounds win the game, the other team will lose.
Please take note that this is not Auto-Mix. This plugin is Admin-orientated. Admin must have full control to start and stop a war. Also, Admins have the right to change maps for war, not a vote map for all players.
Controls can either be given using console command or a menu like "Amxmodmenu".

I think I have explained my objective well. Well, thanks for reading and I hope I get a plugin for it. I request you!

Regards,

allroundernaman 05-20-2020 10:55

Re: Admin War Plugin
 
Is there someone who can help me out here? I will be glad to know.

Regards,

instinctpt1 05-21-2020 13:03

Re: Admin War Plugin
 
1 Attachment(s)
You are just talking about PUB_WAR from CS Indian gaming communities
But i still didnt understand, if u know about plugin, why are u asking here

Anyways here is the last source i saw on internet from original author, let me know wht u want, if not this !

allroundernaman 05-22-2020 00:40

Re: Admin War Plugin
 
I have also tried many same plugins like this, but none of them worked. Can I have a short description of this plug-in?

instinctpt1 05-22-2020 02:14

Re: Admin War Plugin
 
Quote:

Originally Posted by allroundernaman (Post 2701533)
I have also tried many same plugins like this, but none of them worked. Can I have a short description of this plug-in?

Its exactly same what you asked for, infact it is ..what you asked for

3 commands for admins
amx_startmatch
amx_stopmatch
amx_restartmatch
And !score to check score for everyone
-- You know about these

You just need REAPI to compile this plugin locally
And i dont remember much but i guess it requires REHLDS setup too

allroundernaman 05-22-2020 04:05

Re: Admin War Plugin
 
Thank you for the advice. Here's what happens when I compile locally on my buffer server:

Quote:

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// pub_war_nothing.sma
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(31) : error 017: undefined symbol "MAX_PLAYERS"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(168) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(172) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(199) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(201) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(204) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(247) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(256) : warning 204: symbol is assigned a value that is never used: "id"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(388) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(454) : error 017: undefined symbol "set_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(455) : error 017: undefined symbol "show_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(493) : error 017: undefined symbol "set_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(494) : error 017: undefined symbol "show_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(515) : error 017: undefined symbol "set_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(516) : error 017: undefined symbol "show_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(709) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(712) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(847) : error 017: undefined symbol "set_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(848) : error 017: undefined symbol "show_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(917) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(928) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(958) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(964) : error 017: undefined symbol "set_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(965) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(965) : error 017: undefined symbol "show_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(967) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1013) : warning 203: symbol is never used: "id"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1086) : error 017: undefined symbol "set_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1087) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1087) : error 017: undefined symbol "show_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1088) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1128) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1130) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1157) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1182) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1195) : warning 203: symbol is never used: "id"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1202) : error 017: undefined symbol "set_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1203) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1203) : error 017: undefined symbol "show_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1205) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1218) : warning 203: symbol is never used: "id"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1300) : error 017: undefined symbol "set_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1301) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1301) : error 017: undefined symbol "show_dhudmessage"
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1303) : warning 217: loose indentation
// MODIR\cstrike\addons\amxmodx\scripting\pub_wa r_nothing.sma(1311) : warning 209: function "LetsFirstChoosePlayers" should return a value
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1342) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1403) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1429) : error 017: undefined symbol "set_dhudmessage"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1430) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1430) : error 017: undefined symbol "show_dhudmessage"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1432) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1441) : warning 209: function "LetsSecondChoosePlayers" should return a value
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1471) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1573) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1579) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1608) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1659) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1660) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1663) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1664) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1698) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1700) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1734) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1915) : error 017: undefined symbol "set_dhudmessage"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1916) : error 017: undefined symbol "show_dhudmessage"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1923) : error 017: undefined symbol "set_dhudmessage"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1924) : error 017: undefined symbol "show_dhudmessage"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1931) : error 017: undefined symbol "set_dhudmessage"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1932) : error 017: undefined symbol "show_dhudmessage"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2067) : error 017: undefined symbol "set_dhudmessage"
//
// Compilation aborted.
// 26 Errors.
// Could not locate output file MODDIR\cstrike\addons\amxmodx\scripting\compi led\pub_war_nothing.amx (compile failed).
//
// Compilation Time: 0.69 sec
I have compiled it locally and this is the output. I have ReAPI module too.

alferd 05-22-2020 05:09

Re: Admin War Plugin
 
Quote:

Originally Posted by allroundernaman (Post 2701552)
Thank you for the advice. Here's what happens when I compile locally on my buffer server:



I have compiled it locally and this is the output. I have ReAPI module too.

ADD
PHP Code:

#include <dhudmessage> 


allroundernaman 05-22-2020 05:36

Re: Admin War Plugin
 
Quote:

Originally Posted by alferd (Post 2701556)
ADD
PHP Code:

#include <dhudmessage> 


Thank You For the response. I added dhudmessage. Most errors gone, few left.

Quote:

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// pub_war_nothing.sma
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(32) : error 017: undefined symbol "MAX_PLAYERS"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(169) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(173) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(200) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(202) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(205) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(248) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(257) : warning 204: symbol is assigned a value that is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(389) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(710) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(713) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(918) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(929) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(959) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(966) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(968) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1014) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1088) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1089) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1129) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1131) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1158) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1183) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1196) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1204) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1206) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1219) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1302) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1304) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1312) : warning 209: function "LetsFirstChoosePlayers" should return a value
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1343) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1404) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1431) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1433) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1442) : warning 209: function "LetsSecondChoosePlayers" should return a value
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1472) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1574) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1580) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1609) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1660) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1661) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1664) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1665) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1699) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1701) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1735) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2069) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2071) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2078) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2081) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2204) : warning 200: symbol "SwapTeamsAndStartOverTimeFirstH" is truncated to 31 characters
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2243) : warning 200: symbol "SecondCaptWonKnifeRoundWonMessa" is truncated to 31 characters
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2258) : warning 200: symbol "FirstCaptainWonKnifeRoundMessag" is truncated to 31 characters
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2261) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2263) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2447) : warning 200: symbol "FirstHalfOvertimeCompletedHUDMe" is truncated to 31 characters
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2628) : warning 203: symbol is never used: "DEBUG"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2628) : warning 203: symbol is never used: "RestartGame"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2628) : warning 204: symbol is assigned a value that is never used: "SecondCaptainTeamName"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2628) : warning 203: symbol is never used: "g_PlayerSelected"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2628) : warning 204: symbol is assigned a value that is never used: "g_iMaxPlayers"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2628) : warning 204: symbol is assigned a value that is never used: "is_secondHalf"
//
// 1 Error.
// Could not locate output file MODDIR\cstrike\addons\amxmodx\scripting\compi led\pub_war_nothing.amx (compile failed).
//
// Compilation Time: 1.26 sec
// ----------------------------------------

alferd 05-22-2020 06:38

Re: Admin War Plugin
 
Quote:

Originally Posted by allroundernaman (Post 2701560)
Thank You For the response. I added dhudmessage. Most errors gone, few left.

ADD:
PHP Code:

#define MAX_PLAYERS 32 


allroundernaman 05-22-2020 06:53

Re: Admin War Plugin
 
Quote:

Originally Posted by alferd (Post 2701567)
ADD:
PHP Code:

#define MAX_PLAYERS 32 


Ok, added max player. Warnings below
Quote:

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// pub_war_nothing.sma
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(170) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(174) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(201) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(203) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(206) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(249) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(258) : warning 204: symbol is assigned a value that is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(390) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(711) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(714) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(919) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(930) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(960) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(967) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(969) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1015) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1089) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1090) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1130) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1132) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1159) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1184) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1197) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1205) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1207) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1220) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1303) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1305) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1313) : warning 209: function "LetsFirstChoosePlayers" should return a value
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1344) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1405) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1432) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1434) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1443) : warning 209: function "LetsSecondChoosePlayers" should return a value
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1473) : warning 203: symbol is never used: "id"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1575) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1581) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1610) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1661) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1662) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1665) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1666) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1700) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1702) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(1736) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2070) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2072) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2079) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2082) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2205) : warning 200: symbol "SwapTeamsAndStartOverTimeFirstH" is truncated to 31 characters
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2244) : warning 200: symbol "SecondCaptWonKnifeRoundWonMessa" is truncated to 31 characters
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2259) : warning 200: symbol "FirstCaptainWonKnifeRoundMessag" is truncated to 31 characters
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2262) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2264) : warning 217: loose indentation
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2448) : warning 200: symbol "FirstHalfOvertimeCompletedHUDMe" is truncated to 31 characters
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2626) : warning 203: symbol is never used: "DEBUG"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2626) : warning 203: symbol is never used: "RestartGame"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2626) : warning 204: symbol is assigned a value that is never used: "SecondCaptainTeamName"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2626) : warning 203: symbol is never used: "g_PlayerSelected"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2626) : warning 204: symbol is assigned a value that is never used: "g_iMaxPlayers"
// MODDIR\cstrike\addons\amxmodx\scripting\pub_w ar_nothing.sma(2626) : warning 204: symbol is assigned a value that is never used: "is_secondHalf"
// Header size: 4328 bytes
// Code size: 58148 bytes
// Data size: 46596 bytes
// Stack/heap size: 16384 bytes; max. usage is unknown, due to recursion
// Total requirements: 125456 bytes
//
// 61 Warnings.
// Done.
//
// Compilation Time: 0.97 sec
// ----------------------------------------

Press enter to exit ...

I think program is compiled, but there are many warnings. Will the warnings affect my plugin or server lag?

OciXCrom 05-22-2020 06:56

Re: Admin War Plugin
 
They won't.

allroundernaman 05-22-2020 06:58

Re: Admin War Plugin
 
Okay, let's give it a try. I have uploaded the compiled plugin in server.
I will let you know the results.

Thank you for your interests.
Regards,

allroundernaman 05-22-2020 07:14

Re: Admin War Plugin
 
Okay. I have tried the plugin on the server. NOT WORKING :(

Server IP: cs.namanvrati.cf:27009
INFO: I wrote amx_startmatch in console. Everyone died instantly. HUD says match started, captain selected etc etc....
But everyone just died and the match restarts only. No one goes to spectator, it is just like sv_restart 1

After that no menu came for captain selection for future 5-6 rounds.
Then I am writing it here.

Any fixes?

allroundernaman 05-22-2020 07:28

Re: Admin War Plugin
 
Current Code of My Plugin:

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <dhudmessage>
#include <fakemeta>
#include <hamsandwich>
#include <reapi>
#include <csx>
#include <engine>

#define MAX_PLAYERS 32
#define PLUGIN "||ECS|| PuB War"
#define VERSION "1.0"
#define AUTHOR "||ECS||nUy aka Abhishek Deshkar"
#define SVNUM 1


//Set frags.
new Frags[33], Deaths[33], RestartGame

//======= Overtime Declarations ==================

new bool:g_OverTime     false

new OTCount             0

//======= Overtime Declarations OVER =============


//=====================  Players Selection. =====================================

new g_PlayerSelectedMAX_PLAYERS 1]

//Debug
new DEBUG 1

//Game Description
new amx_warname

//Bomb AFK Manager declarations.=======================

// comment to avoid autodisabling the plugin on maps which not contain bomb targets
#define BOMB_MAP_CHECK

// float value, hud messages display time (in seconds)
#define MSG_TIME 7.0

// CVAR name, affects on spawned AFK bomb carrier which never moved after spawn
new CVAR_SPAWN[] = "afk_bombtransfer_spawn"

// CVAR value, max. allowed bomb carrier AFK time (in seconds)
new DEFAULT_SPAWN[] = "15"

// CVAR name, affects on any AFK bomb carrier except one which obey previous CVAR
new CVAR_TIME[] = "afk_bombtransfer_time"

// CVAR value, max. allowed bomb carrier AFK time (in seconds)
new DEFAULT_TIME[] = "15"

// do not set this value less than "maxplayers"
#define MAX_PLAYERS 32

// initial AMXX version number supported CVAR pointers in get/set_pcvar_* natives
#define CVAR_POINTERS_AMXX_INIT_VER_NUM 170

// determine if get/set_pcvar_* natives can be used
#if defined AMXX_VERSION_NUM && AMXX_VERSION_NUM >= CVAR_POINTERS_AMXX_INIT_VER_NUM
    #define CVAR_POINTERS
    
new g_pcvar_spawn
    
new g_pcvar_time
#endif

new TEAM[] = "TERRORIST"
new WEAPON[] = "weapon_c4"

#define    FL_ONGROUND (1<<9)

new bool:g_freezetime true
new bool:g_spawn
new bool:g_planting

new g_carrier

new g_pos[MAX_PLAYERS 1][3]
new 
g_time[MAX_PLAYERS 1]

new 
g_maxplayers


//Ranking system.
new g_TotalKills[33]
new 
g_TotalDeaths[33]
new 
g_BombPlants[33]
new 
g_BombDefusions[33]
new 
g_TotalLeaves
new gMaxPlayers
new msgToDisplay[456

//get the current status of the HALF. By default false because no half started.
new bool:isFirstHalfStarted false
new bool:isSecondHalfStarted false

new gCptT
new gCptCT
new CaptainCount 0
new bool:g_KnifeRound  false

// Is Match Initialized ?
new bool:g_MatchInit false

//Owner of: who started the match
new MatchStarterOwner 0

//Check if captain is choosen
new bool:CaptainSChosen

// Is Match started !
new bool:g_MatchStarted false

//Set main match started to true: useful for leaving players + Count for leaving players.
new bool:g_MainMatchStarted false

//By default first half if the second half is false.
new bool:is_secondHalf false

//Handle the score. By default to: 0 score.
new ScoreFtrstTeam 0
new ScoreScondteam 0

//Show menu to the first captain == winner
new ShowMenuFirst
new ShowMenuSecond

//Captains Chosen Teams.- 2 == CT & 1 == T
new FirstCaptainTeamName
new SecondCaptainTeamName

//Store the name of the Captains.
new FirstCaptainName[52]
new 
SecondCaptainName[52]

//Store the Auth ID of the captains.
new FirstCaptainAuthID[128]
new 
SecondCaptainAuthID[128]

//Temp captain Names !
new TempFirstCaptain[32]
new 
TempSecondCaptain[32]

//Store current map.
new szMapname[32]

new 
RoundCounter 0

//Extra declarations
new g_iMaxPlayers

// 1 = first captain 2 = second captain.
new CaptainChoosenID
new WhoChoseThePlayer


public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);

    
register_clcmd("amx_startmatch""ShowMenu"ADMIN_IMMUNITY"Get All The players");    

    
gMaxPlayers get_maxplayers()

    
//Change Game Description.
    
amx_warname register_cvar"amx_warname""-= WAR About To Start! =-" ); 
    
register_forwardFM_GetGameDescription"GameDesc" ); 

    
//Bomb AFK manager declarations.
    #if defined CVAR_POINTERS
    
g_pcvar_spawn register_cvar(CVAR_SPAWNDEFAULT_SPAWN)
    
g_pcvar_time register_cvar(CVAR_TIMEDEFAULT_TIME)
#else
    
register_cvar(CVAR_SPAWNDEFAULT_SPAWN)
    
register_cvar(CVAR_TIMEDEFAULT_TIME)
#endif

#if defined BOMB_MAP_CHECK
    // is current map not contain bomb targets?
    
if (!engfunc(EngFunc_FindEntityByString, -1"classname""func_bomb_target"))
        return
#endif
  
    
register_event("HLTV""event_new_round""a""1=0""2=0")

    
register_logevent("logevent_round_start_bomb"2"1=Round_Start")

    
set_task(1.0"task_afk_check"___"b"// plugin's core loop

    
g_maxplayers get_maxplayers()


    
//block advertise by cs
    
set_msg_block(get_user_msgid("HudTextArgs"), BLOCK_SET);
    
    
g_iMaxPlayers get_maxplayers()

    
//Register Death.
    
register_event("DeathMsg""Event_DeathMsg_Knife""a""1>0")

    
//For Knife round.
    
register_event("CurWeapon""Event_CurWeapon_NotKnife""be""1=1""2!29")  
    
    
//Round end event.
    
register_logevent("round_end"2"1=Round_End")

    
//Round start event.
    
register_logevent("logevent_round_start"2"1=Round_Start")

    
//Do not allow clients to join the team when they manually tries to join the team.
    
register_clcmd("chooseteam""cmdChooseTeam")
    
register_clcmd("jointeam""GoToTheSpec");

    
//Stop or Restart the Match!
    
register_clcmd("amx_stopmatch""StopMatch"ADMIN_IMMUNITY"Stop the Match!");
    
register_clcmd("amx_restartmatch""RestartMatch"ADMIN_IMMUNITY"Restart the Match!");

    
// T OR CT WIN.
    
register_event"SendAudio","on_TerroristWin","a","2=%!MRAD_terwin");
    
register_event"SendAudio","on_CTWin","a","2=%!MRAD_ctwin");

    
//show score.
    
register_clcmd("say !score""ShowScoreToUser")


    
//Get Team Players menu.
    
register_clcmd("say /getmenu","GetMatchMenu")
   
    
get_mapname(szMapnamecharsmax(szMapname))

}



//Bomb afk transfer declarations.
public event_new_round() {
    
g_freezetime true
    g_spawn 
true
    g_planting 
false
    g_carrier 
0

    
if(g_MatchStarted)
    {
        new 
PlayersMAX_PLAYERS ], iNum,id;
        
get_playersPlayersiNum"h" );
        
        for (new 
i=0i<iNumi++) 
        {
            
id Players[i]
        }
    }

}

public 
logevent_round_start_bomb() 
{

    new 
id[32], num
    get_players
(idnum"ae"TEAM)

    if (!
num// is server empty?
        
return

    
g_freezetime false

    
// update afk timers and current positions
    
new x
    
for (new 0num; ++i) {
        
id[i]
        
get_user_origin(xg_pos[x])
        
g_time[x] = 0
    
}
}

public 
task_afk_check() {
    if (
g_freezetime// is freezetime right now?
        
return

    
// afk check
    
new id[32], numxorigin[3]
    
get_players(idnum"ae"TEAM)
    for (new 
0num; ++i) {
        
id[i]
        
get_user_origin(xorigin)
        if (
origin[0] != g_pos[x][0] || origin[1] != g_pos[x][1] || (== g_carrier && g_planting)) {
            
g_time[x] = 0
            g_pos
[x][0] = origin[0]
            
g_pos[x][1] = origin[1]
            if (
g_spawn && == g_carrier)
                
g_spawn false
        
}
        else
            
g_time[x]++
    }

    
// is bomb not currently carried or Ts number less than 2?
    
if (!g_carrier || num 2)
        return

#if defined CVAR_POINTERS
    
new max_time get_pcvar_num(g_spawn g_pcvar_spawn g_pcvar_time)
#else
    
new max_time get_cvar_num(g_spawn CVAR_SPAWN CVAR_TIME)
#endif

    // is plugin disabled (cvar <= 0) or carrier isn't afk?
    
if (max_time <= || g_time[g_carrier] < max_time)
        return

    
// find who from non-afk Ts is the closest to the afk carrier
    
get_user_origin(g_carrierorigin)
    new 
min_dist 999999distrecipientorigin2[3]
    for (new 
0num; ++i) {
        
id[i]
        if (
g_time[x] < max_time) {
            
get_user_origin(xorigin2)
            
dist get_distance(originorigin2)
            if (
dist min_dist) {
                
min_dist dist
                recipient 
x
            
}
        }
    }

    if (!
recipient// is all Ts afk?
        
return

    new 
carrier g_carrier
    engclient_cmd
(carrier"drop"WEAPON// drop the backpack
    
new c4 engfunc(EngFunc_FindEntityByString, -1"classname"WEAPON// find weapon_c4 entity
    
if (!c4)
        return

    new 
backpack pev(c4pev_owner// get backpack entity
    
if (backpack <= g_maxplayers)
        return

    
// my backpack transfer trick (improved)
    
set_pev(backpackpev_flagspev(backpackpev_flags) | FL_ONGROUND)
    
dllfunc(DLLFunc_Touchbackpackrecipient)

    
// hud messages stuff below
    
set_hudmessage(025500.350.8__MSG_TIME)
    new 
message[128], c_name[32], r_name[32]
    
get_user_name(carrierc_name31)
    
get_user_name(recipientr_name31)
    
format(message127"Bomb transferred to ^"%s^"^nsince ^"%s^" is AFK"r_namec_name)
    for (new 
0num; ++i)
        
show_hudmessage(id[i], "%s"message)

    
set_hudmessage(25525500.420.3__MSG_TIME__3)
    
show_hudmessage(recipient"You got the bomb!")
}

//Game description forward.
public GameDesc() 

    static 
gamename[32]; 
    
get_pcvar_stringamx_warnamegamename31 ); 
    
forward_returnFMV_STRINGgamename ); 
    return 
FMRES_SUPERCEDE
}  


//Event death.
public Event_DeathMsg_Knife()
{
    if(
g_MatchStarted)
    {
        new 
attacker_one read_data(1
        new 
victim_one read_data(2

        if(
g_MatchStarted)
        {
            if( 
victim_one != attacker_one && cs_get_user_team(attacker_one) != cs_get_user_team(victim_one)) 
            { 
                
g_TotalKills[attacker_one]++
                
g_TotalDeaths[victim_one]++
            }
        }
    }

    return 
PLUGIN_HANDLED

}


public 
bomb_plantedid )
{
    if ( 
g_MatchStarted )
    {
        
g_BombPlants[id]++
    }
}



public 
bomb_defusedid )
{

    if ( 
g_MatchStarted )
    {
        
g_BombDefusions[id]++
    }
}


public 
GetMatchMenu(id)
{  
    if(
CaptainSChosen)
    {
        if(
id != CaptainChoosenID)
        {
          
            if(
WhoChoseThePlayer == 1)
            {
                
LetsSecondChoosePlayers(ShowMenuSecond)
            }

            if(
WhoChoseThePlayer == 2)
            {
                
LetsFirstChoosePlayers(ShowMenuFirst)
            }
        }
      
    }

    return 
PLUGIN_HANDLED
}

public 
RestartMatch(id,lvl,cid)
{
    if(!
cmd_access(id,lvl,cid,0))
        return 
PLUGIN_HANDLED
    
    
if(g_MatchInit || g_MatchStarted || g_KnifeRound)
    {
        
//Log AMX, Who stopped the match!.
        
new MatchRestarterName[32
        
get_user_name(idMatchRestarterNamecharsmax(MatchRestarterName)) 

        new 
MatchRestarterAuthID[128
        
get_user_authid(idMatchRestarterAuthID127)

        
log_amx("Admin %s with ID = %i and AuthID %s has restarted the Match !",MatchRestarterName,id,MatchRestarterAuthID)

        
server_cmd("mp_freezetime 999");

        
set_dhudmessage(02550, -1.0, -1.002.06.00.80.8)
        
show_dhudmessage(0,"Admin has restarted the Match ! ^n Captains will be chosen shortly..")

        
set_task(8.0,"RestartMatchTask",id)

        return 
PLUGIN_HANDLED

    

    return 
PLUGIN_HANDLED
}

public 
RestartMatchTask(id)
{

    
LoadPubSettings()
    
ShowMenuSpecial(id)   
}

//Stop the Match.
public StopMatch(id,lvlcid)
{

    if(!
cmd_access(idlvlcid0))
        return 
PLUGIN_HANDLED;


    if(
g_MatchInit || g_MatchStarted || g_KnifeRound)
    {
        
//Log AMX, Who stopped the match!.
        
new MatchStopperName[32
        
get_user_name(idMatchStopperNamecharsmax(MatchStopperName)) 

        new 
MatchStopperAuthID[128
        
get_user_authid(idMatchStopperAuthID128)

        
log_amx("Admin %s with AuthID %s has stopped the Match !",MatchStopperName,MatchStopperAuthID)

        
server_cmd("mp_freezetime 999");

        
set_dhudmessage(02550, -1.0, -1.002.06.00.80.8)
        
show_dhudmessage(0,"Admin has Stopped the Match ! ^n Server will restart now.")

        
set_task(8.0,"RestartServerForStoppingMatch")

        return 
PLUGIN_HANDLED

    

    return 
PLUGIN_HANDLED
}


//Stop match special when owner is not there.
public StopMatchSpecial()
{

    if(
g_MatchInit || g_MatchStarted || g_KnifeRound)
    {
        

        
server_cmd("mp_freezetime 999");

        
set_dhudmessage(02550, -1.0, -1.002.06.00.80.8)
        
show_dhudmessage(0,"Match Lord has Left the Game ! ^n Server will restart now.")

        
set_task(4.0,"RestartServerForStoppingMatch")

    } 
    return 
PLUGIN_HANDLED
}

public 
RestartServerForStoppingMatch()
{
    new 
CurrentMap[33]
    
get_mapname(CurrentMap,32)

    
server_cmd("changelevel %s",CurrentMap)

    return 
PLUGIN_HANDLED
}


public 
GoToTheSpec(id)
{
    if(
g_MatchInit || g_KnifeRound)
    {   
        if(
is_user_connected(id))
        {
            
set_task(3.0,"TransferToSpec",id)
        }
    }
}


//Terrorist Win event.
public on_TerroristWin()
{

    
//Terrorrist Knife round winner.
    
if(g_KnifeRound == true)
    {
        
        
// T WOWN.
        
ShowMenuFirst gCptT
        ShowMenuSecond 
gCptCT

        
//Set Names of the Captain. because captain may leave the game.
        
get_user_name(ShowMenuFirstFirstCaptainNamecharsmax(FirstCaptainName)) 
        
get_user_name(ShowMenuSecondSecondCaptainNamecharsmax(SecondCaptainName))

        

        
set_task3.0"GiveRestartRound"___"a"); 

        
set_task(2.0,"FirstCaptainWonKnifeRoundMessage",gCptT)

        
g_KnifeRound false
        LoadMatchSettings
()
    }

    if(
g_MatchStarted)
    {

        if(
isFirstHalfStarted)
        {
            if(
FirstCaptainTeamName == 1)
            {
                
ScoreFtrstTeam++
            }
            else
            {
                
ScoreScondteam++
            }

            
//Change description of the game.
            
if(ScoreFtrstTeam ScoreScondteam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 1st-H: %d To %d",ScoreFtrstTeam,ScoreScondteam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"1st-H: %d To %d",ScoreFtrstTeam,ScoreScondteam)
                }
                
                
set_cvar_string("amx_warname",GameDescBuffer)
            }

            if(
ScoreScondteam ScoreFtrstTeam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 1st-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"1st-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                
set_cvar_string("amx_warname",GameDescBuffer)
            }

            if(
ScoreFtrstTeam == ScoreScondteam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 1st-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"1st-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                
set_cvar_string("amx_warname",GameDescBuffer)
            }

        }
        if(
isSecondHalfStarted)
        {
            if(
FirstCaptainTeamName == 1)
            {
                
ScoreScondteam++
            }
            else
            {
                
ScoreFtrstTeam++
            }

            
//Change description of the game.
            
if(ScoreFtrstTeam ScoreScondteam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 2nd-H: %d To %d",ScoreFtrstTeam,ScoreScondteam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"2nd-H: %d To %d",ScoreFtrstTeam,ScoreScondteam)
                }

                
set_cvar_string("amx_warname",GameDescBuffer)
            }

            if(
ScoreScondteam ScoreFtrstTeam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 2nd-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"2nd-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                
set_cvar_string("amx_warname",GameDescBuffer)
            }

            if(
ScoreFtrstTeam == ScoreScondteam)
            {
                new 
GameDescBuffer[32]

                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 2nd-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"2nd-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                
set_cvar_string("amx_warname",GameDescBuffer)
            }
        }
    }
}

//CT WIN Event.
public on_CTWin()
{

    if(
g_KnifeRound)
    {
            
            
// CT WON.
            
ShowMenuFirst gCptCT
            ShowMenuSecond 
gCptT

             
//Set Names of the Captain. because captain may leave the game.
            
get_user_name(ShowMenuFirstFirstCaptainNamecharsmax(FirstCaptainName)) 
            
get_user_name(ShowMenuSecondSecondCaptainNamecharsmax(SecondCaptainName)) 

            
get_user_authid(ShowMenuFirstFirstCaptainAuthID127)
            
get_user_authid(ShowMenuSecondSecondCaptainAuthID127)

             
g_KnifeRound false
        

            set_task
3.0"GiveRestartRound"___"a"); 

            
set_task(2.0,"SecondCaptWonKnifeRoundWonMessage",gCptCT)
            
            
LoadMatchSettings()
    }
    
    if(
g_MatchStarted)
    {
        if(
isFirstHalfStarted)
        {
            if(
FirstCaptainTeamName == 2)
            {
                
ScoreFtrstTeam++
            }
            else
            {
                
ScoreScondteam++
            }

            
//Change description of the game.
            
if(ScoreFtrstTeam ScoreScondteam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 1st-H: %d To %d",ScoreFtrstTeam,ScoreScondteam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"1st-H: %d To %d",ScoreFtrstTeam,ScoreScondteam)
                }
                
                
set_cvar_string("amx_warname",GameDescBuffer)
            }

            if(
ScoreScondteam ScoreFtrstTeam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 1st-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"1st-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                
set_cvar_string("amx_warname",GameDescBuffer)
            }

            if(
ScoreFtrstTeam == ScoreScondteam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 1st-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"1st-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                
                
set_cvar_string("amx_warname",GameDescBuffer)
            }
        }

        if(
isSecondHalfStarted)
        {
            if(
FirstCaptainTeamName == 2)
            {
                
ScoreScondteam++
            }
            else
            {
                
ScoreFtrstTeam++
            }

            
//Change description of the game.
            
if(ScoreFtrstTeam ScoreScondteam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 2nd-H: %d To %d",ScoreFtrstTeam,ScoreScondteam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"2nd-H: %d To %d",ScoreFtrstTeam,ScoreScondteam)
                }

                
set_cvar_string("amx_warname",GameDescBuffer)
            }

            if(
ScoreScondteam ScoreFtrstTeam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 2nd-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"2nd-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }

                
set_cvar_string("amx_warname",GameDescBuffer)
            }

            if(
ScoreFtrstTeam == ScoreScondteam)
            {
                new 
GameDescBuffer[32]
                if(
g_OverTime)
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"OT- 2nd-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }
                else
                {
                    
formatex(GameDescBuffer,charsmax(GameDescBuffer),"2nd-H: %d To %d",ScoreScondteam,ScoreFtrstTeam)
                }

                
set_cvar_string("amx_warname",GameDescBuffer)
            }

        }
    }
}


//ROUND START Event.
public logevent_round_start()
{

    if(
g_KnifeRound)
    {

        
set_dhudmessage(255255255, -1.0, -1.002.06.00.80.8)
        
show_dhudmessage(0,"-= Knife Round Begins =- ^n Captain: %s ^n Vs. ^n Captain: %s",TempFirstCaptain,TempSecondCaptain)  

        
ColorChat(0,"!t[ECS WAR] !g !tKnife Round !yhas !gbeen started ! ")
        
ColorChat(0,"!t[ECS WAR] !g Knife War: !yCaptain- !t %s !gVs. !yCaptain- !t%s",TempFirstCaptain,TempSecondCaptain)
        
ColorChat(0,"!t[ECS WAR] !g Knife War: !yCaptain- !t %s !gVs. !yCaptain- !t%s",TempFirstCaptain,TempSecondCaptain)
     
    }
    
    if(
g_MatchStarted)
    {
        
//Show Score info in Hud on every round start.
        
ShowScoreHud()
        
set_task(3.0,"ShowScoreOnRoundStart")
    }
}

//When Client join the server and if match is initialized or Knife round is running transfer player to spec.
public client_putinserver(id)
{

    if(
g_MainMatchStarted)
    {
        
Frags[id] = 0
        Deaths
[id] = 0
    
}

    
g_TotalKills[id]    = 0
    g_TotalDeaths
[id]   = 0
    g_BombPlants
[id]    = 0
    g_BombDefusions
[id] = 0

    
if(g_MatchInit || g_KnifeRound)
    {
        
set_task(7.0,"TransferToSpec",id)
    }

}

//Menu for restart !
public ShowMenuSpecial(id)
{
    

    
//Store who started the match!.
    
MatchStarterOwner id

    
//Log AMX, Who stopped the match!.
    
new MatchStarterName[32
    
get_user_name(idMatchStarterNamecharsmax(MatchStarterName)) 

    new 
MatchStarterAuthID[128
    
get_user_authid(idMatchStarterAuthID127)


    
// Match has been initialized! 
    
g_MatchInit true


    
// TASK 1 - To Move All the players in Spec.
    
cmdTransferAllInSpec();

    
//Send message to players about message.
    
MatchInitHudMessage()


    
//Task 2 - Show Players Menu to who started the match.
    
set_task(5.0"ShowMenuPlayers"id)
    

    return 
PLUGIN_HANDLED;
}



//Choose Captains and Initialize Match.
public ShowMenu(idlvlcid)
{
    if(!
cmd_access(idlvlcid0))
        return 
PLUGIN_HANDLED;

    if(
g_MatchInit || g_MatchStarted)
    return 
PLUGIN_HANDLED


    MatchStarterOwner 
id

    
//Match initialized. 
    
set_cvar_string("amx_warname","[ECS-WAR] Initialized!")

    
//Log AMX, Who stopped the match!.
    
new MatchStarterName[32
    
get_user_name(idMatchStarterNamecharsmax(MatchStarterName)) 

    new 
MatchStarterAuthID[128
    
get_user_authid(idMatchStarterAuthID127)

    
// Match has been initialized! 
    
g_MatchInit true

    
// TASK 1 - To Move All the players in Spec.
    
cmdTransferAllInSpec();

    
//Send message to players about message.
    
MatchInitHudMessage()


    
//Task 2 - Show Players Menu to who started the match.
    
set_task(3.0"ShowMenuPlayers"id)
    

    return 
PLUGIN_HANDLED;
}

//Show HUD Message and Print message to inform player about match started !
public MatchInitHudMessage()
{
    
set_dhudmessage(02550, -1.0, -1.002.06.00.80.8)
    
show_dhudmessage(0,"The Match has been Initialized ! ^n Captains will be chosen by the Match Lord.")

    
ColorChat(0,"!t[ECS WAR] !g The Match has been !tInitialized.")
    
ColorChat(0,"!t[ECS WAR] !g The Match has been !tInitialized.")
    
ColorChat(0,"!t[ECS WAR] !g Captains will be !tchosen.")
}

public 
ShowMenuPlayers(id)
{
    
set_cvar_string("amx_warname","Captain Selection!")

    new 
iMenu MakePlayerMenuid"Choose a Captain""PlayersMenuHandler" );
    
menu_setpropiMenuMPROP_NUMBER_COLOR"\y" );
    
menu_displayidiMenu );

    return 
PLUGIN_CONTINUE;
}

MakePlayerMenuid, const szMenuTitle[], const szMenuHandler[] )
{
    new 
iMenu menu_createszMenuTitleszMenuHandler );
    new 
iPlayers[32], iNumiPlayerszPlayerName[32], szUserId[33];
    
get_playersiPlayersiNum"h" );

    new 
PlayerWithPoints[128]

    for(new 
i=0;i<iNum;i++)
    {
        
iPlayer iPlayers[i];
        
        
//Add user in the menu if - CONNECTED and TEAM IS T.
        
if(get_user_team(iPlayer) == )
        {
            
            
get_user_nameiPlayerszPlayerNamecharsmaxszPlayerName ) );

            
formatex(PlayerWithPoints,127,"%s",szPlayerName)

            
formatexszUserIdcharsmaxszUserId ), "%d"get_user_useridiPlayer ) );
            
menu_additemiMenuPlayerWithPointsszUserId);

        }
        
        
    }


    return 
iMenu;
}

public 
PlayersMenuHandleridiMenuiItem )
{
    if ( 
iItem == MENU_EXIT )
    {
        
// Recreate menu because user's team has been changed.
        
new iMenu MakePlayerMenuid"Choose a Captain""PlayersMenuHandler" );
        
menu_setpropiMenuMPROP_NUMBER_COLOR"\y" );
        
menu_displayidiMenu );

        return 
PLUGIN_HANDLED;
    }

    new 
szUserId[32], szPlayerName[32], iPlayeriCallback;

    
menu_item_getinfoiMenuiItemiCallbackszUserIdcharsmaxszUserId ), szPlayerNamecharsmaxszPlayerName ), iCallback );

    if ( ( 
iPlayer find_player"k"str_to_numszUserId ) ) )  )
    {
      
        if(
CaptainCount == 0)
        {
            
            
//cs_set_user_team(iPlayer, CS_TEAM_CT)
            
rg_set_user_team(iPlayer,TEAM_CT,MODEL_AUTO,true)

            new 
ChosenCaptain[32
            
get_user_name(iPlayerChosenCaptaincharsmax(ChosenCaptain)) 
            
ColorChat(0,"!t[ECS WAR] !gPlayer  !t%s chosen !yas  First !tCaptain! "ChosenCaptain)  

            
CaptainCount++  

            
//Temp captain name.
            
get_user_name(iPlayerTempFirstCaptaincharsmax(TempFirstCaptain)) 
          
            
//Assign CT Captain
            
gCptCT iPlayer

            
//Recreate menu.
            
menu_destroy(iMenu)
            new 
iMenu MakePlayerMenuid"Choose a Captain""PlayersMenuHandler" );
            
menu_setpropiMenuMPROP_NUMBER_COLOR"\y" );
            
menu_displayidiMenu );

            return 
PLUGIN_HANDLED;

        }

        if(
CaptainCount == 1)
        {
            
            
//cs_set_user_team(iPlayer, CS_TEAM_T)
            
rg_set_user_team(iPlayer,TEAM_TERRORIST,MODEL_AUTO,true)


            new 
ChosenCaptain[32
            
get_user_name(iPlayerChosenCaptaincharsmax(ChosenCaptain)) 
            
ColorChat(0,"!t[ECS WAR] !gPlayer  !t%s chosen !yas Second !tCaptain! "ChosenCaptain)

            
CaptainCount++


             
//Temp captain name.
            
get_user_name(iPlayerTempSecondCaptaincharsmax(TempSecondCaptain)) 

            
//Assign T Captain
            
gCptT iPlayer

            
//Set it to true because captains have been chosen.
            
CaptainSChosen true

            
//Announcement.
            
set_dhudmessage(25500, -1.0, -1.002.06.00.80.8)
            
show_dhudmessage(0,"Get Ready Captains! ^n The Knife Round will Start in 10 seconds....")
            
ColorChat(0,"!t[ECS WAR] !gAttention ! !yThe !tKnife Round !gWill Start in 10 seconds!")

            
//Start knife round.
            
set_task(10.0,"Knife_Round")

            
//Captain choosing is over so destroy menu.
            
menu_destroy(iMenu)
            return 
PLUGIN_HANDLED;
        }
        
    }
    
    
// Recreate menu because user's team has been changed.
    
new iMenu MakePlayerMenuid"Choose a Captain""PlayersMenuHandler" );
    
menu_setpropiMenuMPROP_NUMBER_COLOR"\y" );
    
menu_displayidiMenu );

    return 
PLUGIN_HANDLED;
}

public 
Knife_Round()
{

    
set_cvar_string("amx_warname","Captain Knife WAR")
    
server_cmd("mp_autokick 0")
    
server_cmd("mp_autoteambalance 0")
    
set_task3.0"GiveRestartRound"___"a"); 
    
set_task(10.0,"SetKnifeRoundTrue")
}

public 
SetKnifeRoundTrue()
{
    
g_KnifeRound true
}

//Round end Checker
public round_end()
{

    new 
PlayersMAX_PLAYERS ], iNum,id;
    
get_playersPlayersiNum"h" );

    if(
g_MatchStarted)
    {
       
//Increment rounds.
        
RoundCounter++


        
ShowScoreHud()
        
CheckForWinningTeam()


        if(
g_OverTime)
        {
            
//Over time logic.
            
if(RoundCounter == 3)
            {

                
//Loop through users and set user score + death.
                
new players[32], num
                get_players
(playersnum,"h")
                
                new 
player
                
for(new 0numi++)
                {
                    
player players[i]
                    if(
is_user_connected(player))
                    {
                        
Frags[player] = get_user_frags(player)
                        
Deaths[player] = cs_get_user_deaths(player)
                    }

                }

                
server_cmd("mp_freezetime 999")
                
set_task(7.0,"SwapTeamsOverTimeMessage")
            }
        }
        else
        {
            if(
RoundCounter == 15)
            {
                
                
//Loop through users and set user score + death.
                
new players[32], num
                get_players
(playersnum,"h")
                
                new 
player
                
for(new 0numi++)
                {
                    
player players[i]
                    if(
is_user_connected(player))
                    {
                        
Frags[player] = get_user_frags(player)
                        
Deaths[player] = cs_get_user_deaths(player)
                    }

                }

                
server_cmd("mp_freezetime 999")
                
set_task(7.0,"SwapTeamsMessage")

                
            }
        }

    }
}

//Choose the team.
public ChooseTeam(id)
{
    
set_cvar_string("amx_warname","Captain Team Selection")

    
set_dhudmessage(255255255, -1.0, -1.002.06.00.80.8)
    
show_dhudmessage(0,"Captain %s will Choose Team and Players First !",FirstCaptainName)
    
    new 
TeamChooser MakeTeamSelectorMenuid"Please Choose the Team.""TeamHandler" );
    
menu_setpropTeamChooserMPROP_NUMBER_COLOR"\y" );
    
menu_displayidTeamChooser );

}

MakeTeamSelectorMenuid, const szMenuTitle[], const szMenuHandler[])
{
     new 
TeamChooser menu_createszMenuTitleszMenuHandler );
     
menu_additemTeamChooser"Counter-Terrorist" );
     
menu_additemTeamChooser"Terrorist");

     return 
TeamChooser;
}

public 
TeamHandler(idTeamChooseriItem )
{
    if ( 
iItem == MENU_EXIT )
    {
        
// Recreate menu because user's team has been changed.
        
new TeamChooser MakeTeamSelectorMenuid"Please Choose the Team.""TeamHandler" );
        
menu_setpropTeamChooserMPROP_NUMBER_COLOR"\y" );
        
menu_displayidTeamChooser );

        return 
PLUGIN_HANDLED;
    }


    switch(
iItem)
    {
        
//Chosen CT.
        
case 0:
        {
            
ColorChat(0,"!t[ECS WAR] !gCaptain !t%s !ychosen Team- !gCounter-Terrorist",FirstCaptainName)

           
            
FirstCaptainTeamName 2
            SecondCaptainTeamName 
1

            
if(get_user_team(id) != 2)
            {
                
SwapPlayer()
            
            }
            
set_cvar_string("amx_warname","=[ Players Selection ]=")         

            
set_task(5.0,"LetsFirstChoosePlayers",id)


        }
        
//Chosen T.
        
case 1:
        {

            
FirstCaptainTeamName 1
            SecondCaptainTeamName 
2

            ColorChat
(0,"!t[ECS WAR] !gCaptain !t%s !ychosen Team- !gTerrorist",FirstCaptainName)

            if(
get_user_team(id) != 1)
            {
                
SwapPlayer()
            }

            
set_cvar_string("amx_warname","=[ Players Selection ]=")

          

            
set_task(5.0,"LetsFirstChoosePlayers",id)
        }
    }
    return 
PLUGIN_HANDLED;
}

// MENU TO CHOOSE PLAYERS !!!
public LetsFirstChoosePlayers(id)
{
     

    new 
players[32], count;     
    
get_players(playerscount,"eh","SPECTATOR"); 

    if(
count 0)
    {
        new 
iChoosePlayers LetsFirstChoosePlayersMenuid"Choose A player.""LetsFirstChoosePlayersHandler" );
        
menu_setpropiChoosePlayersMPROP_NUMBER_COLOR"\y" );
        
menu_displayidiChoosePlayers );
        
        return 
PLUGIN_HANDLED;
    }
    else
    {
     
        
set_cvar_string("amx_warname","Teams Are Set!")

        
set_dhudmessage(0,2550, -1.0, -1.002.06.00.80.8)
        
show_dhudmessage(0,"Teams are SET ! ^n ^n First Half will start Now.......")

        
set_task(2.0"GiveRestartRound"); 

        
set_task(4.0,"LiveOnThreeRestart");

        
set_task(8.0,"StartMatch")

        return 
PLUGIN_HANDLED;
    }
}

LetsFirstChoosePlayersMenu(id, const szMenuTitle[], const szMenuHandler[])
{


    new 
iChoosePlayers menu_createszMenuTitleszMenuHandler );
    new 
iPlayers[32], iNumiPlayerszPlayerName[32], szUserId[32];
    
get_playersiPlayersiNum"h" );

    new 
PlayerWithPoints[128]

    for(new 
;i<iNum;i++)
    {
        
iPlayer iPlayers[i];
       
        
//Add user in the menu if - CONNECTED and TEAM IS T.
        
if(get_user_team(iPlayer) == )
        {             
            
get_user_nameiPlayerszPlayerNamecharsmaxszPlayerName ) );

            
formatex(PlayerWithPoints,127,"%s",szPlayerName)

            
formatexszUserIdcharsmaxszUserId ), "%d"get_user_useridiPlayer ) );
            
menu_additemiChoosePlayersPlayerWithPointsszUserId);

        }
        
    
    }
    return 
iChoosePlayers;
}

public 
LetsFirstChoosePlayersHandleridiChoosePlayersiItem )
{
    if ( 
iItem == MENU_EXIT )
    {
        new 
iChoosePlayers LetsFirstChoosePlayersMenuid"Choose A player.""LetsFirstChoosePlayersHandler" );
        
menu_setpropiChoosePlayersMPROP_NUMBER_COLOR"\y" );
        
menu_displayidiChoosePlayers );
        
        return 
PLUGIN_HANDLED;
    }

    new 
szUserId[32], szPlayerName[32], iPlayer,  iCallback;
    
menu_item_getinfoiChoosePlayersiItemiCallbackszUserIdcharsmaxszUserId ), szPlayerNamecharsmaxszPlayerName ), iCallback );

    if ( ( 
iPlayer find_player"k"str_to_numszUserId ) ) )  )
    {


        new 
ChoosenPlayer[32
        
get_user_name(iPlayerChoosenPlayercharsmax(ChoosenPlayer)) 
     

        
ColorChat(0,"!t[ECS WAR] !gCaptain !t%s !gchose !yPlayer !g%s ",FirstCaptainName,ChoosenPlayer);

        

        if(!
is_user_connected(iPlayer))
        {
            new 
iChoosePlayers LetsFirstChoosePlayersMenuid"Choose A player.""LetsFirstChoosePlayersHandler" );
            
menu_setpropiChoosePlayersMPROP_NUMBER_COLOR"\y" );
            
menu_displayidiChoosePlayers );
            
            return 
PLUGIN_HANDLED;
        }
        else
        {
            
CaptainChoosenID id
            WhoChoseThePlayer 
1
            
//cs_set_user_team(iPlayer, cs_get_user_team(id))
            
            
new CsTeams:team cs_get_user_team(id)

            if(
team == CS_TEAM_CT)
            {
                
//transfer player to ct.
                
rg_set_user_team(iPlayer,TEAM_CT,MODEL_AUTO,true)
            }

            if(
team == CS_TEAM_T)
            {
                
//transfer player to Terrorist.
                
rg_set_user_team(iPlayer,TEAM_TERRORIST,MODEL_AUTO,true)
            }

            
            
LetsSecondChoosePlayers(ShowMenuSecond)
            return 
PLUGIN_HANDLED;
        }
    }
return 
PLUGIN_HANDLED;

}



// MENU TO CHOOSE PLAYERS !!!
public LetsSecondChoosePlayers(id)
{


    new 
players[32], count;     
    
get_players(playerscount,"eh","SPECTATOR"); 

    if(
count 0)
    {
        new 
iChoosePlayers LetsSecondChoosePlayersMenuid"Choose A player.""LetsSecondChoosePlayersHandler" );
        
menu_setpropiChoosePlayersMPROP_NUMBER_COLOR"\y" );
        
menu_displayidiChoosePlayers );

        return 
PLUGIN_HANDLED;
    }
    else
    {
        
//TEAMS ARE SET BECAUSE NO PLAYERS IN SPEC!

        
set_dhudmessage(02550, -1.0, -1.002.06.00.80.8)
        
show_dhudmessage(0,"Teams are SET ! ^n ^n First Half will start Now.......")
        
        
set_task(2.0"GiveRestartRound"); 

        
set_task(4.0,"LiveOnThreeRestart");

        
set_task(8.0,"StartMatch")

        return 
PLUGIN_HANDLED;
    }
    
}

LetsSecondChoosePlayersMenu(id, const szMenuTitle[], const szMenuHandler[])
{
    new 
iChoosePlayers menu_createszMenuTitleszMenuHandler );
    new 
iPlayers[32], iNumiPlayerszPlayerName[32], szUserId[32];
    
get_playersiPlayersiNum"h" );

    new 
PlayerWithPoints[128]

    for(new 
0;i<iNum;i++)
    {
        
iPlayer iPlayers[i];    
 
        
//Add user in the menu if - CONNECTED and TEAM IS T.
        
if(get_user_team(iPlayer) == )
        {
             
            
get_user_nameiPlayerszPlayerNamecharsmaxszPlayerName ) );

            
formatex(PlayerWithPoints,127,"%s",szPlayerName)

            
formatexszUserIdcharsmaxszUserId ), "%d"get_user_useridiPlayer ) );
            
menu_additemiChoosePlayersPlayerWithPointsszUserId);

        }
      
        
    }
    return 
iChoosePlayers;
}

public 
LetsSecondChoosePlayersHandleridiChoosePlayersiItem )
{
    if ( 
iItem == MENU_EXIT )
    {
        new 
iChoosePlayers LetsSecondChoosePlayersMenuid"Choose A player.""LetsSecondChoosePlayersHandler" );
        
menu_setpropiChoosePlayersMPROP_NUMBER_COLOR"\y" );
        
menu_displayidiChoosePlayers ); 
        return 
PLUGIN_HANDLED;
    }

    new 
szUserId[32], szPlayerName[32], iPlayeriCallback;
    
menu_item_getinfoiChoosePlayersiItemiCallbackszUserIdcharsmaxszUserId ), szPlayerNamecharsmaxszPlayerName ), iCallback );

    if ( ( 
iPlayer find_player"k"str_to_numszUserId ) ) )  )
    {
       

        new 
ChoosenPlayer[32
        
get_user_name(iPlayerChoosenPlayercharsmax(ChoosenPlayer)) 
     

        
ColorChat(0,"!t[ECS WAR] !gCaptain !t%s !gchose !yPlayer !g%s",SecondCaptainName,ChoosenPlayer);

        if(!
is_user_connected(iPlayer))
        {
            new 
iChoosePlayers LetsSecondChoosePlayersMenuid"Choose A player.""LetsSecondChoosePlayersHandler" );
            
menu_setpropiChoosePlayersMPROP_NUMBER_COLOR"\y" );
            
menu_displayidiChoosePlayers ); 
            return 
PLUGIN_HANDLED;
        }
        else
        {   
            
WhoChoseThePlayer 2
            CaptainChoosenID 
id
            
//cs_set_user_team(iPlayer, cs_get_user_team(id))
            
            
new CsTeams:team cs_get_user_team(id)

            if(
team == CS_TEAM_CT)
            {
                
//transfer player to ct.
                
rg_set_user_team(iPlayer,TEAM_CT,MODEL_AUTO,true)
            }

            if(
team == CS_TEAM_T)
            {
                
//transfer player to Terrorist.
                
rg_set_user_team(iPlayer,TEAM_TERRORIST,MODEL_AUTO,true)
            }

            
            
LetsFirstChoosePlayers(ShowMenuFirst);
            return 
PLUGIN_HANDLED;
        }
        
    }

    return 
PLUGIN_HANDLED;
}


public 
client_disconnected(id)
{
    if(
CaptainSChosen || g_KnifeRound)
    {
        if(
id == gCptCT || id == gCptT)
        {

            if(
is_user_connected(MatchStarterOwner))
            {
                
set_hudmessage(02550, -1.0, -1.002.06.00.80.8, -1)
                
show_hudmessage(0,"Restarting the Match! ^n One of the Captain left the Game.")

                
RestartMatchTask(MatchStarterOwner)
            }
            else
            {

                
StopMatchSpecial()
            }

        }
    }


    if(
g_MainMatchStarted)
    {

        
//Set score and death to zero.
        
Frags[id] = 0
        Deaths
[id] = 0

        g_TotalLeaves
++
        
    }
}

public 
DoRanking()
{
    new 
KillerName[256], DeathsName[256], BombPName[256], BombDName[256]
    new 
players[32], pnumtempid
    
new topKillerIDtopDeathsIDtopBombPIDtopBombDID
    
new topKillstopDeathstopBombPtopBombD

    get_players
(playerspnum)

    for ( new 
pnum i++ )
    {
        
tempid players[i]
        
        if ( 
g_TotalKills[tempid] >= topKills && g_TotalKills[tempid] )
        {
            
topKills g_TotalKills[tempid]
            
topKillerID tempid
        
}
        
        if ( 
g_TotalDeaths[tempid] >= topDeaths && g_TotalDeaths[tempid] )
        {
            
topDeaths g_TotalDeaths[tempid]
            
topDeathsID tempid
        
}
        
        if ( 
g_BombPlants[tempid] >= topBombP && g_BombPlants[tempid] )
        {
            
topBombP g_BombPlants[tempid]
            
topBombPID tempid
        
}
        
        if ( 
g_BombDefusions[tempid] >= topBombD && g_BombDefusions[tempid] )
        {
            
topBombD g_BombDefusions[tempid]
            
topBombDID tempid
        
}
    }
    
    if ( 
<= topKillerID <= gMaxPlayers )
        
get_user_name(topKillerIDKillerNamecharsmax(KillerName))
    if ( 
<= topDeathsID <= gMaxPlayers )
        
get_user_name(topDeathsIDDeathsNamecharsmax(DeathsName))
    if ( 
<= topBombPID <= gMaxPlayers )
        
get_user_name(topBombPIDBombPNamecharsmax(BombPName))
    if ( 
<= topBombDID <= gMaxPlayers )
        
get_user_name(topBombDIDBombDNamecharsmax(BombDName))
    
    for ( new 
pnum i++ )
    {
        
tempid players[i]
        
        if ( 
g_TotalKills[tempid] == topKills && tempid != topKillerID && g_TotalKills[tempid]  )
        {
            new 
lineToAdd[65] = ", "
            
new pName[64]
            
get_user_name(tempidpNamecharsmax(pName))
            
add(lineToAddcharsmax(lineToAdd), pName)
            
add(KillerNamecharsmax(KillerName) - strlen(BombDName) , lineToAdd)
        }
        
        if ( 
g_TotalDeaths[tempid] == topDeaths && tempid != topDeathsID && g_TotalDeaths[tempid]  )
        {
            new 
lineToAdd[65] = ", "
            
new pName[64]
            
get_user_name(tempidpNamecharsmax(pName))
            
add(lineToAddcharsmax(lineToAdd), pName)
            
add(DeathsNamecharsmax(DeathsName) - strlen(DeathsName) , lineToAdd)
        }
        
        if ( 
g_BombPlants[tempid] == topBombP && tempid != topBombPID && g_BombPlants[tempid]  )
        {
            new 
lineToAdd[65] = ", "
            
new pName[64]
            
get_user_name(tempidpNamecharsmax(pName))
            
add(lineToAddcharsmax(lineToAdd), pName)
            
add(BombPNamecharsmax(BombPName) - strlen(BombPName) , lineToAdd)
        }
        
        if ( 
g_BombDefusions[tempid] == topBombD && tempid != topBombDID && g_BombDefusions[tempid]  )
        {
            new 
lineToAdd[65] = ", "
            
new pName[64]
            
get_user_name(tempidpNamecharsmax(pName))
            
add(lineToAddcharsmax(lineToAdd), pName)
            
add(BombDNamecharsmax(BombDName) - strlen(BombDName) , lineToAdd)
        }
    }
    

    
msgToDisplay "Match Player Rankings^n-----------------------------^n^nTop Kills - %s [%d Kills]^nTop Deaths - %s [%d Deaths]^nTop Bomb Plants - %s [%d Bomb Plants]^nTop Bomb Defusions - %s [%d Bomb Defusions]^nECS-WAR Total Leavers - %d"
    
format(msgToDisplaycharsmax(msgToDisplay), msgToDisplaystrlen(KillerName) ? KillerName "NONE"topKillsstrlen(DeathsName) ? DeathsName "NONE"topDeaths,
            
strlen(BombPName) ? BombPName "NONE"topBombPstrlen(BombDName) ? BombDName "NONE"topBombDg_TotalLeaves)
            
    new 
taskId 6969        
    set_task
(1.0"displayRankingTable"taskIdmsgToDisplaystrlen(msgToDisplay), "b")

}

public 
displayRankingTable(msgToDisplay[], taskId)
{
    
set_hudmessage(135135135, -1.0, -1.0,  06.06.00.50.15, -1)
    
show_hudmessage(0msgToDisplay)
}


// ====================== FUNCTIONS!! ===========================================================================================

//Prevent from choosing team while match is going on.
public cmdChooseTeam(id)
{
    if(
g_MatchInit || g_KnifeRound || g_MatchStarted)
    {
        
        if (
cs_get_user_team(id) == CS_TEAM_SPECTATOR)
        return 
PLUGIN_HANDLED;
        
ColorChat(id"!g[ECS WAR] !tYou cannot !gchoose !ta team !ywhile !gMatch !yis !tgoing on.");
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

//Checking for knife
public Event_CurWeapon_NotKnife(id)
{
    if ( !
g_KnifeRound 
        return 

    if( !
user_has_weapon(idCSW_KNIFE ) )
        
give_item(id"weapon_knife"
        
engclient_cmd(id"weapon_knife")
}


//Swap teams.
public cmdTeamSwap()
{
    
    new 
players[32], num
    get_players
(playersnum)
    
    new 
player
    
for(new 0numi++)
    {
        
player players[i]

        
        
//rg_set_user_team(iPlayer,TEAM_CT,MODEL_AUTO,true)
        
rg_set_user_team(playercs_get_user_team(player) == CS_TEAM_T TEAM_CT:TEAM_TERRORIST,MODEL_AUTO,true)
    }
    
    return 
PLUGIN_HANDLED
}

public 
SwapPlayer()
{

    new 
players[32], num
    get_players
(playersnum)
    
    new 
player
    
for(new 0numi++)
    {
        
player players[i]
        if(
get_user_team(player) != 3)
        {

            
rg_set_user_team(playercs_get_user_team(player) == CS_TEAM_T TEAM_CT:TEAM_TERRORIST,MODEL_AUTO,true)
             
//cs_set_user_team(player, cs_get_user_team(player) == CS_TEAM_T ? CS_TEAM_CT:CS_TEAM_T)
        
}
    }
    
    return 
PLUGIN_HANDLED
}

public 
cmdTransferAllInSpec()
{

    new 
Players[32
    new 
playerCountplayer 
    get_players
(PlayersplayerCount"h")

    for(new 
i=0playerCounti++)
    {  
        
player Players[i]

        if(
is_user_connected(player))
        {
            new 
CsTeams:team cs_get_user_team(player)

            if(!(
team == CS_TEAM_UNASSIGNED) || !(team == CS_TEAM_SPECTATOR) )
            {
                
user_kill(player)
                
//cs_set_user_team(player, CS_TEAM_SPECTATOR)
                
set_task(3.0,"DoTransferSpec",player)
            }
            else
            {
                
user_kill(player)
            }
        }

    }

    return 
PLUGIN_HANDLED;
}


public 
DoTransferSpec(id)
{
    if(
is_user_connected(id))
    {
        
user_kill(id)
        
rg_set_user_team(idTEAM_SPECTATOR,MODEL_AUTO,true)
    }
    
}

public 
StartMatch()
{

    
server_cmd("mp_forcechasecam 2")
    
server_cmd("mp_forcecamera 2")


    
set_cvar_string("amx_warname","[ECS-WAR] Started!")

    
set_task3.0"GiveRestartRound"___"a"); 

    
g_MatchInit false
    
    CaptainSChosen 
false
    
    ColorChat
(0,"!t[ECS WAR] !yPlease !gTry !yNot to !tLeave !gThe Match!")
    
ColorChat(0,"!t[ECS WAR] !tFirst Half !gStarted")
    
ColorChat(0,"!t[ECS WAR] !gAttention ! !yThe !tMatch !yHas Been !g STARTED !")

    new 
ServerName[512]

    
//change server name
    
formatex(ServerName,charsmax(ServerName),"iGC |[ECS WAR]- %s VS. %s In Progress",FirstCaptainName,SecondCaptainName)

    
server_cmd("hostname ^"%s^"",ServerName)

    
ServerName[0] = 0

    set_task
(11.0,"MatchStartedTrue")


    
//Set the status of half to first half.
    
isFirstHalfStarted true

    set_task
(12.0,"FirstHalfHUDMessage")

}

//Swap teams for Overtime message.
public SwapTeamsOverTimeMessage()
{
    
GiveRestartRound()

    
set_task(3.0,"TeamSwapMessage")

    
set_task(7.0,"FirstHalfOvertimeCompletedHUDMessage")

    
set_task(12.0,"SwapTeamsAndRestartMatchOT"
}

//Swap Team Message !.
public SwapTeamsMessage()
{

    
GiveRestartRound()

    
set_task(3.0,"TeamSwapMessage")

    
set_task(7.0,"FirstHalfCompletedHUDMessage")

    
set_task(12.0,"SwapTeamsAndRestartMatch")
}

//Swap teams and restart the match OT.
public SwapTeamsAndRestartMatchOT()
{
    
//Swap Teams.
    
cmdTeamSwap()

    
GiveRestartRound();

    
set_task(2.0,"LiveOnThreeRestart");

    
//Give Restart
    
set_task(4.0"GiveRestartRound"___"a"); 

    
ColorChat(0,"!t[ECS WAR OVERTIME] !gTeams !yHave Been !gSwapped !");
    
ColorChat(0,"!t[ECS WAR OVERTIME] !gOver Time !y- !t%i !gSecond half !yhas been !gStarted !",OTCount);
    
ColorChat(0,"!t[ECS WAR OVERTIME] !gOver Time !y- !t%i !gSecond half !yhas been !gStarted !",OTCount);

    
is_secondHalf       true

    
//Set first half status to zero.
    
isFirstHalfStarted false
    isSecondHalfStarted 
true
    set_task
(14.0,"SecondHalfOverTimeHUDMessage")

    
LoadMatchSettings()
}

//Swap teams and restart the match.
public SwapTeamsAndRestartMatch()
{
    
//Swap Teams.
    
cmdTeamSwap()

    
GiveRestartRound();

    
set_task(2.0,"LiveOnThreeRestart");

    
//Give Restart
    
set_task(4.0"GiveRestartRound"___"a"); 

    
ColorChat(0,"!t[ECS WAR] !gTeams !yHave Been !gSwapped !");
    
ColorChat(0,"!t[ECS WAR] !gSecond half !yhas been !gStarted !");
    
    
is_secondHalf       true

    
//Set first half status to zero.
    
isFirstHalfStarted false
    isSecondHalfStarted 
true
    set_task
(14.0,"SecondHalfHUDMessage")

    
LoadMatchSettings()

}


public 
ShowScoreHud()
{

    new 
score_message[1024]

    if(
ScoreFtrstTeam ScoreScondteam)
    {
        
format(score_message1023"* [ECS-WAR] Team [ %s ] winning %i to  %i ",FirstCaptainName,ScoreFtrstTeam,ScoreScondteam)

        
set_dhudmessage(25525500.00.9002.05.00.80.8)
        
show_dhudmessage(0score_message)
    }

    if(
ScoreScondteam ScoreFtrstTeam)
    {
        
format(score_message1023"* [ECS-WAR] Team [ %s ] winning %i To %i",SecondCaptainName,ScoreScondteam,ScoreFtrstTeam)

        
set_dhudmessage(25525500.00.9002.05.00.80.8)
        
show_dhudmessage(0score_message)
    }

    if(
ScoreFtrstTeam == ScoreScondteam)
    {
        
format(score_message1023"* [ECS-WAR] Both Teams Have Won %i Rounds.",ScoreScondteam)

        
set_dhudmessage(25525500.00.9002.05.00.80.8)
        
show_dhudmessage(0score_message)
    }
}

public 
CheckForWinningTeam()
{

    if(
g_OverTime)
    {
        
//Check for the overtime winners.
        
if(ScoreFtrstTeam >= 4)
        {
            
//First team won the match!
            //Change description of the game.
            
            
new GameDescBuffer[32]
            
formatex(GameDescBuffer,charsmax(GameDescBuffer),"GG! %d To %d",ScoreFtrstTeam,ScoreScondteam)

            
set_cvar_string("amx_warname",GameDescBuffer)
           
            
server_cmd("mp_freezetime 99999");
            
set_task(7.0,"FirstTeamWinnerMessage")
        }

        if(
ScoreScondteam >= 4)
        {
            
//Second team won the match.
            
new GameDescBuffer[32]
            
formatex(GameDescBuffer,charsmax(GameDescBuffer),"GG! %d To %d",ScoreScondteam,ScoreFtrstTeam)
            
set_cvar_string("amx_warname",GameDescBuffer)

            
// set_task(8.0,"StartSongForAll")

           
            
server_cmd("mp_freezetime 99999");
            
set_task(7.0,"SecondTeamWinnerMessage"
        }

        if((
ScoreFtrstTeam == 3) & (ScoreScondteam == 3))
        {


            
//Draw. Start next OT. & OT count++.
            
OTCount++
            
RoundCounter 0
            ScoreFtrstTeam 
0
            ScoreScondteam 
0
        
            
new GameDescBuffer[32]
            
formatex(GameDescBuffer,charsmax(GameDescBuffer),"Draw! Over-Time: %i",OTCount)

            
set_cvar_string("amx_warname",GameDescBuffer)

            
server_cmd("mp_freezetime 99999");
            
server_cmd("sv_restart 1");
            
            
set_task(2.0,"MatchDrawMessageOT")
        }

    }
    else
    {
        if(
ScoreFtrstTeam >= 16)
        {
            
//Change description of the game.
            
            
new GameDescBuffer[32]
            
formatex(GameDescBuffer,charsmax(GameDescBuffer),"GG! %d To %d",ScoreFtrstTeam,ScoreScondteam)

            
// set_task(8.0,"StartSongForAll")

            
set_cvar_string("amx_warname",GameDescBuffer)
            
            
server_cmd("mp_freezetime 99999");
            
set_task(7.0,"FirstTeamWinnerMessage")
            
        }

        if(
ScoreScondteam >= 16)
        {   

            new 
GameDescBuffer[32]
            
formatex(GameDescBuffer,charsmax(GameDescBuffer),"GG! %d To %d",ScoreScondteam,ScoreFtrstTeam)
            
set_cvar_string("amx_warname",GameDescBuffer)

            
            
server_cmd("mp_freezetime 99999");
            
set_task(7.0,"SecondTeamWinnerMessage"
        }
    
        if((
ScoreFtrstTeam == 15) & (ScoreScondteam == 15))
        {

            
set_cvar_string("amx_warname","Draw! Over-Time 1")

            
server_cmd("mp_freezetime 99999");
            
server_cmd("sv_restart 1");

            
g_MatchStarted false
            
            
//OT STEP 1
            
set_task(2.0,"MatchDrawMessage")
        }
    }

}
// Transfer a player to spec.
public TransferToSpec(id)
{
    if(
is_user_connected(id))
    {
        new 
CsTeams:team cs_get_user_team(id)
   
        if( 
is_user_connected(id) && (team != CS_TEAM_UNASSIGNED) && (team != CS_TEAM_SPECTATOR) )
        {
            new 
TransferedName[32
            
get_user_name(idTransferedNamecharsmax(TransferedName))

            
user_kill(id)
            
//cs_set_user_team(id, CS_TEAM_SPECTATOR)
            //rg_set_user_team(id, TEAM_SPECTATOR,MODEL_AUTO,true)

            
set_task(3.0,"DoTransferSpec",id)

        }
    }
    
    
    return 
PLUGIN_HANDLED
}


//Winner message. - First team won!
public FirstTeamWonTheMatch()
{
    
set_dhudmessage(02550, -1.0, -1.002.06.00.80.8)
    
show_dhudmessage(0,"Team [ %s ]  Won The Match !! ^n GG WP To Team %s ..",FirstCaptainName,FirstCaptainName)

    
set_cvar_string("amx_warname","-= WAR About To Start! =-")
}

//Winner message. - Second team won!
public SecondTeamWonTheMatch()
{
    
set_dhudmessage(02550, -1.0, -1.002.06.00.80.8)
    
show_dhudmessage(0,"Team [ %s ] Won The Match !! ^n GG WP To Team %s  !",SecondCaptainName,SecondCaptainName)


    
set_cvar_string("amx_warname","-= WAR About To Start! =-")
}

//Load Match settings because match has been started !
public LoadMatchSettings()
{

    
server_cmd("sv_alltalk 0")
    
server_cmd("mp_autoteambalance 2")
    
server_cmd("mp_freezetime 8")
}

//Load PuB settings because Match is over!
public LoadPubSettings()
{

    
set_cvar_string("amx_warname","-= WAR About To Start! =-")

    
//Set some zero.
    
CaptainChoosenID 0
    WhoChoseThePlayer 
0
    g_TotalLeaves 
0
    g_TotalKills
[0] = 0
    g_TotalDeaths
[0] = 0
    g_BombPlants
[0] = 0
    g_BombDefusions
[0] = 0
    msgToDisplay
[0] = 0
    remove_task
(6969)

    
//ALL HALF STATUS TO FALSE.
    
isFirstHalfStarted false
    isSecondHalfStarted 
false

    FirstCaptainTeamName 
0
    SecondCaptainTeamName 
0

    MatchStarterOwner 
0
    CaptainSChosen 
false

    g_KnifeRound 
false

    is_secondHalf 
false
    g_MatchInit 
false
    g_MatchStarted 
false
    g_MainMatchStarted 
false
    RoundCounter 
0

    gCptT 
0
    gCptCT 
0
    CaptainCount 
0

    ScoreFtrstTeam 
0
    ScoreScondteam 
0
  
    ShowMenuFirst 
0
    ShowMenuSecond 
0

  
   
    FirstCaptainName
[0] = 0
    SecondCaptainName
[0] = 0
  
    TempFirstCaptain
[0] = 0
    TempSecondCaptain
[0] = 0

    server_cmd
("exec server.cfg")
    
set_task3.0"GiveRestartRound"___"a"); 
    

}

public 
FirstTeamWinnerMessage()
{

    
GiveRestartRound()


    
set_task(3.0,"MatchIsOverHUDMessage")
    
set_task(7.0,"SecondHalfCompletedHUDMessage")
    
set_task(13.0,"FirstTeamWonTheMatch")
    
set_task(20.0,"DoRanking")
    
set_task(32.0,"LoadPubSettings")
}

public 
SecondTeamWinnerMessage()
{
    
GiveRestartRound()

    
set_task(3.0,"MatchIsOverHUDMessage")
    
set_task(7.0,"SecondHalfCompletedHUDMessage")
    
set_task(13.0,"SecondTeamWonTheMatch")
    
set_task(20.0,"DoRanking")
    
set_task(32.0,"LoadPubSettings")
}

public 
MatchDrawMessage()
{
    
set_task(3.0,"MatchIsDrawHUDMessage")
    
set_task(7.0,"OverTimeStartMessage")

    
//OT STEP 2
    
OverTimeSettings()
    
set_task(13.0,"SwapTeamsAndStartOverTimeFirstHalf")
}

// Over time Draw Message.
public MatchDrawMessageOT()
{
    
set_task(3.0,"MatchIsDrawOTHUDMessage")
    
set_task(7.0,"OverTimeStartMessage")

    
set_task(13.0,"SwapTeamsAndStartOverTimeFirstHalf")
}

public 
OverTimeSettings()
{
    
ScoreFtrstTeam 0
    ScoreScondteam 
0
    g_OverTime 
true
    RoundCounter 
0
    OTCount
++
}

public 
SwapTeamsAndStartOverTimeFirstHalf()
{

    
//OT STEP 3

    //Swap Teams.
    
cmdTeamSwap()

    
GiveRestartRound();

    
set_task(2.0,"LiveOnThreeRestart");

    
//Give Restart
    
set_task(4.0"GiveRestartRound"___"a"); 

    
ColorChat(0,"!t[ECS WAR OVERTIME] !gTeams !yHave Been !gSwapped !");
    
ColorChat(0,"!t[ECS WAR OVERTIME] !gOver Time !y- !t%i !gFirst Half !yhas been !gStarted !",OTCount);
    
ColorChat(0,"!t[ECS WAR OVERTIME] !gOver Time !y- !t%i !gFirst Half !yhas been !gStarted !",OTCount);
    
ColorChat(0,"!t[ECS WAR OVERTIME] !gOverTime Number !y: !t%i",OTCount);

    
g_MatchStarted true

    is_secondHalf       
false

    
//Set first half status to zero.
    
isFirstHalfStarted true
    isSecondHalfStarted 
false
    set_task
(14.0,"OverTimeFirstHalfLiveMessage")

    
LoadMatchSettings()

}

public 
OverTimeStartMessage()
{
    
set_dhudmessage(0,2550, -1.0, -1.002.04.00.80.8)
    
show_dhudmessage(0"Teams will be Swapped Automatically. ^n OverTime [%i] Will Start Now!",OTCount
}

public 
SecondCaptWonKnifeRoundWonMessage(id)
{
    
set_dhudmessage(255255255, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"Captain [ %s ] Won the Knife Round !",FirstCaptainName)

    
ColorChat(0,"!t[ECS WAR] !gCaptain !t%s !gWon !ythe !tKnife Round !",FirstCaptainName)

    
//Match Stats: Step -2 : Insert the Knife winner in the database.========
    
new KnifeRoundWonSteamID[128
    
get_user_authid(gCptCTKnifeRoundWonSteamID127)

    
set_task(5.0,"ChooseTeam",gCptCT)
    
}

public 
FirstCaptainWonKnifeRoundMessage(id)
{
    
set_dhudmessage(255255255, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"Captain [ %s ] Won the Knife Round !",FirstCaptainName)

    
ColorChat(0,"!t[ECS WAR] !gCaptain !t%s !gWon !ythe !tKnife Round !",FirstCaptainName)

    
set_task(5.0,"ChooseTeam",gCptT)
    
}

public 
ShowScoreToUser(id)
{
    if(
g_MatchStarted)
    {

        if(
isFirstHalfStarted)
        {
            if(( 
FirstCaptainTeamName == 1) && (get_user_team(id) == 2))
            {
                
ColorChat(id,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreScondteam,ScoreFtrstTeam)
            }
            
            if(( 
FirstCaptainTeamName == ) && (get_user_team(id) == 1)  )
            {    
                
ColorChat(id,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreFtrstTeam,ScoreScondteam)
            }

            if((
FirstCaptainTeamName == 2) && (get_user_team(id)) == 2)
            {
               
ColorChat(id,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreFtrstTeam,ScoreScondteam)
            }

            if( (
FirstCaptainTeamName == 2) && (get_user_team(id) == 1) )
            {
                
ColorChat(id,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreScondteam,ScoreFtrstTeam)
            }
        }

        if(
isSecondHalfStarted)
        {
            if(( 
FirstCaptainTeamName == 1) && (get_user_team(id) == 2))
            {
                
ColorChat(id,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreFtrstTeam,ScoreScondteam)
            }
            
            if(( 
FirstCaptainTeamName == ) && (get_user_team(id) == 1)  )
            {    
                
ColorChat(id,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreScondteam,ScoreFtrstTeam)
            }

            if((
FirstCaptainTeamName == 2) && (get_user_team(id)) == 2)
            {
                
ColorChat(id,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreScondteam,ScoreFtrstTeam)
            }

            if( (
FirstCaptainTeamName == 2) && (get_user_team(id) == 1) )
            {
                
ColorChat(id,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreFtrstTeam,ScoreScondteam)
            }
        }
    }
}

public 
ShowScoreOnRoundStart()
{

    new 
players[32],num,iPlayer
    get_players
(players,num,"h");
    

    for(new 
i=0;i<num;i++)
    {
        
iPlayer players[i];

        if(
isFirstHalfStarted)
        {
            if(( 
FirstCaptainTeamName == 1) && (get_user_team(iPlayer) == 2))
            {
                
ColorChat(iPlayer,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreScondteam,ScoreFtrstTeam)
            }
            
            if(( 
FirstCaptainTeamName == ) && (get_user_team(iPlayer) == 1)  )
            {    
                
ColorChat(iPlayer,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreFtrstTeam,ScoreScondteam)
            }

            if((
FirstCaptainTeamName == 2) && (get_user_team(iPlayer)) == 2)
            {
                
ColorChat(iPlayer,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreFtrstTeam,ScoreScondteam)
            }

            if( (
FirstCaptainTeamName == 2) && (get_user_team(iPlayer) == 1) )
            {
                
ColorChat(iPlayer,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponents !tScore: !t %i",ScoreScondteam,ScoreFtrstTeam)
            }
        }

        if(
isSecondHalfStarted)
        {
            if(( 
FirstCaptainTeamName == 1) && (get_user_team(iPlayer) == 2))
            {
                
ColorChat(iPlayer,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreFtrstTeam,ScoreScondteam)
            }
            
            if(( 
FirstCaptainTeamName == ) && (get_user_team(iPlayer) == 1)  )
            {    
                
ColorChat(iPlayer,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreScondteam,ScoreFtrstTeam)
            }

            if((
FirstCaptainTeamName == 2) && (get_user_team(iPlayer)) == 2)
            {
                
ColorChat(iPlayer,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreScondteam,ScoreFtrstTeam)
            }

            if( (
FirstCaptainTeamName == 2) && (get_user_team(iPlayer) == 1) )
            {
                
ColorChat(iPlayer,"!t[ECS WAR] !yYour !gTeam's Score !yis: !t%i | !gOpponent's Team !tScore: !t %i",ScoreFtrstTeam,ScoreScondteam)
            }
        }
    }
    
}

//To restart the round.
public GiveRestartRound( ) 

    
server_cmd"sv_restartround ^"1^"" ); 


//All MESSAGES.
public FirstHalfHUDMessage()
{
    
set_dhudmessage(0255255, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"={ First Half Started ! }=^n --[ %s ]--^n--[ %s ]--^n--[ %s ]--","LIVE !!! GL & HF","LIVE !!! GL & HF","LIVE !!! GL & HF")
}

public 
SecondHalfHUDMessage()
{

    new 
players[32], num
    get_players
(playersnum,"h")
    
    new 
player
    
for(new 0numi++)
    {
        
player players[i]
        if(
is_user_connected(player))
        {
            
set_user_frags(player,Frags[player])
            
cs_set_user_deaths(player,Deaths[player])
        }

    }

    
set_dhudmessage(0255255, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"={ Second Half Started ! }=^n --[ %s ]--^n--[ %s ]--^n--[ %s ]--","LIVE !!!","LIVE !!! ","LIVE !!! ")
}

public 
SecondHalfOverTimeHUDMessage()
{

    new 
players[32], num
    get_players
(playersnum,"h")
    
    new 
player
    
for(new 0numi++)
    {
        
player players[i]
        if(
is_user_connected(player))
        {
            
set_user_frags(player,Frags[player])
            
cs_set_user_deaths(player,Deaths[player])
        }

    }

    
set_dhudmessage(0255255, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"={ OT Second Half Started ! }=^n --[ %s ]--^n--[ %s ]--^n--[ %s ]--","LIVE !!!","LIVE !!! ","LIVE !!! ")
}

public 
OverTimeFirstHalfLiveMessage()
{
    
set_dhudmessage(0255255, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"={ OT First Half Started ! }=^n --[ %s ]--^n--[ %s ]--^n--[ %s ]--","LIVE !!!","LIVE !!! ","LIVE !!! ")
}

//FirstHalfOvertimeCompletedHUDMessage
//SwapTeamsOverTimeMessage
public FirstHalfOvertimeCompletedHUDMessage()
{

    new 
score_message[1024]

    if(
ScoreFtrstTeam ScoreScondteam)
    {
        
format(score_message1023"={ First Half OT }= ^n %s - %i ^n Winning to ^n %s - %i",FirstCaptainName,ScoreFtrstTeam,SecondCaptainName,ScoreScondteam)


        
set_dhudmessage(0,2550, -1.0, -1.002.04.00.80.8)
        
show_dhudmessage(0score_message)
    }

    if(
ScoreScondteam ScoreFtrstTeam)
    {
        
format(score_message1023"={ First Falf OT }= ^n %s - %i ^n Winning to ^n %s - %i",SecondCaptainName,ScoreScondteam,FirstCaptainName,ScoreFtrstTeam)


        
set_dhudmessage(0,2550, -1.0, -1.002.04.00.80.8)
        
show_dhudmessage(0score_message)
    }

    if(
ScoreFtrstTeam == ScoreScondteam)
    {
        
format(score_message1023"OT - Both Teams Have Won %i Rounds.",ScoreScondteam)

        
set_dhudmessage(0,2550, -1.0, -1.002.04.00.80.8)
        
show_dhudmessage(0score_message)
    }

}

public 
FirstHalfCompletedHUDMessage()
{
    new 
score_message[1024]

    if(
ScoreFtrstTeam ScoreScondteam)
    {
        
format(score_message1023"={ First Half Score }= ^n %s - %i ^n Winning to ^n %s - %i",FirstCaptainName,ScoreFtrstTeam,SecondCaptainName,ScoreScondteam)

        
set_dhudmessage(0,2550, -1.0, -1.002.04.00.80.8)
        
show_dhudmessage(0score_message)
    }

    if(
ScoreScondteam ScoreFtrstTeam)
    {
        
format(score_message1023"={ First Falf Score }= ^n %s - %i ^n Winning to ^n %s - %i",SecondCaptainName,ScoreScondteam,FirstCaptainName,ScoreFtrstTeam)

        
set_dhudmessage(0,2550, -1.0, -1.002.04.00.80.8)
        
show_dhudmessage(0score_message)
    }

    if(
ScoreFtrstTeam == ScoreScondteam)
    {
        
format(score_message1023"Both Teams Have Won %i Rounds.",ScoreScondteam)

        
set_dhudmessage(0,2550, -1.0, -1.002.04.00.80.8)
        
show_dhudmessage(0score_message)
    }
}

public 
SecondHalfCompletedHUDMessage()
{
    new 
score_message[1024]

    if(
ScoreFtrstTeam ScoreScondteam)
    {
        
format(score_message1023"={ Match Score }=^n %s - %i ^n Winning To ^n %s - %i",FirstCaptainName,ScoreFtrstTeam,SecondCaptainName,ScoreScondteam)

        
set_dhudmessage(0,2550, -1.0, -1.002.04.00.80.8)
        
show_dhudmessage(0score_message)
    }

    if(
ScoreScondteam ScoreFtrstTeam)
    {
        
format(score_message1023"={ Match Score }=^n %s - %i ^n Winning to ^n %s - %i",SecondCaptainName,ScoreScondteam,FirstCaptainName,ScoreFtrstTeam)

        
set_dhudmessage(0,2550, -1.0, -1.002.04.00.80.8)
        
show_dhudmessage(0score_message)
    }

    if(
ScoreFtrstTeam == ScoreScondteam)
    {
        
format(score_message1023"={ Match Score }=^n Both Teams Have Won %i Rounds.")

        
set_dhudmessage(0,2550, -1.0, -1.002.06.00.80.8)
        
show_dhudmessage(0score_message)
    }

}

public 
MatchIsOverHUDMessage()
{
    
set_dhudmessage(0,2550, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"={ Match Is Over }=")
}

public 
MatchIsDrawHUDMessage()
{

    
set_dhudmessage(0,2550, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"={ Match Is Draw!! }=")
}
//IF OT Match is Draw!
public MatchIsDrawOTHUDMessage()
{
    
set_dhudmessage(0,2550, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"={ OverTime Match Draw!!^n Next OverTime Will start Now! }=")  
}

public 
TeamSwapMessage()
{
    
set_dhudmessage(2552550, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"First Half Over! ^n Teams will be swapped Automatically. Please do not change the Team! ^n Second Half will start Now!")
}

public 
MatchStartedTrue()
{
    
server_cmd("mp_autokick 1")
    
g_MatchStarted true

    set_task
(30.0,"SetMainMatchStartedTrue")

}


public 
SetMainMatchStartedTrue()
{
    
g_MainMatchStarted true
}


public 
LiveOnThreeRestart()
{

    
set_dhudmessage(42255212, -1.0, -1.002.03.00.80.8)
    
show_dhudmessage(0,"-{ LiVe On 3 RestartS } - ^n -== LO3 =-")
}


/*
*    STOCKS
*
*/
//For color chat

stock ColorChat(const id, const input[], any:...) 

    new 
count 1players[32]; 
    static 
msg[191]; 
    
vformat(msg190input3); 
    
    
replace_all(msg190"!y""^x01");
    
replace_all(msg190"!g""^x04");     
    
replace_all(msg190"!t""^x03");
    
    if (
idplayers[0] = id; else get_players(playerscount"ch"); { 
        for (new 
0counti++) 
        { 
            if (
is_user_connected(players[i])) 
            { 
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]); 
                
write_byte(players[i]); 
                
write_string(msg); 
                
message_end(); 
            } 
        } 
    } 
}


stock ecs(const text[], any:...)
{
    new 
szMsg[191]
    
vformat(szMsgcharsmax(szMsg), text2);
    
server_print("[ECS Points] %s"szMsg)



instinctpt1 05-22-2020 07:48

Re: Admin War Plugin
 
@allroundernaman
Answer these things first
Do you use REHLDS, REGAMEDLL, AMXX - dev builds or not ?
If not then you have to use these i guess to run this plugin

allroundernaman 05-22-2020 07:50

Re: Admin War Plugin
 
Quote:

Originally Posted by instinctpt1 (Post 2701585)
@allroundernaman
Answer these things first
Do you use REHLDS, REGAMEDLL, AMXX - dev builds or not ?
If not then you have to use these i guess to run this plugin

I am running on Linux GSM (Ubuntu Based) Re-HLDS server. I am running on amxx 1.8.2 i think so.

What should i do? I think this is the latest stable release.

instinctpt1 05-22-2020 07:55

Re: Admin War Plugin
 
Thats latest stable, i am talking about DEV builds ( developer )
Download from here: https://www.amxmodx.org/downloads-new.php
After this you wont need to specify #max_players 32 and dhudmessage explicitly

And yes it requires REGAMEDLL ( https://github.com/s1lentq/ReGameDLL_CS )
The crash you are facing is because you have stock gamedll, this plugin requires regamedll

allroundernaman 05-22-2020 07:57

Re: Admin War Plugin
 
Quote:

Originally Posted by instinctpt1 (Post 2701587)
Thats latest stable, i am talking about DEV builds ( developer )
Download from here: https://www.amxmodx.org/downloads-new.php
After this you wont need to specify #max_players 32 and dhudmessage explicitly

And yes it requires REGAMEDLL ( https://github.com/s1lentq/ReGameDLL_CS )
The crash you are facing is because you have stock gamedll, this plugin requires regamedll

So many versions there. What exactly i have to choose?
About regamedll what if I had it on my server? I am not sure.

instinctpt1 05-22-2020 08:01

Re: Admin War Plugin
 
Dont choose from version history, just choose the WINDOWS icon and download base package, it will auto download the latest dev version

And to check if your server has REGAMEDLL already just try this command in server's console
PHP Code:

game version 

If your output is like this
PHP Code:

ReGameDLL version5.16.0.460-dev
Build date
10:11:49 May  2 2020
Build from
https://github.com/s1lentq/ReGameDLL_CS/commit/4f72525 

Then it means u already have REGAMEDLL, else install regamedll in order to make this plugin work

SHIELD755 05-22-2020 08:06

Re: Admin War Plugin
 
You said you are running this plugin in your server and Your server is using reunion ?
NO STEAM NO SUPPORT
READ RULES

https://www.gametracker.com/server_i...ver_variables/

https://i.imgur.com/Xjs2L3G.jpg

allroundernaman 05-22-2020 08:15

Re: Admin War Plugin
 
Quote:

Originally Posted by SHIELD755 (Post 2701590)
You said you are running this plugin in your server and Your server is using reunion ?
NO STEAM NO SUPPORT
READ RULES

https://www.gametracker.com/server_i...ver_variables/

https://i.imgur.com/Xjs2L3G.jpg

I am sorry, but I don't know what's reunion. But For proof, I can say I have SteamID.
Many things were pre-installed on the server already by our host.

allroundernaman 05-22-2020 08:45

Re: Admin War Plugin
 
Quote:

Originally Posted by instinctpt1 (Post 2701589)
Dont choose from version history, just choose the WINDOWS icon and download base package, it will auto download the latest dev version

And to check if your server has REGAMEDLL already just try this command in server's console
PHP Code:

game version 

If your output is like this
PHP Code:

ReGameDLL version5.16.0.460-dev
Build date
10:11:49 May  2 2020
Build from
https://github.com/s1lentq/ReGameDLL_CS/commit/4f72525 

Then it means u already have REGAMEDLL, else install regamedll in order to make this plugin work

Let's see. I have done everything. But I told I am on linux, so windows won't work. I have uploaded linux base. Reconfigured the whole server.

I will test the plugin when there will be some players in the server.
Thank you!

allroundernaman 05-22-2020 10:55

Re: Admin War Plugin
 
UPDATE: New Problem invited. Players can't chat or join teams. They remain in spectate. On joining a team
Quote:

%s
appears on the screen and nothing happens. Server is totally broken.

I have done everything told by everyone. Still, nothing changes.

The same problem: only sv_restart 1 is happening. All becomes dead and game restarts, with a hud. NO other menu appears.

Regards,

NOVA GAMING 05-22-2020 13:08

Re: Admin War Plugin
 
try this for %s https://goldsrc.ru/threads/4261/

allroundernaman 05-22-2020 15:08

Re: Admin War Plugin
 
Thank you for taking interest in my forum topic.

Can you tell me how can I do it? It was really irritating that I have to reinstall all the files back of version 1.8.3 build.

Still, I would like to try it on my server. Can someone help me fix out this wholE means the WHOLE problem of this plugin? Does anyone have a real plugin for this purpose?
It constantly needs to restart because of %s.

Can you explain how can I do it?
Because I solve one problem, another problem comes, and this cycle continues. I keep solving errors, and till that time, server will be closed -_-

instinctpt1 05-23-2020 01:04

Re: Admin War Plugin
 
1 Attachment(s)
Hey @allroundernaman, someone of my game friends provided me this one

Try this one, this works with HLDS too, as natives from reapi are removed with original natives in this one

allroundernaman 05-23-2020 03:49

Re: Admin War Plugin
 
Quote:

Originally Posted by instinctpt1 (Post 2701722)
Hey @allroundernaman, someone of my game friends provided me this one

Try this one, this works with HLDS too, as natives from reapi are removed with original natives in this one

Okay I will try and let you know.
But first I want to tell you that I have reinstalled 1.8.3 version because of broken server...
And I hope this works with Re-HLDS then...

Thank you.

OciXCrom 05-23-2020 08:25

Re: Admin War Plugin
 
Quote:

Originally Posted by allroundernaman (Post 2701733)
But first I want to tell you that I have reinstalled 1.8.3 version because of broken server...

Download AMXX from the official website. Version 1.8.3 cannot be found there. Use 1.9.

allroundernaman 05-23-2020 08:32

Re: Admin War Plugin
 
Quote:

Originally Posted by instinctpt1 (Post 2701722)
Hey @allroundernaman, someone of my game friends provided me this one

Try this one, this works with HLDS too, as natives from reapi are removed with original natives in this one

Thank you for the plugin, but it is not working. When war starts, all dies, then Menu appears! Fortunately, I can choose 2 captains and the game restarts three times.
Now what happens, people in spec can change their team and join a team, and no knife round starts, the plugin doesn't work anymore....

allroundernaman 05-23-2020 08:34

Re: Admin War Plugin
 
Quote:

Originally Posted by OciXCrom (Post 2701769)
Download AMXX from the official website. Version 1.8.3 cannot be found there. Use 1.9.

Sir, probably you have not read the conversation earlier. * Probably *
The server brokes with other versions, as no version is stable version. I am using Re-HLDS ...

This website says: https://www.amxmodx.org/downloads-new.php
Quote:

These are unstable, development AMXX builds. For stable builds, see this page instead. For master branch builds, see this page.
What happens in every 3-4 round, chat disables, and no one can join any team... %s appears only.
WHOLE server crash. So using the stable version, provided by the host.

Regards,

OciXCrom 05-23-2020 09:17

Re: Admin War Plugin
 
Quote:

Originally Posted by allroundernaman (Post 2701772)
Sir, probably you have not read the conversation earlier. * Probably *
The server brokes with other versions, as no version is stable version. I am using Re-HLDS ...

This website says: https://www.amxmodx.org/downloads-new.php


What happens in every 3-4 round, chat disables, and no one can join any team... %s appears only.
WHOLE server crash. So using the stable version, provided by the host.

Regards,

I didn't read previously, but I don't think that's relevant. You said that you reinstalled 1.8.3, meaning you downloaded it from another website since 1.8.3 is no longer available on AMXX's official website.

1.8.3 is the same as 1.9 - it's an unstable development build. It's probably even more unstable than 1.9 so I don't see why you would use it and how you even found it.

allroundernaman 05-23-2020 09:25

Re: Admin War Plugin
 
Quote:

Originally Posted by OciXCrom (Post 2701784)
I didn't read previously, but I don't think that's relevant. You said that you reinstalled 1.8.3, meaning you downloaded it from another website since 1.8.3 is no longer available on AMXX's official website.

1.8.3 is the same as 1.9 - it's an unstable development build. It's probably even more unstable than 1.9 so I don't see why you would use it and how you even found it.

No, I didn't found it. My hosting provider has given me gaming files actually. Basically, I reinstalled the hosting providers file, and that version was 1.8.3

What should I do now?

OciXCrom 05-23-2020 10:04

Re: Admin War Plugin
 
Quote:

Originally Posted by allroundernaman (Post 2701785)
No, I didn't found it. My hosting provider has given me gaming files actually. Basically, I reinstalled the hosting providers file, and that version was 1.8.3

What should I do now?

Meaning your hosting provides outdated files.

instinctpt1 05-23-2020 10:17

Re: Admin War Plugin
 
Quote:

Originally Posted by allroundernaman (Post 2701771)
Thank you for the plugin, but it is not working. When war starts, all dies, then Menu appears! Fortunately, I can choose 2 captains and the game restarts three times.
Now what happens, people in spec can change their team and join a team, and no knife round starts, the plugin doesn't work anymore....

Hmm, please check your logs then, this conversation is getting long enough, i suggest you to reinstall all required files for plugin to latest versions, as this plugin is running fine in all community servers of india, if you still need help feel free to directly contact me on Facebook

And for forum sake, if i made the plugin work for him, i will surely tell here, what was the problem and how i fixed it :)

allroundernaman 05-23-2020 10:46

Re: Admin War Plugin
 
Quote:

Originally Posted by OciXCrom (Post 2701790)
Meaning your hosting provides outdated files.

May be, tomorrow I will format the server and reinstall 1.9 amxx. Then I will try to troubleshoot the issue.

allroundernaman 05-23-2020 10:49

Re: Admin War Plugin
 
Quote:

Originally Posted by instinctpt1 (Post 2701795)
Hmm, please check your logs then, this conversation is getting long enough, i suggest you to reinstall all required files for plugin to latest versions, as this plugin is running fine in all community servers of india, if you still need help feel free to directly contact me on Facebook

And for forum sake, if i made the plugin work for him, i will surely tell here, what was the problem and how i fixed it :)

Yeah, I know that. I will reinstall everything tomorrow. Let's see then what will happen.
Okay, I will contact if required, well I suggest you to please stay updated here, as I don't have facebook accounts! :)
:oops: Logs disabled. How can I do it?

Thank You,
Regards,

instinctpt1 05-23-2020 11:06

Re: Admin War Plugin
 
Check your core.ini file under configs folder in amxmodx directory, it must have amxx_logging set to 1
And if you have or after you update it to 1, just go to your plugins.ini and after this plugins name add debug
So it should look like this:
pub_war_xyz.amxx debug

Then restart map and testrun plugin again and keep an eye on server's console when something wrong happens or nothing happens at all

allroundernaman 05-23-2020 15:18

Re: Admin War Plugin
 
Quote:

Originally Posted by instinctpt1 (Post 2701804)
Check your core.ini file under configs folder in amxmodx directory, it must have amxx_logging set to 1
And if you have or after you update it to 1, just go to your plugins.ini and after this plugins name add debug
So it should look like this:
pub_war_xyz.amxx debug

Then restart map and testrun plugin again and keep an eye on server's console when something wrong happens or nothing happens at all

Okay, I have just reinstalled amx server 1.9 dev built and kudos! No errors in the built! My server is almost stable now.
I will do the same when I will have more players in the server. I have enabled logging also. Enabled debug mode also.
Thank you for advice and I will let you know soon.

Regards,

allroundernaman 05-23-2020 15:33

Re: Admin War Plugin
 
The same problem is happening again. And this was the console....

Quote:

L 05/23/2020 - 19:28:45: -------- Mapchange to aa_dima2 --------
L 05/23/2020 - 19:28:46: [AMXX] Plugin file open error (plugin "client_autoexec.ini")
Executing ReGameDLL Configuration File
[AMXX] Loaded 5 admins from file
Executing AMX Mod X Configuration File
Scrolling message displaying frequency: 10:00 minutes
CResourceFile::LoadResources: Failed to load "resources.ini"; filename has no extension on line 1
47.31.92.87:38948:reconnect
L 05/23/2020 - 19:29:59: [CSTRIKE] Postponing of model update disabled, check your gamedata files
L 05/23/2020 - 19:29:59: [CSTRIKE] Postponing of model update disabled, check your gamedata files
L 05/23/2020 - 19:29:59: [CSTRIKE] Postponing of model update disabled, check your gamedata files
L 05/23/2020 - 19:30:00: [CSTRIKE] Postponing of model update disabled, check your gamedata files
L 05/23/2020 - 19:30:01: [CSTRIKE] Postponing of model update disabled, check your gamedata files
UPDATED: I found this line in error log:
Quote:

L 05/23/2020 - 17:45:53: Plugin called menu_display when item=MENU_EXIT
Nothing else suspicious I can find. Anything else needed? What should I do?

allroundernaman 05-24-2020 02:37

Re: Admin War Plugin
 
I m so sorry to trouble you all again and again. But can these issues be solved?

And if solved, please put up a war plugin in the plugins section then for everyone!


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

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