Raised This Month: $90 Target: $400
 22% 

Plugin compile help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sincronic
Junior Member
Join Date: Dec 2018
Old 01-11-2019 , 23:47   Plugin compile help
Reply With Quote #1

Guys, i have this source and is a working plugin, i decompiled i changed something but now i can't compile it. I put the code.

Thanks

Code:
public PlVers:__version =
{
	version = 5,
	filevers = "1.7.2",
	date = "05/07/2017",
	time = "22:48:57"
};
new Float:NULL_VECTOR[3];
new String:NULL_STRING[4];
public Extension:__ext_core =
{
	name = "Core",
	file = "core",
	autoload = 0,
	required = 0,
};
new MaxClients;
public Extension:__ext_sdktools =
{
	name = "SDKTools",
	file = "sdktools.ext",
	autoload = 1,
	required = 1,
};
public Extension:__ext_sdkhooks =
{
	name = "SDKHooks",
	file = "sdkhooks.ext",
	autoload = 1,
	required = 1,
};
public Extension:__ext_cstrike =
{
	name = "cstrike",
	file = "games/game.cstrike.ext",
	autoload = 0,
	required = 1,
};
public Extension:__ext_topmenus =
{
	name = "TopMenus",
	file = "topmenus.ext",
	autoload = 1,
	required = 1,
};
public SharedPlugin:__pl_adminmenu =
{
	name = "adminmenu",
	file = "adminmenu.smx",
	required = 1,
};
public Extension:__ext_cprefs =
{
	name = "Client Preferences",
	file = "clientprefs.ext",
	autoload = 1,
	required = 1,
};
public Plugin:myinfo =
{
	name = "vip_ex",
	description = "Provides in-game VIP accounts and features",
	author = "eleague",
	version = "1.0",
	url = "www.eleague.ro"
};
new Handle:g_pTagsCookie;
new Handle:g_pSteams;
new Handle:g_pFlags;
new g_TagOption[129];
new bool:g_bVIP[129];
new bool:g_bAsk[129];
new bool:g_bEquipped[129];
new String:g_Flags[129][32];
new g_Time;
new bool:g_bOneAndOnly;
new bool:g_inGame[129];
public __ext_core_SetNTVOptional()
{
	MarkNativeAsOptional("GetFeatureStatus");
	MarkNativeAsOptional("RequireFeature");
	MarkNativeAsOptional("AddCommandListener");
	MarkNativeAsOptional("RemoveCommandListener");
	MarkNativeAsOptional("BfWriteBool");
	MarkNativeAsOptional("BfWriteByte");
	MarkNativeAsOptional("BfWriteChar");
	MarkNativeAsOptional("BfWriteShort");
	MarkNativeAsOptional("BfWriteWord");
	MarkNativeAsOptional("BfWriteNum");
	MarkNativeAsOptional("BfWriteFloat");
	MarkNativeAsOptional("BfWriteString");
	MarkNativeAsOptional("BfWriteEntity");
	MarkNativeAsOptional("BfWriteAngle");
	MarkNativeAsOptional("BfWriteCoord");
	MarkNativeAsOptional("BfWriteVecCoord");
	MarkNativeAsOptional("BfWriteVecNormal");
	MarkNativeAsOptional("BfWriteAngles");
	MarkNativeAsOptional("BfReadBool");
	MarkNativeAsOptional("BfReadByte");
	MarkNativeAsOptional("BfReadChar");
	MarkNativeAsOptional("BfReadShort");
	MarkNativeAsOptional("BfReadWord");
	MarkNativeAsOptional("BfReadNum");
	MarkNativeAsOptional("BfReadFloat");
	MarkNativeAsOptional("BfReadString");
	MarkNativeAsOptional("BfReadEntity");
	MarkNativeAsOptional("BfReadAngle");
	MarkNativeAsOptional("BfReadCoord");
	MarkNativeAsOptional("BfReadVecCoord");
	MarkNativeAsOptional("BfReadVecNormal");
	MarkNativeAsOptional("BfReadAngles");
	MarkNativeAsOptional("BfGetNumBytesLeft");
	MarkNativeAsOptional("BfWrite.WriteBool");
	MarkNativeAsOptional("BfWrite.WriteByte");
	MarkNativeAsOptional("BfWrite.WriteChar");
	MarkNativeAsOptional("BfWrite.WriteShort");
	MarkNativeAsOptional("BfWrite.WriteWord");
	MarkNativeAsOptional("BfWrite.WriteNum");
	MarkNativeAsOptional("BfWrite.WriteFloat");
	MarkNativeAsOptional("BfWrite.WriteString");
	MarkNativeAsOptional("BfWrite.WriteEntity");
	MarkNativeAsOptional("BfWrite.WriteAngle");
	MarkNativeAsOptional("BfWrite.WriteCoord");
	MarkNativeAsOptional("BfWrite.WriteVecCoord");
	MarkNativeAsOptional("BfWrite.WriteVecNormal");
	MarkNativeAsOptional("BfWrite.WriteAngles");
	MarkNativeAsOptional("BfRead.ReadBool");
	MarkNativeAsOptional("BfRead.ReadByte");
	MarkNativeAsOptional("BfRead.ReadChar");
	MarkNativeAsOptional("BfRead.ReadShort");
	MarkNativeAsOptional("BfRead.ReadWord");
	MarkNativeAsOptional("BfRead.ReadNum");
	MarkNativeAsOptional("BfRead.ReadFloat");
	MarkNativeAsOptional("BfRead.ReadString");
	MarkNativeAsOptional("BfRead.ReadEntity");
	MarkNativeAsOptional("BfRead.ReadAngle");
	MarkNativeAsOptional("BfRead.ReadCoord");
	MarkNativeAsOptional("BfRead.ReadVecCoord");
	MarkNativeAsOptional("BfRead.ReadVecNormal");
	MarkNativeAsOptional("BfRead.ReadAngles");
	MarkNativeAsOptional("BfRead.GetNumBytesLeft");
	MarkNativeAsOptional("PbReadInt");
	MarkNativeAsOptional("PbReadFloat");
	MarkNativeAsOptional("PbReadBool");
	MarkNativeAsOptional("PbReadString");
	MarkNativeAsOptional("PbReadColor");
	MarkNativeAsOptional("PbReadAngle");
	MarkNativeAsOptional("PbReadVector");
	MarkNativeAsOptional("PbReadVector2D");
	MarkNativeAsOptional("PbGetRepeatedFieldCount");
	MarkNativeAsOptional("PbSetInt");
	MarkNativeAsOptional("PbSetFloat");
	MarkNativeAsOptional("PbSetBool");
	MarkNativeAsOptional("PbSetString");
	MarkNativeAsOptional("PbSetColor");
	MarkNativeAsOptional("PbSetAngle");
	MarkNativeAsOptional("PbSetVector");
	MarkNativeAsOptional("PbSetVector2D");
	MarkNativeAsOptional("PbAddInt");
	MarkNativeAsOptional("PbAddFloat");
	MarkNativeAsOptional("PbAddBool");
	MarkNativeAsOptional("PbAddString");
	MarkNativeAsOptional("PbAddColor");
	MarkNativeAsOptional("PbAddAngle");
	MarkNativeAsOptional("PbAddVector");
	MarkNativeAsOptional("PbAddVector2D");
	MarkNativeAsOptional("PbRemoveRepeatedFieldValue");
	MarkNativeAsOptional("PbReadMessage");
	MarkNativeAsOptional("PbReadRepeatedMessage");
	MarkNativeAsOptional("PbAddMessage");
	MarkNativeAsOptional("Protobuf.ReadInt");
	MarkNativeAsOptional("Protobuf.ReadFloat");
	MarkNativeAsOptional("Protobuf.ReadBool");
	MarkNativeAsOptional("Protobuf.ReadString");
	MarkNativeAsOptional("Protobuf.ReadColor");
	MarkNativeAsOptional("Protobuf.ReadAngle");
	MarkNativeAsOptional("Protobuf.ReadVector");
	MarkNativeAsOptional("Protobuf.ReadVector2D");
	MarkNativeAsOptional("Protobuf.GetRepeatedFieldCount");
	MarkNativeAsOptional("Protobuf.SetInt");
	MarkNativeAsOptional("Protobuf.SetFloat");
	MarkNativeAsOptional("Protobuf.SetBool");
	MarkNativeAsOptional("Protobuf.SetString");
	MarkNativeAsOptional("Protobuf.SetColor");
	MarkNativeAsOptional("Protobuf.SetAngle");
	MarkNativeAsOptional("Protobuf.SetVector");
	MarkNativeAsOptional("Protobuf.SetVector2D");
	MarkNativeAsOptional("Protobuf.AddInt");
	MarkNativeAsOptional("Protobuf.AddFloat");
	MarkNativeAsOptional("Protobuf.AddBool");
	MarkNativeAsOptional("Protobuf.AddString");
	MarkNativeAsOptional("Protobuf.AddColor");
	MarkNativeAsOptional("Protobuf.AddAngle");
	MarkNativeAsOptional("Protobuf.AddVector");
	MarkNativeAsOptional("Protobuf.AddVector2D");
	MarkNativeAsOptional("Protobuf.RemoveRepeatedFieldValue");
	MarkNativeAsOptional("Protobuf.ReadMessage");
	MarkNativeAsOptional("Protobuf.ReadRepeatedMessage");
	MarkNativeAsOptional("Protobuf.AddMessage");
	VerifyCoreVersion();
	return 0;
}

ExplodeString(String:text[], String:split[], String:buffers[][], maxStrings, maxStringLength, bool:copyRemainder)
{
	new reloc_idx;
	new idx;
	new total;
	new var1;
	if (maxStrings < 1 || !split[0])
	{
		return 0;
	}
	while ((idx = SplitString(text[reloc_idx], split, buffers[total], maxStringLength)) != -1)
	{
		reloc_idx = idx + reloc_idx;
		total++;
		if (maxStrings == total)
		{
			if (copyRemainder)
			{
				strcopy(buffers[total + -1], maxStringLength, text[reloc_idx - idx]);
			}
			return total;
		}
	}
	total++;
	strcopy(buffers[total], maxStringLength, text[reloc_idx]);
	return total;
}

PrintToChatAll(String:format[])
{
	decl String:buffer[192];
	new i = 1;
	while (i <= MaxClients)
	{
		if (IsClientInGame(i))
		{
			SetGlobalTransTarget(i);
			VFormat(buffer, 192, format, 2);
			PrintToChat(i, "%s", buffer);
		}
		i++;
	}
	return 0;
}

PrintHintTextToAll(String:format[])
{
	decl String:buffer[192];
	new i = 1;
	while (i <= MaxClients)
	{
		if (IsClientInGame(i))
		{
			SetGlobalTransTarget(i);
			VFormat(buffer, 192, format, 2);
			PrintHintText(i, "%s", buffer);
		}
		i++;
	}
	return 0;
}

hCSGO_MakeHtmlSafe(String:Buffer[], Size)
{
	ReplaceString(Buffer, Size, "<", "(", true);
	ReplaceString(Buffer, Size, ">", ")", true);
	return strlen(Buffer);
}

hCSGO_FixFileLine(String:FileLine[], Size, Times)
{
	static m_Iterator;
	m_Iterator = 0;
	while (m_Iterator < Times)
	{
		ReplaceString(FileLine, Size, "\x09", " ", true);
		m_Iterator += 1;
	}
	m_Iterator = 0;
	while (m_Iterator < Times)
	{
		ReplaceString(FileLine, Size, "  ", " ", true);
		m_Iterator += 1;
	}
	return strlen(FileLine);
}

hCSGO_PureChatCommand(String:Input[], String:Output[], Size)
{
	static m_Length;
	static m_Iterator;
	m_Iterator = 0;
	m_Length = 0;
	Output[0] = MissingTAG:0;
	while (strlen(Input) > m_Iterator)
	{
		new var1;
		if (Input[m_Iterator] == '!' || Input[m_Iterator] == '/' || IsCharAlpha(Input[m_Iterator]) || IsCharNumeric(Input[m_Iterator]))
		{
			m_Length = Format(Output, Size, "%s%c", Output, Input[m_Iterator]);
		}
		m_Iterator += 1;
	}
	return m_Length;
}

hCSGO_ClampInt(Val, Min, Max)
{
	if (Val < Min)
	{
		return Min;
	}
	if (Val > Max)
	{
		return Max;
	}
	return Val;
}

hCSGO_CountTeam(Team, bool:bOnlyAlive)
{
	static m_Count;
	static m_Player;
	m_Player = 1;
	m_Count = 0;
	while (m_Player <= MaxClients)
	{
		new var1;
		if (!IsClientInGame(m_Player) || Team == GetClientTeam(m_Player))
		{
		}
		else
		{
			new var2;
			if (!(bOnlyAlive && !IsPlayerAlive(m_Player)))
			{
				m_Count += 1;
			}
		}
		m_Player += 1;
	}
	return m_Count;
}

hCSGO_GetOnePlayerTeam(Team, bool:bOnlyAlive)
{
	static playersSize;
	static playersTable[65];
	static m_Player;
	m_Player = 1;
	playersSize = 0;
	while (m_Player <= MaxClients)
	{
		new var1;
		if (!IsClientInGame(m_Player) || Team == GetClientTeam(m_Player))
		{
		}
		else
		{
			new var2;
			if (!(bOnlyAlive && !IsPlayerAlive(m_Player)))
			{
				playersSize += 1;
				playersTable[playersSize] = m_Player;
			}
		}
		m_Player += 1;
	}
	playersTable[playersSize] = 0;
	if (playersSize)
	{
		return playersTable[GetRandomInt(0, playersSize + -1)];
	}
	return -1;
}

bool:hCSGO_IsClientAdmin(Id)
{
	static m_Flags;
	m_Flags = GetUserFlagBits(Id);
	new var1;
	if (m_Flags & 1 || m_Flags & 512 || m_Flags & 4 || m_Flags & 16384)
	{
		return true;
	}
	return false;
}

hCSGO_ExtractSteamID(String:Input[], String:Output[], Size)
{
	static String:m_Patterns[4][48] =
	{
		"STEAM_0:0:",
		"STEAM_0:1:",
		"STEAM_1:0:",
		"STEAM_1:1:"
	};
	static m_Length;
	static m_Iterator;
	m_Iterator = 0;
	m_Length = FormatEx(Output, Size, Input);
	while (m_Iterator < 4)
	{
		m_Length = ReplaceString(Output, Size, m_Patterns[m_Iterator], "", false);
		m_Iterator += 1;
	}
	return m_Length;
}

hCSGO_ClearLine(String:Line[], Times)
{
	static m_Length;
	static m_Iterator;
	m_Iterator = 0;
	m_Length = strlen(Line);
	while (m_Iterator < Times)
	{
		StripQuotes(Line);
		m_Length = TrimString(Line);
		m_Iterator += 1;
	}
	return m_Length;
}

bool:hCSGO_IsWarmup()
{
	new var1;
	if (GameRules_GetProp("m_bWarmupPeriod", 4, 0))
	{
		var1 = true;
	}
	else
	{
		var1 = false;
	}
	return var1;
}

public APLRes:AskPluginLoad2(Handle:pMyself, bool:bLate, String:Error[], maxLen)
{
	CreateNative("ReloadVIPs", __ReloadVIPs);
	CreateNative("IsClientVIP", __IsClientVIP);
	RegPluginLibrary("vip_ex");
	return APLRes:0;
}

public __IsClientVIP(Handle:pPlugin, Params)
{
	new var1;
	if (g_bVIP[GetNativeCell(1)])
	{
		var1 = 1;
	}
	else
	{
		var1 = 0;
	}
	return var1;
}

public __ReloadVIPs(Handle:pPlugin, Params)
{
	static Iterator;
	static Size;
	static Player;
	static String:Steam[32];
	static String:Buffer[1024];
	static String:Buffers[4][256];
	static Handle:pFile;
	ClearArray(g_pSteams);
	ClearArray(g_pFlags);
	Player = 1;
	while (Player <= MaxClients)
	{
		if (g_bVIP[Player])
		{
			g_Flags[Player][0] = MissingTAG:0;
			g_bVIP[Player] = 0;
		}
		Player += 1;
	}
	BuildPath(PathType:0, Buffer, 1024, "configs/vips.txt");
	if (!FileExists(Buffer, false, "GAME"))
	{
		return 0;
	}
	pFile = OpenFile(Buffer, "r", false, "GAME");
	if (!pFile)
	{
		return 0;
	}
	while (!IsEndOfFile(pFile) && ReadFileLine(pFile, Buffer, 1024))
	{
		TrimString(Buffer);
		hCSGO_FixFileLine(Buffer, 1024, 32);
		new var3;
		if (!(strlen(Buffer) < 1 || Buffer[0] == ';' || Buffer[0] == '#' || (Buffer[0] == '/' && Buffer[0] == '/')))
		{
			Size = ExplodeString(Buffer, " ", Buffers, 4, 256, false);
			if (Size >= 2)
			{
				new var4 = Buffers;
				hCSGO_ClearLine(var4[0][var4], 4);
				new var5 = Buffers;
				new var6 = Buffers;
				hCSGO_ExtractSteamID(var6[0][var6], var5[0][var5], 256);
				new var7 = Buffers;
				PushArrayString(g_pSteams, var7[0][var7]);
				hCSGO_ClearLine(Buffers[1], 4);
				PushArrayString(g_pFlags, Buffers[1]);
			}
		}
	}
	CloseHandle(pFile);
	Size = GetArraySize(g_pSteams);
	if (0 < Size)
	{
		Iterator = 0;
		while (Iterator < Size)
		{
			GetArrayString(g_pSteams, Iterator, Buffer, 1024);
			Player = 1;
			while (Player <= MaxClients)
			{
				if (g_inGame[Player])
				{
					GetClientAuthId(Player, AuthIdType:0, Steam, 32, true);
					if (StrContains(Steam, Buffer, false) != -1)
					{
						g_bVIP[Player] = 1;
						GetArrayString(g_pFlags, Iterator, g_Flags[Player], 32);
						PrintToChat(Player, "*\x04 VIPs\x01 were reloaded by the\x03 owner\x01.");
						PrintToChat(Player, "* You are\x04 VIP\x01 and you can type\x03 !vip\x01.");
					}
				}
				Player += 1;
			}
			Iterator += 1;
		}
	}
	return 1;
}

public void:OnClientCookiesCached(Client)
{
	static String:Data[8];
	GetClientCookie(Client, g_pTagsCookie, Data, 8);
	if (strlen(Data) < 1)
	{
		g_TagOption[Client] = 0;
		g_bAsk[Client] = 1;
	}
	else
	{
		g_TagOption[Client] = hCSGO_ClampInt(StringToInt(Data, 10), 0, 4);
		g_bAsk[Client] = 0;
	}
	return void:0;
}

public void:OnRoundStart(Handle:pHndl, String:Name[], bool:bNoBCast)
{
	static Iter;
	Iter = 1;
	while (Iter <= MaxClients)
	{
		g_bEquipped[Iter] = 0;
		Iter += 1;
	}
	g_bOneAndOnly = false;
	return void:0;
}

public void:OnPluginStart()
{
	HookEvent("round_start", OnRoundStart, EventHookMode:1);
	HookEvent("player_spawn", OnSpawn, EventHookMode:1);
	HookEvent("player_death", OnDeath, EventHookMode:1);
	RegConsoleCmd("say", CommandSay, "", 0);
	RegConsoleCmd("say_team", CommandSay, "", 0);
	g_pSteams = CreateArray(32, 0);
	g_pFlags = CreateArray(32, 0);
	g_pTagsCookie = RegClientCookie("VipTags", "Stores the VIP tag setting.", CookieAccess:2);
	CreateTimer(GetRandomFloat(5.0, 10.0) * 60.0, TimerAd, any:0, 1);
	CreateTimer(2.25, TimerReload, any:0, 1);
	return void:0;
}

public Action:OnWpnReload(Weapon)
{
	static Owner;
	Owner = GetEntPropEnt(Weapon, PropType:0, "m_hOwner", 0);
	new var1;
	if (Owner != -1 && g_bVIP[Owner] && StrContains(g_Flags[Owner], "U", false) != -1)
	{
		return Action:4;
	}
	return Action:0;
}

public void:OnEntityCreated(Entity, String:Class[])
{
	new var1;
	if (Entity != -1 && StrContains(Class, "Weapon_", false) != -1 && StrContains(Class, "Knife", false) == -1 && StrContains(Class, "Bayonet", false) == -1 && StrContains(Class, "Taser", false) == -1 && StrContains(Class, "Zeus", false) == -1 && StrContains(Class, "Nade", false) == -1 && StrContains(Class, "Flash", false) == -1 && StrContains(Class, "C4", false) == -1 && StrContains(Class, "Bomb", false) == -1 && StrContains(Class, "World", false) == -1)
	{
		SDKHook(Entity, SDKHookType:36, OnWpnReload);
	}
	return void:0;
}

public Action:TimerAd(Handle:pTimer)
{
	static Plr;
	switch (GetRandomInt(0, 1))
	{
		case 0:
		{
			Plr = 1;
			while (Plr <= MaxClients)
			{
				new var2;
				if (g_inGame[Plr] && !IsPlayerAlive(Plr))
				{
					PrintHintText(Plr, "<b><font color='#FF0000'>eLeague</font></b>eLeague<b><font color='#00FF00'>5€</font></b>.");
				}
				Plr += 1;
			}
		}
		case 1:
		{
			Plr = 1;
			while (Plr <= MaxClients)
			{
				new var1;
				if (g_inGame[Plr] && !IsPlayerAlive(Plr))
				{
					PrintHintText(Plr, "<b><font color='#FF0000'>Tag Settings?</font></b>  Type <b><font color='#00FF00'>!vip</font></b>.");
				}
				Plr += 1;
			}
		}
		default:
		{
		}
	}
	return Action:0;
}

public void:OnMapStart()
{
	static Size;
	static String:Buffer[1024];
	static Handle:pFile;
	static String:Buffers[4][256];
	g_Time = 0;
	ClearArray(g_pSteams);
	ClearArray(g_pFlags);
	BuildPath(PathType:0, Buffer, 1024, "configs/vips.txt");
	if (!FileExists(Buffer, false, "GAME"))
	{
		return void:0;
	}
	pFile = OpenFile(Buffer, "r", false, "GAME");
	if (!pFile)
	{
		return void:0;
	}
	while (!IsEndOfFile(pFile) && ReadFileLine(pFile, Buffer, 1024))
	{
		TrimString(Buffer);
		hCSGO_FixFileLine(Buffer, 1024, 32);
		new var3;
		if (!(strlen(Buffer) < 1 || Buffer[0] == ';' || Buffer[0] == '#' || (Buffer[0] == '/' && Buffer[0] == '/')))
		{
			Size = ExplodeString(Buffer, " ", Buffers, 4, 256, false);
			if (Size >= 2)
			{
				new var4 = Buffers;
				hCSGO_ClearLine(var4[0][var4], 4);
				new var5 = Buffers;
				new var6 = Buffers;
				hCSGO_ExtractSteamID(var6[0][var6], var5[0][var5], 256);
				new var7 = Buffers;
				PushArrayString(g_pSteams, var7[0][var7]);
				hCSGO_ClearLine(Buffers[1], 4);
				PushArrayString(g_pFlags, Buffers[1]);
			}
		}
	}
	CloseHandle(pFile);
	return void:0;
}

public void:OnClientDisconnect(Id)
{
	if (0 < Id)
	{
		g_inGame[Id] = 0;
		g_bVIP[Id] = 0;
		g_bAsk[Id] = 0;
		g_TagOption[Id] = 0;
	}
	return void:0;
}

public void:OnClientPutInServer(Id)
{
	static Iter;
	static Size;
	static String:Object[32];
	static String:Steam[32];
	if (0 < Id)
	{
		g_inGame[Id] = 0;
		g_bVIP[Id] = 0;
		g_inGame[Id] = 1;
		Size = GetArraySize(g_pSteams);
		if (0 < Size)
		{
			GetClientAuthId(Id, AuthIdType:0, Steam, 32, true);
			Iter = 0;
			while (Iter < Size)
			{
				GetArrayString(g_pSteams, Iter, Object, 32);
				if (StrContains(Steam, Object, false) != -1)
				{
					GetArrayString(g_pFlags, Iter, g_Flags[Id], 32);
					CreateTimer(GetRandomFloat(2.75, 4.5), TimerVIPJoined, Id, 2);
					g_bVIP[Id] = 1;
				}
				Iter += 1;
			}
		}
		if (g_bAsk[Id])
		{
			CreateTimer(GetRandomFloat(18.5, 27.5), Ask, Id, 2);
		}
	}
	return void:0;
}

public Action:CommandSay(Client, Args)
{
	static String:Command[32];
	static String:RawCommand[32];
	new var1;
	if (Client > 0 && g_inGame[Client])
	{
		GetCmdArgString(RawCommand, 32);
		hCSGO_PureChatCommand(RawCommand, Command, 32);
		if (0 < strlen(Command))
		{
			new var2;
			if (strcmp(Command, "VIP", false) && strcmp(15152 + 1, "VIP", false) && strcmp(Command, "TAG", false) && strcmp(15152 + 1, "TAG", false))
			{
				g_bAsk[Client] = 1;
				CreateTimer(GetRandomFloat(0.1, 0.3), Ask, Client, 2);
			}
		}
	}
	return Action:0;
}

public Action:Ask(Handle:pTimer, any:Id)
{
	static Handle:pPanel;
	static bool:bAdmin;
	new var1;
	if (Id > any:0 && g_inGame[Id] && g_bAsk[Id])
	{
		pPanel = CreatePanel(Handle:0);
		if (pPanel)
		{
			bAdmin = hCSGO_IsClientAdmin(Id);
			SetPanelKeys(pPanel, 1023);
			SetPanelTitle(pPanel, "The Type of Tag in The Scores Table?", false);
			DrawPanelText(pPanel, " \n");
			new var2;
			if (g_bVIP[Id] && bAdmin)
			{
				DrawPanelText(pPanel, "1. Only VIP★ Tag");
				DrawPanelText(pPanel, "2. VIP★ & Admin Tag");
				DrawPanelText(pPanel, "3. Only Admin Tag");
				DrawPanelText(pPanel, "4. No Tag At All (Do Not Change)");
			}
			else
			{
				new var3;
				if (g_bVIP[Id] && !bAdmin)
				{
					DrawPanelText(pPanel, "1. Only VIP★ Tag");
					DrawPanelText(pPanel, "2. No Tag At All (Do Not Change)");
				}
				new var4;
				if (!g_bVIP[Id] && bAdmin)
				{
					DrawPanelText(pPanel, "1. Only Admin Tag");
					DrawPanelText(pPanel, "2. No Tag At All (Do Not Change)");
				}
				DrawPanelText(pPanel, "1. No Tag At All (Do Not Change)");
			}
			SendPanelToClient(pPanel, Id, AskPanel, 0);
			CloseHandle(pPanel);
		}
	}
	return Action:0;
}

public AskPanel(Handle:pPanel, MenuAction:pAction, Client, Selection)
{
	static String:Option[8];
	static bool:bAdmin;
	new var1;
	if (pAction == MenuAction:4 && g_inGame[Client] && g_bAsk[Client])
	{
		bAdmin = hCSGO_IsClientAdmin(Client);
		new var2;
		if (g_bVIP[Client] && bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = 1;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only VIP★ Tag\x01.");
				}
				case 2:
				{
					g_TagOption[Client] = 3;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 VIP★ & Admin Tag\x01.");
				}
				case 3:
				{
					g_TagOption[Client] = 2;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only Admin Tag\x01.");
				}
				case 4:
				{
					g_TagOption[Client] = 4;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
				default:
				{
				}
			}
		}
		new var3;
		if (g_bVIP[Client] && !bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = 1;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only VIP★ Tag\x01.");
				}
				case 2:
				{
					g_TagOption[Client] = 4;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
				default:
				{
				}
			}
		}
		new var4;
		if (!g_bVIP[Client] && bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = 2;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only Admin Tag\x01.");
				}
				case 2:
				{
					g_TagOption[Client] = 4;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
				default:
				{
				}
			}
		}
		switch (Selection)
		{
			case 1:
			{
				g_TagOption[Client] = 4;
				g_bAsk[Client] = 0;
				IntToString(g_TagOption[Client], Option, 8);
				SetClientCookie(Client, g_pTagsCookie, Option);
				PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
			}
			default:
			{
			}
		}
	}
	return 0;
}

public Action:TimerReload(Handle:pTimer)
{
	static Flags;
	static Client;
	static Weapon;
	static String:Class[32];
	static bool:bAdmin;
	Client = 1;
	while (Client <= MaxClients)
	{
		new var2;
		if (!g_inGame[Client] || (!hCSGO_IsClientAdmin(Client) && !g_bVIP[Client]))
		{
		}
		else
		{
			new var3;
			if (g_TagOption[Client] && g_TagOption[Client] != 4 && !g_bAsk[Client])
			{
				bAdmin = hCSGO_IsClientAdmin(Client);
				new var4;
				if (g_bVIP[Client] && g_TagOption[Client] == 1)
				{
					CS_SetClientClanTag(Client, "VIP★");
				}
				new var5;
				if (bAdmin && g_TagOption[Client] == 2)
				{
					Flags = GetUserFlagBits(Client);
					if (Flags & 16384)
					{
						CS_SetClientClanTag(Client, "Owner");
					}
					if (Flags & 32768)
					{
						CS_SetClientClanTag(Client, "Co-Owner");
					}
					if (Flags & 65536)
					{
						CS_SetClientClanTag(Client, "Moderator");
					}
					if (Flags & 131072)
					{
						CS_SetClientClanTag(Client, "Administrator");
					}
					if (Flags & 262144)
					{
						CS_SetClientClanTag(Client, "Helper");
					}
					if (Flags & 524288)
					{
						CS_SetClientClanTag(Client, "YouTube");
					}
					if (Flags & 1048576)
					{
						CS_SetClientClanTag(Client, "Legend");
					}
				}
				new var6;
				if (bAdmin && g_bVIP[Client] && g_TagOption[Client] == 3)
				{
					Flags = GetUserFlagBits(Client);
					if (Flags & 16384)
					{
						CS_SetClientClanTag(Client, "VIP★ Owner");
					}
					if (Flags & 32768)
					{
						CS_SetClientClanTag(Client, "VIP★ Co-Owner");
					}
					if (Flags & 65536)
					{
						CS_SetClientClanTag(Client, "VIP★ Mod");
					}
					if (Flags & 131072)
					{
						CS_SetClientClanTag(Client, "VIP★ Admin");
					}
					if (Flags & 262144)
					{
						CS_SetClientClanTag(Client, "VIP★ Helper");
					}
					if (Flags & 524288)
					{
						CS_SetClientClanTag(Client, "VIP★ YouTube");
					}
					if (Flags & 1048576)
					{
						CS_SetClientClanTag(Client, "VIP★ Legend");
					}
				}
			}
			new var7;
			if (g_bVIP[Client] && StrContains(g_Flags[Client], "U", false) != -1 && IsPlayerAlive(Client))
			{
				Weapon = GetEntPropEnt(Client, PropType:0, "m_hActiveWeapon", 0);
				new var8;
				if (Weapon != -1 && GetEdictClassname(Weapon, Class, 32))
				{
					new var9;
					if (StrContains(Class, "Knife", false) == -1 && StrContains(Class, "Taser", false) == -1 && StrContains(Class, "Nade", false) == -1 && StrContains(Class, "Flash", false) == -1 && StrContains(Class, "Bayonet", false) == -1 && StrContains(Class, "Smoke", false) == -1 && StrContains(Class, "Incendiary", false) == -1 && StrContains(Class, "Molotov", false) == -1 && StrContains(Class, "Kit", false) == -1 && StrContains(Class, "Defuse", false) == -1 && StrContains(Class, "Projectile", false) == -1 && StrContains(Class, "Bang", false) == -1 && StrContains(Class, "Bomb", false) == -1 && StrContains(Class, "C4", false) == -1 && StrContains(Class, "Zeus", false) == -1 && StrContains(Class, "Decoy", false) == -1)
					{
						SetEntProp(Weapon, PropType:0, "m_iClip1", any:32, 4, 0);
						SetEntProp(Weapon, PropType:0, "m_iClip2", any:32, 4, 0);
					}
				}
			}
		}
		Client += 1;
	}
	return Action:0;
}

public Action:TimerVIPJoined(Handle:pTimer, any:Client)
{
	static String:Name[32];
	new var1;
	if (g_bVIP[Client] && g_inGame[Client])
	{
		GetClientName(Client, Name, 32);
		hCSGO_MakeHtmlSafe(Name, 32);
		PrintHintTextToAll("<b><font color='#FF0000'>VIP</font></b> <font color='#00FF00'>%s</font> <font color='#FFFFFF'>joined!</font>", Name);
	}
	return Action:0;
}

public void:OnDeath(Handle:pEvent, String:myName[], bool:bNoBroadcast)
{
	static Gained;
	static newHealth;
	static Health;
	static Killer;
	static Client;
	static bool:bWarmup;
	Client = GetClientOfUserId(GetEventInt(pEvent, "userid", 0));
	Killer = GetClientOfUserId(GetEventInt(pEvent, "attacker", 0));
	bWarmup = hCSGO_IsWarmup();
	new var1;
	if (Killer != Client && Client > 0 && Killer > 0 && g_bVIP[Killer] && IsPlayerAlive(Killer) && StrContains(g_Flags[Killer], "H", false) != -1 && !bWarmup)
	{
		Health = GetClientHealth(Killer);
		if (0 < Health)
		{
			newHealth = hCSGO_ClampInt(Health + 5, 6, 100);
			Gained = newHealth - Health;
			if (Gained)
			{
				SetEntProp(Killer, PropType:0, "m_iHealth", newHealth, 4, 0);
				PrintHintText(Killer, "<b><font color='#FF0000'>+%d</font></b> <font color='#00FF00'>HP</font> <font color='#FFFFFF'>GAINED!</font>", Gained);
			}
		}
	}
	if (!bWarmup)
	{
		CreateTimer(GetRandomFloat(0.05, 0.105), TimerShowInfo, any:0, 2);
	}
	return void:0;
}

public Action:TimerShowInfo(Handle:pTimer)
{
	static Time;
	static CTPlayer;
	static TPlayer;
	static CT;
	static T;
	static String:enemyName[32];
	static String:Name[32];
	Time = GetTime({0,0});
	T = hCSGO_CountTeam(2, true);
	CT = hCSGO_CountTeam(3, true);
	new var1;
	if (T == 1 && CT > 0)
	{
		TPlayer = hCSGO_GetOnePlayerTeam(2, true);
		if (TPlayer != -1)
		{
			GetClientName(TPlayer, Name, 32);
			if (CT > 1)
			{
				if (g_Time < Time)
				{
					if (!g_bOneAndOnly)
					{
						g_bOneAndOnly = true;
					}
					PrintToChatAll("*\x07 %s\x01 (\x04%d HP\x01) against\x0B %d CT", Name, GetClientHealth(TPlayer), CT);
					g_Time = Time + 1;
				}
			}
			CTPlayer = hCSGO_GetOnePlayerTeam(3, true);
			if (CTPlayer != -1)
			{
				GetClientName(CTPlayer, enemyName, 32);
				PrintToChatAll("*\x07 %s\x01 (\x04%d HP\x01) against\x0B %s\x01 (\x04%d HP\x01)", Name, GetClientHealth(TPlayer), enemyName, GetClientHealth(CTPlayer));
			}
		}
	}
	else
	{
		new var2;
		if (CT == 1 && T > 0)
		{
			CTPlayer = hCSGO_GetOnePlayerTeam(3, true);
			if (CTPlayer != -1)
			{
				GetClientName(CTPlayer, Name, 32);
				if (T > 1)
				{
					if (g_Time < Time)
					{
						if (!g_bOneAndOnly)
						{
							g_bOneAndOnly = true;
						}
						PrintToChatAll("*\x0B %s\x01 (\x04%d HP\x01) against\x07 %d T", Name, GetClientHealth(CTPlayer), T);
						g_Time = Time + 1;
					}
				}
				TPlayer = hCSGO_GetOnePlayerTeam(2, true);
				if (TPlayer != -1)
				{
					GetClientName(TPlayer, enemyName, 32);
					PrintToChatAll("*\x0B %s\x01 (\x04%d HP\x01) against\x07 %s\x01 (\x04%d HP\x01)", Name, GetClientHealth(CTPlayer), enemyName, GetClientHealth(TPlayer));
				}
			}
		}
	}
	return Action:0;
}

public void:OnSpawn(Handle:pEvent, String:myName[], bool:bNoBroadcast)
{
	static Client;
	Client = GetClientOfUserId(GetEventInt(pEvent, "userid", 0));
	new var1;
	if (Client > 0 && g_bVIP[Client] && g_inGame[Client] && IsPlayerAlive(Client))
	{
		CreateTimer(0.275, EquipClient, Client, 2);
	}
	return void:0;
}

public Action:EquipClient(Handle:pTimer, any:Client)
{
	static Team;
	new var1;
	if (!g_bEquipped[Client] && g_bVIP[Client] && g_inGame[Client] && IsPlayerAlive(Client))
	{
		Team = GetClientTeam(Client);
		switch (GetRandomInt(0, 1))
		{
			case 0:
			{
				if (StrContains(g_Flags[Client], "G", false) != -1)
				{
					GivePlayerItem(Client, "weapon_hegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "I", false) != -1)
				{
					new var3;
					if (Team == 2)
					{
						var3[0] = 17124;
					}
					else
					{
						var3[0] = 17140;
					}
					GivePlayerItem(Client, var3, 0);
				}
				if (StrContains(g_Flags[Client], "S", false) != -1)
				{
					GivePlayerItem(Client, "weapon_smokegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "F", false) != -1)
				{
					GivePlayerItem(Client, "weapon_flashbang", 0);
				}
			}
			case 1:
			{
				if (StrContains(g_Flags[Client], "I", false) != -1)
				{
					new var2;
					if (Team == 2)
					{
						var2[0] = 17212;
					}
					else
					{
						var2[0] = 17228;
					}
					GivePlayerItem(Client, var2, 0);
				}
				if (StrContains(g_Flags[Client], "G", false) != -1)
				{
					GivePlayerItem(Client, "weapon_hegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "S", false) != -1)
				{
					GivePlayerItem(Client, "weapon_smokegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "F", false) != -1)
				{
					GivePlayerItem(Client, "weapon_flashbang", 0);
				}
			}
			default:
			{
			}
		}
		new var4;
		if (Team == 3 && StrContains(g_Flags[Client], "D", false) != -1)
		{
			GivePlayerItem(Client, "item_defuser", 0);
		}
		if (StrContains(g_Flags[Client], "A", false) != -1)
		{
			SetEntProp(Client, PropType:0, "m_ArmorValue", any:100, 4, 0);
			SetEntProp(Client, PropType:0, "m_bHasHelmet", any:1, 4, 0);
		}
		g_bEquipped[Client] = 1;
	}
	return Action:0;
}
Sincronic is offline
CliptonHeist
Member
Join Date: Feb 2016
Old 01-12-2019 , 00:21   Re: Plugin compile help
Reply With Quote #2

What did you change? What errors does the compiler give?
CliptonHeist is online now
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 01-12-2019 , 00:49   Re: Plugin compile help
Reply With Quote #3

Quote:
Originally Posted by Sincronic View Post
Guys, i have this source and is a working plugin, i decompiled i changed something but now i can't compile it. I put the code.

Thanks

Code:
public PlVers:__version =
{
	version = 5,
	filevers = "1.7.2",
	date = "05/07/2017",
	time = "22:48:57"
};
new Float:NULL_VECTOR[3];
new String:NULL_STRING[4];
public Extension:__ext_core =
{
	name = "Core",
	file = "core",
	autoload = 0,
	required = 0,
};
new MaxClients;
public Extension:__ext_sdktools =
{
	name = "SDKTools",
	file = "sdktools.ext",
	autoload = 1,
	required = 1,
};
public Extension:__ext_sdkhooks =
{
	name = "SDKHooks",
	file = "sdkhooks.ext",
	autoload = 1,
	required = 1,
};
public Extension:__ext_cstrike =
{
	name = "cstrike",
	file = "games/game.cstrike.ext",
	autoload = 0,
	required = 1,
};
public Extension:__ext_topmenus =
{
	name = "TopMenus",
	file = "topmenus.ext",
	autoload = 1,
	required = 1,
};
public SharedPlugin:__pl_adminmenu =
{
	name = "adminmenu",
	file = "adminmenu.smx",
	required = 1,
};
public Extension:__ext_cprefs =
{
	name = "Client Preferences",
	file = "clientprefs.ext",
	autoload = 1,
	required = 1,
};
public Plugin:myinfo =
{
	name = "vip_ex",
	description = "Provides in-game VIP accounts and features",
	author = "eleague",
	version = "1.0",
	url = "www.eleague.ro"
};
new Handle:g_pTagsCookie;
new Handle:g_pSteams;
new Handle:g_pFlags;
new g_TagOption[129];
new bool:g_bVIP[129];
new bool:g_bAsk[129];
new bool:g_bEquipped[129];
new String:g_Flags[129][32];
new g_Time;
new bool:g_bOneAndOnly;
new bool:g_inGame[129];
public __ext_core_SetNTVOptional()
{
	MarkNativeAsOptional("GetFeatureStatus");
	MarkNativeAsOptional("RequireFeature");
	MarkNativeAsOptional("AddCommandListener");
	MarkNativeAsOptional("RemoveCommandListener");
	MarkNativeAsOptional("BfWriteBool");
	MarkNativeAsOptional("BfWriteByte");
	MarkNativeAsOptional("BfWriteChar");
	MarkNativeAsOptional("BfWriteShort");
	MarkNativeAsOptional("BfWriteWord");
	MarkNativeAsOptional("BfWriteNum");
	MarkNativeAsOptional("BfWriteFloat");
	MarkNativeAsOptional("BfWriteString");
	MarkNativeAsOptional("BfWriteEntity");
	MarkNativeAsOptional("BfWriteAngle");
	MarkNativeAsOptional("BfWriteCoord");
	MarkNativeAsOptional("BfWriteVecCoord");
	MarkNativeAsOptional("BfWriteVecNormal");
	MarkNativeAsOptional("BfWriteAngles");
	MarkNativeAsOptional("BfReadBool");
	MarkNativeAsOptional("BfReadByte");
	MarkNativeAsOptional("BfReadChar");
	MarkNativeAsOptional("BfReadShort");
	MarkNativeAsOptional("BfReadWord");
	MarkNativeAsOptional("BfReadNum");
	MarkNativeAsOptional("BfReadFloat");
	MarkNativeAsOptional("BfReadString");
	MarkNativeAsOptional("BfReadEntity");
	MarkNativeAsOptional("BfReadAngle");
	MarkNativeAsOptional("BfReadCoord");
	MarkNativeAsOptional("BfReadVecCoord");
	MarkNativeAsOptional("BfReadVecNormal");
	MarkNativeAsOptional("BfReadAngles");
	MarkNativeAsOptional("BfGetNumBytesLeft");
	MarkNativeAsOptional("BfWrite.WriteBool");
	MarkNativeAsOptional("BfWrite.WriteByte");
	MarkNativeAsOptional("BfWrite.WriteChar");
	MarkNativeAsOptional("BfWrite.WriteShort");
	MarkNativeAsOptional("BfWrite.WriteWord");
	MarkNativeAsOptional("BfWrite.WriteNum");
	MarkNativeAsOptional("BfWrite.WriteFloat");
	MarkNativeAsOptional("BfWrite.WriteString");
	MarkNativeAsOptional("BfWrite.WriteEntity");
	MarkNativeAsOptional("BfWrite.WriteAngle");
	MarkNativeAsOptional("BfWrite.WriteCoord");
	MarkNativeAsOptional("BfWrite.WriteVecCoord");
	MarkNativeAsOptional("BfWrite.WriteVecNormal");
	MarkNativeAsOptional("BfWrite.WriteAngles");
	MarkNativeAsOptional("BfRead.ReadBool");
	MarkNativeAsOptional("BfRead.ReadByte");
	MarkNativeAsOptional("BfRead.ReadChar");
	MarkNativeAsOptional("BfRead.ReadShort");
	MarkNativeAsOptional("BfRead.ReadWord");
	MarkNativeAsOptional("BfRead.ReadNum");
	MarkNativeAsOptional("BfRead.ReadFloat");
	MarkNativeAsOptional("BfRead.ReadString");
	MarkNativeAsOptional("BfRead.ReadEntity");
	MarkNativeAsOptional("BfRead.ReadAngle");
	MarkNativeAsOptional("BfRead.ReadCoord");
	MarkNativeAsOptional("BfRead.ReadVecCoord");
	MarkNativeAsOptional("BfRead.ReadVecNormal");
	MarkNativeAsOptional("BfRead.ReadAngles");
	MarkNativeAsOptional("BfRead.GetNumBytesLeft");
	MarkNativeAsOptional("PbReadInt");
	MarkNativeAsOptional("PbReadFloat");
	MarkNativeAsOptional("PbReadBool");
	MarkNativeAsOptional("PbReadString");
	MarkNativeAsOptional("PbReadColor");
	MarkNativeAsOptional("PbReadAngle");
	MarkNativeAsOptional("PbReadVector");
	MarkNativeAsOptional("PbReadVector2D");
	MarkNativeAsOptional("PbGetRepeatedFieldCount");
	MarkNativeAsOptional("PbSetInt");
	MarkNativeAsOptional("PbSetFloat");
	MarkNativeAsOptional("PbSetBool");
	MarkNativeAsOptional("PbSetString");
	MarkNativeAsOptional("PbSetColor");
	MarkNativeAsOptional("PbSetAngle");
	MarkNativeAsOptional("PbSetVector");
	MarkNativeAsOptional("PbSetVector2D");
	MarkNativeAsOptional("PbAddInt");
	MarkNativeAsOptional("PbAddFloat");
	MarkNativeAsOptional("PbAddBool");
	MarkNativeAsOptional("PbAddString");
	MarkNativeAsOptional("PbAddColor");
	MarkNativeAsOptional("PbAddAngle");
	MarkNativeAsOptional("PbAddVector");
	MarkNativeAsOptional("PbAddVector2D");
	MarkNativeAsOptional("PbRemoveRepeatedFieldValue");
	MarkNativeAsOptional("PbReadMessage");
	MarkNativeAsOptional("PbReadRepeatedMessage");
	MarkNativeAsOptional("PbAddMessage");
	MarkNativeAsOptional("Protobuf.ReadInt");
	MarkNativeAsOptional("Protobuf.ReadFloat");
	MarkNativeAsOptional("Protobuf.ReadBool");
	MarkNativeAsOptional("Protobuf.ReadString");
	MarkNativeAsOptional("Protobuf.ReadColor");
	MarkNativeAsOptional("Protobuf.ReadAngle");
	MarkNativeAsOptional("Protobuf.ReadVector");
	MarkNativeAsOptional("Protobuf.ReadVector2D");
	MarkNativeAsOptional("Protobuf.GetRepeatedFieldCount");
	MarkNativeAsOptional("Protobuf.SetInt");
	MarkNativeAsOptional("Protobuf.SetFloat");
	MarkNativeAsOptional("Protobuf.SetBool");
	MarkNativeAsOptional("Protobuf.SetString");
	MarkNativeAsOptional("Protobuf.SetColor");
	MarkNativeAsOptional("Protobuf.SetAngle");
	MarkNativeAsOptional("Protobuf.SetVector");
	MarkNativeAsOptional("Protobuf.SetVector2D");
	MarkNativeAsOptional("Protobuf.AddInt");
	MarkNativeAsOptional("Protobuf.AddFloat");
	MarkNativeAsOptional("Protobuf.AddBool");
	MarkNativeAsOptional("Protobuf.AddString");
	MarkNativeAsOptional("Protobuf.AddColor");
	MarkNativeAsOptional("Protobuf.AddAngle");
	MarkNativeAsOptional("Protobuf.AddVector");
	MarkNativeAsOptional("Protobuf.AddVector2D");
	MarkNativeAsOptional("Protobuf.RemoveRepeatedFieldValue");
	MarkNativeAsOptional("Protobuf.ReadMessage");
	MarkNativeAsOptional("Protobuf.ReadRepeatedMessage");
	MarkNativeAsOptional("Protobuf.AddMessage");
	VerifyCoreVersion();
	return 0;
}

ExplodeString(String:text[], String:split[], String:buffers[][], maxStrings, maxStringLength, bool:copyRemainder)
{
	new reloc_idx;
	new idx;
	new total;
	new var1;
	if (maxStrings < 1 || !split[0])
	{
		return 0;
	}
	while ((idx = SplitString(text[reloc_idx], split, buffers[total], maxStringLength)) != -1)
	{
		reloc_idx = idx + reloc_idx;
		total++;
		if (maxStrings == total)
		{
			if (copyRemainder)
			{
				strcopy(buffers[total + -1], maxStringLength, text[reloc_idx - idx]);
			}
			return total;
		}
	}
	total++;
	strcopy(buffers[total], maxStringLength, text[reloc_idx]);
	return total;
}

PrintToChatAll(String:format[])
{
	decl String:buffer[192];
	new i = 1;
	while (i <= MaxClients)
	{
		if (IsClientInGame(i))
		{
			SetGlobalTransTarget(i);
			VFormat(buffer, 192, format, 2);
			PrintToChat(i, "%s", buffer);
		}
		i++;
	}
	return 0;
}

PrintHintTextToAll(String:format[])
{
	decl String:buffer[192];
	new i = 1;
	while (i <= MaxClients)
	{
		if (IsClientInGame(i))
		{
			SetGlobalTransTarget(i);
			VFormat(buffer, 192, format, 2);
			PrintHintText(i, "%s", buffer);
		}
		i++;
	}
	return 0;
}

hCSGO_MakeHtmlSafe(String:Buffer[], Size)
{
	ReplaceString(Buffer, Size, "<", "(", true);
	ReplaceString(Buffer, Size, ">", ")", true);
	return strlen(Buffer);
}

hCSGO_FixFileLine(String:FileLine[], Size, Times)
{
	static m_Iterator;
	m_Iterator = 0;
	while (m_Iterator < Times)
	{
		ReplaceString(FileLine, Size, "\x09", " ", true);
		m_Iterator += 1;
	}
	m_Iterator = 0;
	while (m_Iterator < Times)
	{
		ReplaceString(FileLine, Size, "  ", " ", true);
		m_Iterator += 1;
	}
	return strlen(FileLine);
}

hCSGO_PureChatCommand(String:Input[], String:Output[], Size)
{
	static m_Length;
	static m_Iterator;
	m_Iterator = 0;
	m_Length = 0;
	Output[0] = MissingTAG:0;
	while (strlen(Input) > m_Iterator)
	{
		new var1;
		if (Input[m_Iterator] == '!' || Input[m_Iterator] == '/' || IsCharAlpha(Input[m_Iterator]) || IsCharNumeric(Input[m_Iterator]))
		{
			m_Length = Format(Output, Size, "%s%c", Output, Input[m_Iterator]);
		}
		m_Iterator += 1;
	}
	return m_Length;
}

hCSGO_ClampInt(Val, Min, Max)
{
	if (Val < Min)
	{
		return Min;
	}
	if (Val > Max)
	{
		return Max;
	}
	return Val;
}

hCSGO_CountTeam(Team, bool:bOnlyAlive)
{
	static m_Count;
	static m_Player;
	m_Player = 1;
	m_Count = 0;
	while (m_Player <= MaxClients)
	{
		new var1;
		if (!IsClientInGame(m_Player) || Team == GetClientTeam(m_Player))
		{
		}
		else
		{
			new var2;
			if (!(bOnlyAlive && !IsPlayerAlive(m_Player)))
			{
				m_Count += 1;
			}
		}
		m_Player += 1;
	}
	return m_Count;
}

hCSGO_GetOnePlayerTeam(Team, bool:bOnlyAlive)
{
	static playersSize;
	static playersTable[65];
	static m_Player;
	m_Player = 1;
	playersSize = 0;
	while (m_Player <= MaxClients)
	{
		new var1;
		if (!IsClientInGame(m_Player) || Team == GetClientTeam(m_Player))
		{
		}
		else
		{
			new var2;
			if (!(bOnlyAlive && !IsPlayerAlive(m_Player)))
			{
				playersSize += 1;
				playersTable[playersSize] = m_Player;
			}
		}
		m_Player += 1;
	}
	playersTable[playersSize] = 0;
	if (playersSize)
	{
		return playersTable[GetRandomInt(0, playersSize + -1)];
	}
	return -1;
}

bool:hCSGO_IsClientAdmin(Id)
{
	static m_Flags;
	m_Flags = GetUserFlagBits(Id);
	new var1;
	if (m_Flags & 1 || m_Flags & 512 || m_Flags & 4 || m_Flags & 16384)
	{
		return true;
	}
	return false;
}

hCSGO_ExtractSteamID(String:Input[], String:Output[], Size)
{
	static String:m_Patterns[4][48] =
	{
		"STEAM_0:0:",
		"STEAM_0:1:",
		"STEAM_1:0:",
		"STEAM_1:1:"
	};
	static m_Length;
	static m_Iterator;
	m_Iterator = 0;
	m_Length = FormatEx(Output, Size, Input);
	while (m_Iterator < 4)
	{
		m_Length = ReplaceString(Output, Size, m_Patterns[m_Iterator], "", false);
		m_Iterator += 1;
	}
	return m_Length;
}

hCSGO_ClearLine(String:Line[], Times)
{
	static m_Length;
	static m_Iterator;
	m_Iterator = 0;
	m_Length = strlen(Line);
	while (m_Iterator < Times)
	{
		StripQuotes(Line);
		m_Length = TrimString(Line);
		m_Iterator += 1;
	}
	return m_Length;
}

bool:hCSGO_IsWarmup()
{
	new var1;
	if (GameRules_GetProp("m_bWarmupPeriod", 4, 0))
	{
		var1 = true;
	}
	else
	{
		var1 = false;
	}
	return var1;
}

public APLRes:AskPluginLoad2(Handle:pMyself, bool:bLate, String:Error[], maxLen)
{
	CreateNative("ReloadVIPs", __ReloadVIPs);
	CreateNative("IsClientVIP", __IsClientVIP);
	RegPluginLibrary("vip_ex");
	return APLRes:0;
}

public __IsClientVIP(Handle:pPlugin, Params)
{
	new var1;
	if (g_bVIP[GetNativeCell(1)])
	{
		var1 = 1;
	}
	else
	{
		var1 = 0;
	}
	return var1;
}

public __ReloadVIPs(Handle:pPlugin, Params)
{
	static Iterator;
	static Size;
	static Player;
	static String:Steam[32];
	static String:Buffer[1024];
	static String:Buffers[4][256];
	static Handle:pFile;
	ClearArray(g_pSteams);
	ClearArray(g_pFlags);
	Player = 1;
	while (Player <= MaxClients)
	{
		if (g_bVIP[Player])
		{
			g_Flags[Player][0] = MissingTAG:0;
			g_bVIP[Player] = 0;
		}
		Player += 1;
	}
	BuildPath(PathType:0, Buffer, 1024, "configs/vips.txt");
	if (!FileExists(Buffer, false, "GAME"))
	{
		return 0;
	}
	pFile = OpenFile(Buffer, "r", false, "GAME");
	if (!pFile)
	{
		return 0;
	}
	while (!IsEndOfFile(pFile) && ReadFileLine(pFile, Buffer, 1024))
	{
		TrimString(Buffer);
		hCSGO_FixFileLine(Buffer, 1024, 32);
		new var3;
		if (!(strlen(Buffer) < 1 || Buffer[0] == ';' || Buffer[0] == '#' || (Buffer[0] == '/' && Buffer[0] == '/')))
		{
			Size = ExplodeString(Buffer, " ", Buffers, 4, 256, false);
			if (Size >= 2)
			{
				new var4 = Buffers;
				hCSGO_ClearLine(var4[0][var4], 4);
				new var5 = Buffers;
				new var6 = Buffers;
				hCSGO_ExtractSteamID(var6[0][var6], var5[0][var5], 256);
				new var7 = Buffers;
				PushArrayString(g_pSteams, var7[0][var7]);
				hCSGO_ClearLine(Buffers[1], 4);
				PushArrayString(g_pFlags, Buffers[1]);
			}
		}
	}
	CloseHandle(pFile);
	Size = GetArraySize(g_pSteams);
	if (0 < Size)
	{
		Iterator = 0;
		while (Iterator < Size)
		{
			GetArrayString(g_pSteams, Iterator, Buffer, 1024);
			Player = 1;
			while (Player <= MaxClients)
			{
				if (g_inGame[Player])
				{
					GetClientAuthId(Player, AuthIdType:0, Steam, 32, true);
					if (StrContains(Steam, Buffer, false) != -1)
					{
						g_bVIP[Player] = 1;
						GetArrayString(g_pFlags, Iterator, g_Flags[Player], 32);
						PrintToChat(Player, "*\x04 VIPs\x01 were reloaded by the\x03 owner\x01.");
						PrintToChat(Player, "* You are\x04 VIP\x01 and you can type\x03 !vip\x01.");
					}
				}
				Player += 1;
			}
			Iterator += 1;
		}
	}
	return 1;
}

public void:OnClientCookiesCached(Client)
{
	static String:Data[8];
	GetClientCookie(Client, g_pTagsCookie, Data, 8);
	if (strlen(Data) < 1)
	{
		g_TagOption[Client] = 0;
		g_bAsk[Client] = 1;
	}
	else
	{
		g_TagOption[Client] = hCSGO_ClampInt(StringToInt(Data, 10), 0, 4);
		g_bAsk[Client] = 0;
	}
	return void:0;
}

public void:OnRoundStart(Handle:pHndl, String:Name[], bool:bNoBCast)
{
	static Iter;
	Iter = 1;
	while (Iter <= MaxClients)
	{
		g_bEquipped[Iter] = 0;
		Iter += 1;
	}
	g_bOneAndOnly = false;
	return void:0;
}

public void:OnPluginStart()
{
	HookEvent("round_start", OnRoundStart, EventHookMode:1);
	HookEvent("player_spawn", OnSpawn, EventHookMode:1);
	HookEvent("player_death", OnDeath, EventHookMode:1);
	RegConsoleCmd("say", CommandSay, "", 0);
	RegConsoleCmd("say_team", CommandSay, "", 0);
	g_pSteams = CreateArray(32, 0);
	g_pFlags = CreateArray(32, 0);
	g_pTagsCookie = RegClientCookie("VipTags", "Stores the VIP tag setting.", CookieAccess:2);
	CreateTimer(GetRandomFloat(5.0, 10.0) * 60.0, TimerAd, any:0, 1);
	CreateTimer(2.25, TimerReload, any:0, 1);
	return void:0;
}

public Action:OnWpnReload(Weapon)
{
	static Owner;
	Owner = GetEntPropEnt(Weapon, PropType:0, "m_hOwner", 0);
	new var1;
	if (Owner != -1 && g_bVIP[Owner] && StrContains(g_Flags[Owner], "U", false) != -1)
	{
		return Action:4;
	}
	return Action:0;
}

public void:OnEntityCreated(Entity, String:Class[])
{
	new var1;
	if (Entity != -1 && StrContains(Class, "Weapon_", false) != -1 && StrContains(Class, "Knife", false) == -1 && StrContains(Class, "Bayonet", false) == -1 && StrContains(Class, "Taser", false) == -1 && StrContains(Class, "Zeus", false) == -1 && StrContains(Class, "Nade", false) == -1 && StrContains(Class, "Flash", false) == -1 && StrContains(Class, "C4", false) == -1 && StrContains(Class, "Bomb", false) == -1 && StrContains(Class, "World", false) == -1)
	{
		SDKHook(Entity, SDKHookType:36, OnWpnReload);
	}
	return void:0;
}

public Action:TimerAd(Handle:pTimer)
{
	static Plr;
	switch (GetRandomInt(0, 1))
	{
		case 0:
		{
			Plr = 1;
			while (Plr <= MaxClients)
			{
				new var2;
				if (g_inGame[Plr] && !IsPlayerAlive(Plr))
				{
					PrintHintText(Plr, "<b><font color='#FF0000'>eLeague</font></b>eLeague<b><font color='#00FF00'>5€</font></b>.");
				}
				Plr += 1;
			}
		}
		case 1:
		{
			Plr = 1;
			while (Plr <= MaxClients)
			{
				new var1;
				if (g_inGame[Plr] && !IsPlayerAlive(Plr))
				{
					PrintHintText(Plr, "<b><font color='#FF0000'>Tag Settings?</font></b>  Type <b><font color='#00FF00'>!vip</font></b>.");
				}
				Plr += 1;
			}
		}
		default:
		{
		}
	}
	return Action:0;
}

public void:OnMapStart()
{
	static Size;
	static String:Buffer[1024];
	static Handle:pFile;
	static String:Buffers[4][256];
	g_Time = 0;
	ClearArray(g_pSteams);
	ClearArray(g_pFlags);
	BuildPath(PathType:0, Buffer, 1024, "configs/vips.txt");
	if (!FileExists(Buffer, false, "GAME"))
	{
		return void:0;
	}
	pFile = OpenFile(Buffer, "r", false, "GAME");
	if (!pFile)
	{
		return void:0;
	}
	while (!IsEndOfFile(pFile) && ReadFileLine(pFile, Buffer, 1024))
	{
		TrimString(Buffer);
		hCSGO_FixFileLine(Buffer, 1024, 32);
		new var3;
		if (!(strlen(Buffer) < 1 || Buffer[0] == ';' || Buffer[0] == '#' || (Buffer[0] == '/' && Buffer[0] == '/')))
		{
			Size = ExplodeString(Buffer, " ", Buffers, 4, 256, false);
			if (Size >= 2)
			{
				new var4 = Buffers;
				hCSGO_ClearLine(var4[0][var4], 4);
				new var5 = Buffers;
				new var6 = Buffers;
				hCSGO_ExtractSteamID(var6[0][var6], var5[0][var5], 256);
				new var7 = Buffers;
				PushArrayString(g_pSteams, var7[0][var7]);
				hCSGO_ClearLine(Buffers[1], 4);
				PushArrayString(g_pFlags, Buffers[1]);
			}
		}
	}
	CloseHandle(pFile);
	return void:0;
}

public void:OnClientDisconnect(Id)
{
	if (0 < Id)
	{
		g_inGame[Id] = 0;
		g_bVIP[Id] = 0;
		g_bAsk[Id] = 0;
		g_TagOption[Id] = 0;
	}
	return void:0;
}

public void:OnClientPutInServer(Id)
{
	static Iter;
	static Size;
	static String:Object[32];
	static String:Steam[32];
	if (0 < Id)
	{
		g_inGame[Id] = 0;
		g_bVIP[Id] = 0;
		g_inGame[Id] = 1;
		Size = GetArraySize(g_pSteams);
		if (0 < Size)
		{
			GetClientAuthId(Id, AuthIdType:0, Steam, 32, true);
			Iter = 0;
			while (Iter < Size)
			{
				GetArrayString(g_pSteams, Iter, Object, 32);
				if (StrContains(Steam, Object, false) != -1)
				{
					GetArrayString(g_pFlags, Iter, g_Flags[Id], 32);
					CreateTimer(GetRandomFloat(2.75, 4.5), TimerVIPJoined, Id, 2);
					g_bVIP[Id] = 1;
				}
				Iter += 1;
			}
		}
		if (g_bAsk[Id])
		{
			CreateTimer(GetRandomFloat(18.5, 27.5), Ask, Id, 2);
		}
	}
	return void:0;
}

public Action:CommandSay(Client, Args)
{
	static String:Command[32];
	static String:RawCommand[32];
	new var1;
	if (Client > 0 && g_inGame[Client])
	{
		GetCmdArgString(RawCommand, 32);
		hCSGO_PureChatCommand(RawCommand, Command, 32);
		if (0 < strlen(Command))
		{
			new var2;
			if (strcmp(Command, "VIP", false) && strcmp(15152 + 1, "VIP", false) && strcmp(Command, "TAG", false) && strcmp(15152 + 1, "TAG", false))
			{
				g_bAsk[Client] = 1;
				CreateTimer(GetRandomFloat(0.1, 0.3), Ask, Client, 2);
			}
		}
	}
	return Action:0;
}

public Action:Ask(Handle:pTimer, any:Id)
{
	static Handle:pPanel;
	static bool:bAdmin;
	new var1;
	if (Id > any:0 && g_inGame[Id] && g_bAsk[Id])
	{
		pPanel = CreatePanel(Handle:0);
		if (pPanel)
		{
			bAdmin = hCSGO_IsClientAdmin(Id);
			SetPanelKeys(pPanel, 1023);
			SetPanelTitle(pPanel, "The Type of Tag in The Scores Table?", false);
			DrawPanelText(pPanel, " \n");
			new var2;
			if (g_bVIP[Id] && bAdmin)
			{
				DrawPanelText(pPanel, "1. Only VIP★ Tag");
				DrawPanelText(pPanel, "2. VIP★ & Admin Tag");
				DrawPanelText(pPanel, "3. Only Admin Tag");
				DrawPanelText(pPanel, "4. No Tag At All (Do Not Change)");
			}
			else
			{
				new var3;
				if (g_bVIP[Id] && !bAdmin)
				{
					DrawPanelText(pPanel, "1. Only VIP★ Tag");
					DrawPanelText(pPanel, "2. No Tag At All (Do Not Change)");
				}
				new var4;
				if (!g_bVIP[Id] && bAdmin)
				{
					DrawPanelText(pPanel, "1. Only Admin Tag");
					DrawPanelText(pPanel, "2. No Tag At All (Do Not Change)");
				}
				DrawPanelText(pPanel, "1. No Tag At All (Do Not Change)");
			}
			SendPanelToClient(pPanel, Id, AskPanel, 0);
			CloseHandle(pPanel);
		}
	}
	return Action:0;
}

public AskPanel(Handle:pPanel, MenuAction:pAction, Client, Selection)
{
	static String:Option[8];
	static bool:bAdmin;
	new var1;
	if (pAction == MenuAction:4 && g_inGame[Client] && g_bAsk[Client])
	{
		bAdmin = hCSGO_IsClientAdmin(Client);
		new var2;
		if (g_bVIP[Client] && bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = 1;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only VIP★ Tag\x01.");
				}
				case 2:
				{
					g_TagOption[Client] = 3;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 VIP★ & Admin Tag\x01.");
				}
				case 3:
				{
					g_TagOption[Client] = 2;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only Admin Tag\x01.");
				}
				case 4:
				{
					g_TagOption[Client] = 4;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
				default:
				{
				}
			}
		}
		new var3;
		if (g_bVIP[Client] && !bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = 1;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only VIP★ Tag\x01.");
				}
				case 2:
				{
					g_TagOption[Client] = 4;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
				default:
				{
				}
			}
		}
		new var4;
		if (!g_bVIP[Client] && bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = 2;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only Admin Tag\x01.");
				}
				case 2:
				{
					g_TagOption[Client] = 4;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
				default:
				{
				}
			}
		}
		switch (Selection)
		{
			case 1:
			{
				g_TagOption[Client] = 4;
				g_bAsk[Client] = 0;
				IntToString(g_TagOption[Client], Option, 8);
				SetClientCookie(Client, g_pTagsCookie, Option);
				PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
			}
			default:
			{
			}
		}
	}
	return 0;
}

public Action:TimerReload(Handle:pTimer)
{
	static Flags;
	static Client;
	static Weapon;
	static String:Class[32];
	static bool:bAdmin;
	Client = 1;
	while (Client <= MaxClients)
	{
		new var2;
		if (!g_inGame[Client] || (!hCSGO_IsClientAdmin(Client) && !g_bVIP[Client]))
		{
		}
		else
		{
			new var3;
			if (g_TagOption[Client] && g_TagOption[Client] != 4 && !g_bAsk[Client])
			{
				bAdmin = hCSGO_IsClientAdmin(Client);
				new var4;
				if (g_bVIP[Client] && g_TagOption[Client] == 1)
				{
					CS_SetClientClanTag(Client, "VIP★");
				}
				new var5;
				if (bAdmin && g_TagOption[Client] == 2)
				{
					Flags = GetUserFlagBits(Client);
					if (Flags & 16384)
					{
						CS_SetClientClanTag(Client, "Owner");
					}
					if (Flags & 32768)
					{
						CS_SetClientClanTag(Client, "Co-Owner");
					}
					if (Flags & 65536)
					{
						CS_SetClientClanTag(Client, "Moderator");
					}
					if (Flags & 131072)
					{
						CS_SetClientClanTag(Client, "Administrator");
					}
					if (Flags & 262144)
					{
						CS_SetClientClanTag(Client, "Helper");
					}
					if (Flags & 524288)
					{
						CS_SetClientClanTag(Client, "YouTube");
					}
					if (Flags & 1048576)
					{
						CS_SetClientClanTag(Client, "Legend");
					}
				}
				new var6;
				if (bAdmin && g_bVIP[Client] && g_TagOption[Client] == 3)
				{
					Flags = GetUserFlagBits(Client);
					if (Flags & 16384)
					{
						CS_SetClientClanTag(Client, "VIP★ Owner");
					}
					if (Flags & 32768)
					{
						CS_SetClientClanTag(Client, "VIP★ Co-Owner");
					}
					if (Flags & 65536)
					{
						CS_SetClientClanTag(Client, "VIP★ Mod");
					}
					if (Flags & 131072)
					{
						CS_SetClientClanTag(Client, "VIP★ Admin");
					}
					if (Flags & 262144)
					{
						CS_SetClientClanTag(Client, "VIP★ Helper");
					}
					if (Flags & 524288)
					{
						CS_SetClientClanTag(Client, "VIP★ YouTube");
					}
					if (Flags & 1048576)
					{
						CS_SetClientClanTag(Client, "VIP★ Legend");
					}
				}
			}
			new var7;
			if (g_bVIP[Client] && StrContains(g_Flags[Client], "U", false) != -1 && IsPlayerAlive(Client))
			{
				Weapon = GetEntPropEnt(Client, PropType:0, "m_hActiveWeapon", 0);
				new var8;
				if (Weapon != -1 && GetEdictClassname(Weapon, Class, 32))
				{
					new var9;
					if (StrContains(Class, "Knife", false) == -1 && StrContains(Class, "Taser", false) == -1 && StrContains(Class, "Nade", false) == -1 && StrContains(Class, "Flash", false) == -1 && StrContains(Class, "Bayonet", false) == -1 && StrContains(Class, "Smoke", false) == -1 && StrContains(Class, "Incendiary", false) == -1 && StrContains(Class, "Molotov", false) == -1 && StrContains(Class, "Kit", false) == -1 && StrContains(Class, "Defuse", false) == -1 && StrContains(Class, "Projectile", false) == -1 && StrContains(Class, "Bang", false) == -1 && StrContains(Class, "Bomb", false) == -1 && StrContains(Class, "C4", false) == -1 && StrContains(Class, "Zeus", false) == -1 && StrContains(Class, "Decoy", false) == -1)
					{
						SetEntProp(Weapon, PropType:0, "m_iClip1", any:32, 4, 0);
						SetEntProp(Weapon, PropType:0, "m_iClip2", any:32, 4, 0);
					}
				}
			}
		}
		Client += 1;
	}
	return Action:0;
}

public Action:TimerVIPJoined(Handle:pTimer, any:Client)
{
	static String:Name[32];
	new var1;
	if (g_bVIP[Client] && g_inGame[Client])
	{
		GetClientName(Client, Name, 32);
		hCSGO_MakeHtmlSafe(Name, 32);
		PrintHintTextToAll("<b><font color='#FF0000'>VIP</font></b> <font color='#00FF00'>%s</font> <font color='#FFFFFF'>joined!</font>", Name);
	}
	return Action:0;
}

public void:OnDeath(Handle:pEvent, String:myName[], bool:bNoBroadcast)
{
	static Gained;
	static newHealth;
	static Health;
	static Killer;
	static Client;
	static bool:bWarmup;
	Client = GetClientOfUserId(GetEventInt(pEvent, "userid", 0));
	Killer = GetClientOfUserId(GetEventInt(pEvent, "attacker", 0));
	bWarmup = hCSGO_IsWarmup();
	new var1;
	if (Killer != Client && Client > 0 && Killer > 0 && g_bVIP[Killer] && IsPlayerAlive(Killer) && StrContains(g_Flags[Killer], "H", false) != -1 && !bWarmup)
	{
		Health = GetClientHealth(Killer);
		if (0 < Health)
		{
			newHealth = hCSGO_ClampInt(Health + 5, 6, 100);
			Gained = newHealth - Health;
			if (Gained)
			{
				SetEntProp(Killer, PropType:0, "m_iHealth", newHealth, 4, 0);
				PrintHintText(Killer, "<b><font color='#FF0000'>+%d</font></b> <font color='#00FF00'>HP</font> <font color='#FFFFFF'>GAINED!</font>", Gained);
			}
		}
	}
	if (!bWarmup)
	{
		CreateTimer(GetRandomFloat(0.05, 0.105), TimerShowInfo, any:0, 2);
	}
	return void:0;
}

public Action:TimerShowInfo(Handle:pTimer)
{
	static Time;
	static CTPlayer;
	static TPlayer;
	static CT;
	static T;
	static String:enemyName[32];
	static String:Name[32];
	Time = GetTime({0,0});
	T = hCSGO_CountTeam(2, true);
	CT = hCSGO_CountTeam(3, true);
	new var1;
	if (T == 1 && CT > 0)
	{
		TPlayer = hCSGO_GetOnePlayerTeam(2, true);
		if (TPlayer != -1)
		{
			GetClientName(TPlayer, Name, 32);
			if (CT > 1)
			{
				if (g_Time < Time)
				{
					if (!g_bOneAndOnly)
					{
						g_bOneAndOnly = true;
					}
					PrintToChatAll("*\x07 %s\x01 (\x04%d HP\x01) against\x0B %d CT", Name, GetClientHealth(TPlayer), CT);
					g_Time = Time + 1;
				}
			}
			CTPlayer = hCSGO_GetOnePlayerTeam(3, true);
			if (CTPlayer != -1)
			{
				GetClientName(CTPlayer, enemyName, 32);
				PrintToChatAll("*\x07 %s\x01 (\x04%d HP\x01) against\x0B %s\x01 (\x04%d HP\x01)", Name, GetClientHealth(TPlayer), enemyName, GetClientHealth(CTPlayer));
			}
		}
	}
	else
	{
		new var2;
		if (CT == 1 && T > 0)
		{
			CTPlayer = hCSGO_GetOnePlayerTeam(3, true);
			if (CTPlayer != -1)
			{
				GetClientName(CTPlayer, Name, 32);
				if (T > 1)
				{
					if (g_Time < Time)
					{
						if (!g_bOneAndOnly)
						{
							g_bOneAndOnly = true;
						}
						PrintToChatAll("*\x0B %s\x01 (\x04%d HP\x01) against\x07 %d T", Name, GetClientHealth(CTPlayer), T);
						g_Time = Time + 1;
					}
				}
				TPlayer = hCSGO_GetOnePlayerTeam(2, true);
				if (TPlayer != -1)
				{
					GetClientName(TPlayer, enemyName, 32);
					PrintToChatAll("*\x0B %s\x01 (\x04%d HP\x01) against\x07 %s\x01 (\x04%d HP\x01)", Name, GetClientHealth(CTPlayer), enemyName, GetClientHealth(TPlayer));
				}
			}
		}
	}
	return Action:0;
}

public void:OnSpawn(Handle:pEvent, String:myName[], bool:bNoBroadcast)
{
	static Client;
	Client = GetClientOfUserId(GetEventInt(pEvent, "userid", 0));
	new var1;
	if (Client > 0 && g_bVIP[Client] && g_inGame[Client] && IsPlayerAlive(Client))
	{
		CreateTimer(0.275, EquipClient, Client, 2);
	}
	return void:0;
}

public Action:EquipClient(Handle:pTimer, any:Client)
{
	static Team;
	new var1;
	if (!g_bEquipped[Client] && g_bVIP[Client] && g_inGame[Client] && IsPlayerAlive(Client))
	{
		Team = GetClientTeam(Client);
		switch (GetRandomInt(0, 1))
		{
			case 0:
			{
				if (StrContains(g_Flags[Client], "G", false) != -1)
				{
					GivePlayerItem(Client, "weapon_hegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "I", false) != -1)
				{
					new var3;
					if (Team == 2)
					{
						var3[0] = 17124;
					}
					else
					{
						var3[0] = 17140;
					}
					GivePlayerItem(Client, var3, 0);
				}
				if (StrContains(g_Flags[Client], "S", false) != -1)
				{
					GivePlayerItem(Client, "weapon_smokegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "F", false) != -1)
				{
					GivePlayerItem(Client, "weapon_flashbang", 0);
				}
			}
			case 1:
			{
				if (StrContains(g_Flags[Client], "I", false) != -1)
				{
					new var2;
					if (Team == 2)
					{
						var2[0] = 17212;
					}
					else
					{
						var2[0] = 17228;
					}
					GivePlayerItem(Client, var2, 0);
				}
				if (StrContains(g_Flags[Client], "G", false) != -1)
				{
					GivePlayerItem(Client, "weapon_hegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "S", false) != -1)
				{
					GivePlayerItem(Client, "weapon_smokegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "F", false) != -1)
				{
					GivePlayerItem(Client, "weapon_flashbang", 0);
				}
			}
			default:
			{
			}
		}
		new var4;
		if (Team == 3 && StrContains(g_Flags[Client], "D", false) != -1)
		{
			GivePlayerItem(Client, "item_defuser", 0);
		}
		if (StrContains(g_Flags[Client], "A", false) != -1)
		{
			SetEntProp(Client, PropType:0, "m_ArmorValue", any:100, 4, 0);
			SetEntProp(Client, PropType:0, "m_bHasHelmet", any:1, 4, 0);
		}
		g_bEquipped[Client] = 1;
	}
	return Action:0;
}
if you have the source why would you need to decompile?
__________________
8guawong is offline
Sincronic
Junior Member
Join Date: Dec 2018
Old 01-12-2019 , 04:46   Re: Plugin compile help
Reply With Quote #4

@CliptonHeist, i changed some messages. It gives me the same error without changeing anything. I put a picture.

@8guawong, sorry, i express my self wrong. Now, because i decompiled i have something like source.

I searched for this original source but i did not find it.. do u know something about it ?


https://imgur.com/a/oirBqsO
Sincronic is offline
CliptonHeist
Member
Join Date: Feb 2016
Old 01-12-2019 , 06:05   Re: Plugin compile help
Reply With Quote #5

Decompiled plugins aren't meant to be recompiled, decompiling does not give 1:1 replica of original plugin.
CliptonHeist is online now
Sincronic
Junior Member
Join Date: Dec 2018
Old 01-12-2019 , 06:22   Re: Plugin compile help
Reply With Quote #6

Quote:
Originally Posted by CliptonHeist View Post
Decompiled plugins aren't meant to be recompiled, decompiling does not give 1:1 replica of original plugin.
Yes, i know ! I still thought, that someone has the source of this plugin, or to compile it.
Sincronic is offline
GUCCICSGO
Junior Member
Join Date: Jan 2019
Location: IASI
Old 01-12-2019 , 12:33   Re: Plugin compile help
Reply With Quote #7

Quote:
Originally Posted by Sincronic View Post
Guys, i have this source and is a working plugin, i decompiled i changed something but now i can't compile it. I put the code.

Thanks


Code:
public PlVers:__version =
{
	version = 5,
	filevers = "1.7.2",
	date = "05/07/2017",
	time = "22:48:57"
};
new Float:NULL_VECTOR[3];
new String:NULL_STRING[4];
public Extension:__ext_core =
{
	name = "Core",
	file = "core",
	autoload = 0,
	required = 0,
};
new MaxClients;
public Extension:__ext_sdktools =
{
	name = "SDKTools",
	file = "sdktools.ext",
	autoload = 1,
	required = 1,
};
public Extension:__ext_sdkhooks =
{
	name = "SDKHooks",
	file = "sdkhooks.ext",
	autoload = 1,
	required = 1,
};
public Extension:__ext_cstrike =
{
	name = "cstrike",
	file = "games/game.cstrike.ext",
	autoload = 0,
	required = 1,
};
public Extension:__ext_topmenus =
{
	name = "TopMenus",
	file = "topmenus.ext",
	autoload = 1,
	required = 1,
};
public SharedPlugin:__pl_adminmenu =
{
	name = "adminmenu",
	file = "adminmenu.smx",
	required = 1,
};
public Extension:__ext_cprefs =
{
	name = "Client Preferences",
	file = "clientprefs.ext",
	autoload = 1,
	required = 1,
};
public Plugin:myinfo =
{
	name = "vip_ex",
	description = "GUCCI LA VALOARE",
	author = "HATTTRICK + GUCCI",
	version = "1.0",
	url = "OLDCS.LALEAGANE.RO"
};
new Handle:g_pTagsCookie;
new Handle:g_pSteams;
new Handle:g_pFlags;
new g_TagOption[129];
new bool:g_bVIP[129];
new bool:g_bAsk[129];
new bool:g_bEquipped[129];
new String:g_Flags[129][32];
new g_Time;
new bool:g_bOneAndOnly;
new bool:g_inGame[129];
public __ext_core_SetNTVOptional()
{
	MarkNativeAsOptional("GetFeatureStatus");
	MarkNativeAsOptional("RequireFeature");
	MarkNativeAsOptional("AddCommandListener");
	MarkNativeAsOptional("RemoveCommandListener");
	MarkNativeAsOptional("BfWriteBool");
	MarkNativeAsOptional("BfWriteByte");
	MarkNativeAsOptional("BfWriteChar");
	MarkNativeAsOptional("BfWriteShort");
	MarkNativeAsOptional("BfWriteWord");
	MarkNativeAsOptional("BfWriteNum");
	MarkNativeAsOptional("BfWriteFloat");
	MarkNativeAsOptional("BfWriteString");
	MarkNativeAsOptional("BfWriteEntity");
	MarkNativeAsOptional("BfWriteAngle");
	MarkNativeAsOptional("BfWriteCoord");
	MarkNativeAsOptional("BfWriteVecCoord");
	MarkNativeAsOptional("BfWriteVecNormal");
	MarkNativeAsOptional("BfWriteAngles");
	MarkNativeAsOptional("BfReadBool");
	MarkNativeAsOptional("BfReadByte");
	MarkNativeAsOptional("BfReadChar");
	MarkNativeAsOptional("BfReadShort");
	MarkNativeAsOptional("BfReadWord");
	MarkNativeAsOptional("BfReadNum");
	MarkNativeAsOptional("BfReadFloat");
	MarkNativeAsOptional("BfReadString");
	MarkNativeAsOptional("BfReadEntity");
	MarkNativeAsOptional("BfReadAngle");
	MarkNativeAsOptional("BfReadCoord");
	MarkNativeAsOptional("BfReadVecCoord");
	MarkNativeAsOptional("BfReadVecNormal");
	MarkNativeAsOptional("BfReadAngles");
	MarkNativeAsOptional("BfGetNumBytesLeft");
	MarkNativeAsOptional("BfWrite.WriteBool");
	MarkNativeAsOptional("BfWrite.WriteByte");
	MarkNativeAsOptional("BfWrite.WriteChar");
	MarkNativeAsOptional("BfWrite.WriteShort");
	MarkNativeAsOptional("BfWrite.WriteWord");
	MarkNativeAsOptional("BfWrite.WriteNum");
	MarkNativeAsOptional("BfWrite.WriteFloat");
	MarkNativeAsOptional("BfWrite.WriteString");
	MarkNativeAsOptional("BfWrite.WriteEntity");
	MarkNativeAsOptional("BfWrite.WriteAngle");
	MarkNativeAsOptional("BfWrite.WriteCoord");
	MarkNativeAsOptional("BfWrite.WriteVecCoord");
	MarkNativeAsOptional("BfWrite.WriteVecNormal");
	MarkNativeAsOptional("BfWrite.WriteAngles");
	MarkNativeAsOptional("BfRead.ReadBool");
	MarkNativeAsOptional("BfRead.ReadByte");
	MarkNativeAsOptional("BfRead.ReadChar");
	MarkNativeAsOptional("BfRead.ReadShort");
	MarkNativeAsOptional("BfRead.ReadWord");
	MarkNativeAsOptional("BfRead.ReadNum");
	MarkNativeAsOptional("BfRead.ReadFloat");
	MarkNativeAsOptional("BfRead.ReadString");
	MarkNativeAsOptional("BfRead.ReadEntity");
	MarkNativeAsOptional("BfRead.ReadAngle");
	MarkNativeAsOptional("BfRead.ReadCoord");
	MarkNativeAsOptional("BfRead.ReadVecCoord");
	MarkNativeAsOptional("BfRead.ReadVecNormal");
	MarkNativeAsOptional("BfRead.ReadAngles");
	MarkNativeAsOptional("BfRead.GetNumBytesLeft");
	MarkNativeAsOptional("PbReadInt");
	MarkNativeAsOptional("PbReadFloat");
	MarkNativeAsOptional("PbReadBool");
	MarkNativeAsOptional("PbReadString");
	MarkNativeAsOptional("PbReadColor");
	MarkNativeAsOptional("PbReadAngle");
	MarkNativeAsOptional("PbReadVector");
	MarkNativeAsOptional("PbReadVector2D");
	MarkNativeAsOptional("PbGetRepeatedFieldCount");
	MarkNativeAsOptional("PbSetInt");
	MarkNativeAsOptional("PbSetFloat");
	MarkNativeAsOptional("PbSetBool");
	MarkNativeAsOptional("PbSetString");
	MarkNativeAsOptional("PbSetColor");
	MarkNativeAsOptional("PbSetAngle");
	MarkNativeAsOptional("PbSetVector");
	MarkNativeAsOptional("PbSetVector2D");
	MarkNativeAsOptional("PbAddInt");
	MarkNativeAsOptional("PbAddFloat");
	MarkNativeAsOptional("PbAddBool");
	MarkNativeAsOptional("PbAddString");
	MarkNativeAsOptional("PbAddColor");
	MarkNativeAsOptional("PbAddAngle");
	MarkNativeAsOptional("PbAddVector");
	MarkNativeAsOptional("PbAddVector2D");
	MarkNativeAsOptional("PbRemoveRepeatedFieldValue");
	MarkNativeAsOptional("PbReadMessage");
	MarkNativeAsOptional("PbReadRepeatedMessage");
	MarkNativeAsOptional("PbAddMessage");
	MarkNativeAsOptional("Protobuf.ReadInt");
	MarkNativeAsOptional("Protobuf.ReadFloat");
	MarkNativeAsOptional("Protobuf.ReadBool");
	MarkNativeAsOptional("Protobuf.ReadString");
	MarkNativeAsOptional("Protobuf.ReadColor");
	MarkNativeAsOptional("Protobuf.ReadAngle");
	MarkNativeAsOptional("Protobuf.ReadVector");
	MarkNativeAsOptional("Protobuf.ReadVector2D");
	MarkNativeAsOptional("Protobuf.GetRepeatedFieldCount");
	MarkNativeAsOptional("Protobuf.SetInt");
	MarkNativeAsOptional("Protobuf.SetFloat");
	MarkNativeAsOptional("Protobuf.SetBool");
	MarkNativeAsOptional("Protobuf.SetString");
	MarkNativeAsOptional("Protobuf.SetColor");
	MarkNativeAsOptional("Protobuf.SetAngle");
	MarkNativeAsOptional("Protobuf.SetVector");
	MarkNativeAsOptional("Protobuf.SetVector2D");
	MarkNativeAsOptional("Protobuf.AddInt");
	MarkNativeAsOptional("Protobuf.AddFloat");
	MarkNativeAsOptional("Protobuf.AddBool");
	MarkNativeAsOptional("Protobuf.AddString");
	MarkNativeAsOptional("Protobuf.AddColor");
	MarkNativeAsOptional("Protobuf.AddAngle");
	MarkNativeAsOptional("Protobuf.AddVector");
	MarkNativeAsOptional("Protobuf.AddVector2D");
	MarkNativeAsOptional("Protobuf.RemoveRepeatedFieldValue");
	MarkNativeAsOptional("Protobuf.ReadMessage");
	MarkNativeAsOptional("Protobuf.ReadRepeatedMessage");
	MarkNativeAsOptional("Protobuf.AddMessage");
	VerifyCoreVersion();
	return 0;
}

ExplodeString(String:text[], String:split[], String:buffers[][], maxStrings, maxStringLength, bool:copyRemainder)
{
	new reloc_idx;
	new idx;
	new total;
	new var1;
	if (maxStrings < 1 || !split[0])
	{
		return 0;
	}
	while ((idx = SplitString(text[reloc_idx], split, buffers[total], maxStringLength)) != -1)
	{
		reloc_idx = idx + reloc_idx;
		total++;
		if (maxStrings == total)
		{
			if (copyRemainder)
			{
				strcopy(buffers[total + -1], maxStringLength, text[reloc_idx - idx]);
			}
			return total;
		}
	}
	total++;
	strcopy(buffers[total], maxStringLength, text[reloc_idx]);
	return total;
}

PrintToChatAll(String:format[])
{
	decl String:buffer[192];
	new i = 1;
	while (i <= MaxClients)
	{
		if (IsClientInGame(i))
		{
			SetGlobalTransTarget(i);
			VFormat(buffer, 192, format, 2);
			PrintToChat(i, "%s", buffer);
		}
		i++;
	}
	return 0;
}

PrintHintTextToAll(String:format[])
{
	decl String:buffer[192];
	new i = 1;
	while (i <= MaxClients)
	{
		if (IsClientInGame(i))
		{
			SetGlobalTransTarget(i);
			VFormat(buffer, 192, format, 2);
			PrintHintText(i, "%s", buffer);
		}
		i++;
	}
	return 0;
}

hCSGO_MakeHtmlSafe(String:Buffer[], Size)
{
	ReplaceString(Buffer, Size, "<", "(", true);
	ReplaceString(Buffer, Size, ">", ")", true);
	return strlen(Buffer);
}

hCSGO_FixFileLine(String:FileLine[], Size, Times)
{
	static m_Iterator;
	m_Iterator = 0;
	while (m_Iterator < Times)
	{
		ReplaceString(FileLine, Size, "\x09", " ", true);
		m_Iterator += 1;
	}
	m_Iterator = 0;
	while (m_Iterator < Times)
	{
		ReplaceString(FileLine, Size, "  ", " ", true);
		m_Iterator += 1;
	}
	return strlen(FileLine);
}

hCSGO_PureChatCommand(String:Input[], String:Output[], Size)
{
	static m_Length;
	static m_Iterator;
	m_Iterator = 0;
	m_Length = 0;
	Output[0] = MissingTAG:0;
	while (strlen(Input) > m_Iterator)
	{
		new var1;
		if (Input[m_Iterator] == '!' || Input[m_Iterator] == '/' || IsCharAlpha(Input[m_Iterator]) || IsCharNumeric(Input[m_Iterator]))
		{
			m_Length = Format(Output, Size, "%s%c", Output, Input[m_Iterator]);
		}
		m_Iterator += 1;
	}
	return m_Length;
}

hCSGO_ClampInt(Val, Min, Max)
{
	if (Val < Min)
	{
		return Min;
	}
	if (Val > Max)
	{
		return Max;
	}
	return Val;
}

hCSGO_CountTeam(Team, bool:bOnlyAlive)
{
	static m_Count;
	static m_Player;
	m_Player = 1;
	m_Count = 0;
	while (m_Player <= MaxClients)
	{
		new var1;
		if (!IsClientInGame(m_Player) || Team == GetClientTeam(m_Player))
		{
		}
		else
		{
			new var2;
			if (!(bOnlyAlive && !IsPlayerAlive(m_Player)))
			{
				m_Count += 1;
			}
		}
		m_Player += 1;
	}
	return m_Count;
}

hCSGO_GetOnePlayerTeam(Team, bool:bOnlyAlive)
{
	static playersSize;
	static playersTable[65];
	static m_Player;
	m_Player = 1;
	playersSize = 0;
	while (m_Player <= MaxClients)
	{
		new var1;
		if (!IsClientInGame(m_Player) || Team == GetClientTeam(m_Player))
		{
		}
		else
		{
			new var2;
			if (!(bOnlyAlive && !IsPlayerAlive(m_Player)))
			{
				playersSize += 1;
				playersTable[playersSize] = m_Player;
			}
		}
		m_Player += 1;
	}
	playersTable[playersSize] = 0;
	if (playersSize)
	{
		return playersTable[GetRandomInt(0, playersSize + -1)];
	}
	return -1;
}

bool:hCSGO_IsClientAdmin(Id)
{
	static m_Flags;
	m_Flags = GetUserFlagBits(Id);
	new var1;
	if (m_Flags & 1 || m_Flags & 512 || m_Flags & 4 || m_Flags & 16384)
	{
		return true;
	}
	return false;
}

hCSGO_ExtractSteamID(String:Input[], String:Output[], Size)
{
	static String:m_Patterns[4][48] =
	{
		"STEAM_0:0:",
		"STEAM_0:1:",
		"STEAM_1:0:",
		"STEAM_1:1:"
	};
	static m_Length;
	static m_Iterator;
	m_Iterator = 0;
	m_Length = FormatEx(Output, Size, Input);
	while (m_Iterator < 4)
	{
		m_Length = ReplaceString(Output, Size, m_Patterns[m_Iterator], "", false);
		m_Iterator += 1;
	}
	return m_Length;
}

hCSGO_ClearLine(String:Line[], Times)
{
	static m_Length;
	static m_Iterator;
	m_Iterator = 0;
	m_Length = strlen(Line);
	while (m_Iterator < Times)
	{
		StripQuotes(Line);
		m_Length = TrimString(Line);
		m_Iterator += 1;
	}
	return m_Length;
}

bool:hCSGO_IsWarmup()
{
	new var1;
	if (GameRules_GetProp("m_bWarmupPeriod", 4, 0))
	{
		var1 = true;
	}
	else
	{
		var1 = false;
	}
	return var1;
}

public APLRes:AskPluginLoad2(Handle:pMyself, bool:bLate, String:Error[], maxLen)
{
	CreateNative("ReloadVIPs", __ReloadVIPs);
	CreateNative("IsClientVIP", __IsClientVIP);
	RegPluginLibrary("vip_ex");
	return APLRes:0;
}

public __IsClientVIP(Handle:pPlugin, Params)
{
	new var1;
	if (g_bVIP[GetNativeCell(1)])
	{
		var1 = 1;
	}
	else
	{
		var1 = 0;
	}
	return var1;
}

public __ReloadVIPs(Handle:pPlugin, Params)
{
	static Iterator;
	static Size;
	static Player;
	static String:Steam[32];
	static String:Buffer[1024];
	static String:Buffers[4][256];
	static Handle:pFile;
	ClearArray(g_pSteams);
	ClearArray(g_pFlags);
	Player = 1;
	while (Player <= MaxClients)
	{
		if (g_bVIP[Player])
		{
			g_Flags[Player][0] = MissingTAG:0;
			g_bVIP[Player] = 0;
		}
		Player += 1;
	}
	BuildPath(PathType:0, Buffer, 1024, "configs/vips.txt");
	if (!FileExists(Buffer, false, "GAME"))
	{
		return 0;
	}
	pFile = OpenFile(Buffer, "r", false, "GAME");
	if (!pFile)
	{
		return 0;
	}
	while (!IsEndOfFile(pFile) && ReadFileLine(pFile, Buffer, 1024))
	{
		TrimString(Buffer);
		hCSGO_FixFileLine(Buffer, 1024, 32);
		new var3;
		if (!(strlen(Buffer) < 1 || Buffer[0] == ';' || Buffer[0] == '#' || (Buffer[0] == '/' && Buffer[0] == '/')))
		{
			Size = ExplodeString(Buffer, " ", Buffers, 4, 256, false);
			if (Size >= 2)
			{
				new var4 = Buffers;
				hCSGO_ClearLine(var4[0][var4], 4);
				new var5 = Buffers;
				new var6 = Buffers;
				hCSGO_ExtractSteamID(var6[0][var6], var5[0][var5], 256);
				new var7 = Buffers;
				PushArrayString(g_pSteams, var7[0][var7]);
				hCSGO_ClearLine(Buffers[1], 4);
				PushArrayString(g_pFlags, Buffers[1]);
			}
		}
	}
	CloseHandle(pFile);
	Size = GetArraySize(g_pSteams);
	if (0 < Size)
	{
		Iterator = 0;
		while (Iterator < Size)
		{
			GetArrayString(g_pSteams, Iterator, Buffer, 1024);
			Player = 1;
			while (Player <= MaxClients)
			{
				if (g_inGame[Player])
				{
					GetClientAuthId(Player, AuthIdType:0, Steam, 32, true);
					if (StrContains(Steam, Buffer, false) != -1)
					{
						g_bVIP[Player] = 1;
						GetArrayString(g_pFlags, Iterator, g_Flags[Player], 32);
						PrintToChat(Player, "*\x04 VIPs\x01 were reloaded by the\x03 owner\x01.");
						PrintToChat(Player, "* You are\x04 VIP\x01 and you can type\x03 !vip\x01.");
					}
				}
				Player += 1;
			}
			Iterator += 1;
		}
	}
	return 1;
}

public void:OnClientCookiesCached(Client)
{
	static String:Data[8];
	GetClientCookie(Client, g_pTagsCookie, Data, 8);
	if (strlen(Data) < 1)
	{
		g_TagOption[Client] = 0;
		g_bAsk[Client] = 1;
	}
	else
	{
		g_TagOption[Client] = hCSGO_ClampInt(StringToInt(Data, 10), 0, 4);
		g_bAsk[Client] = 0;
	}
	return void:0;
}

public void:OnRoundStart(Handle:pHndl, String:Name[], bool:bNoBCast)
{
	static Iter;
	Iter = 1;
	while (Iter <= MaxClients)
	{
		g_bEquipped[Iter] = 0;
		Iter += 1;
	}
	g_bOneAndOnly = false;
	return void:0;
}

public void:OnPluginStart()
{
	HookEvent("round_start", OnRoundStart, EventHookMode:1);
	HookEvent("player_spawn", OnSpawn, EventHookMode:1);
	HookEvent("player_death", OnDeath, EventHookMode:1);
	RegConsoleCmd("say", CommandSay, "", 0);
	RegConsoleCmd("say_team", CommandSay, "", 0);
	g_pSteams = CreateArray(32, 0);
	g_pFlags = CreateArray(32, 0);
	g_pTagsCookie = RegClientCookie("VipTags", "Stores the VIP tag setting.", CookieAccess:2);
	CreateTimer(GetRandomFloat(5.0, 10.0) * 60.0, TimerAd, any:0, 1);
	CreateTimer(2.25, TimerReload, any:0, 1);
	return void:0;
}

public Action:OnWpnReload(Weapon)
{
	static Owner;
	Owner = GetEntPropEnt(Weapon, PropType:0, "m_hOwner", 0);
	new var1;
	if (Owner != -1 && g_bVIP[Owner] && StrContains(g_Flags[Owner], "U", false) != -1)
	{
		return Action:4;
	}
	return Action:0;
}

public void:OnEntityCreated(Entity, String:Class[])
{
	new var1;
	if (Entity != -1 && StrContains(Class, "Weapon_", false) != -1 && StrContains(Class, "Knife", false) == -1 && StrContains(Class, "Bayonet", false) == -1 && StrContains(Class, "Taser", false) == -1 && StrContains(Class, "Zeus", false) == -1 && StrContains(Class, "Nade", false) == -1 && StrContains(Class, "Flash", false) == -1 && StrContains(Class, "C4", false) == -1 && StrContains(Class, "Bomb", false) == -1 && StrContains(Class, "World", false) == -1)
	{
		SDKHook(Entity, SDKHookType:36, OnWpnReload);
	}
	return void:0;
}

public Action:TimerAd(Handle:pTimer)
{
	static Plr;
	switch (GetRandomInt(0, 1))
	{
		case 0:
		{
			Plr = 1;
			while (Plr <= MaxClients)
			{
				new var2;
				if (g_inGame[Plr] && !IsPlayerAlive(Plr))
				{
					PrintHintText(Plr, "<b><font color='#FF0000'>eLeague</font></b>eLeague<b><font color='#00FF00'>5€</font></b>.");
				}
				Plr += 1;
			}
		}
		case 1:
		{
			Plr = 1;
			while (Plr <= MaxClients)
			{
				new var1;
				if (g_inGame[Plr] && !IsPlayerAlive(Plr))
				{
					PrintHintText(Plr, "<b><font color='#FF0000'>Tag Settings?</font></b>  Type <b><font color='#00FF00'>!vip</font></b>.");
				}
				Plr += 1;
			}
		}
		default:
		{
		}
	}
	return Action:0;
}

public void:OnMapStart()
{
	static Size;
	static String:Buffer[1024];
	static Handle:pFile;
	static String:Buffers[4][256];
	g_Time = 0;
	ClearArray(g_pSteams);
	ClearArray(g_pFlags);
	BuildPath(PathType:0, Buffer, 1024, "configs/vips.txt");
	if (!FileExists(Buffer, false, "GAME"))
	{
		return void:0;
	}
	pFile = OpenFile(Buffer, "r", false, "GAME");
	if (!pFile)
	{
		return void:0;
	}
	while (!IsEndOfFile(pFile) && ReadFileLine(pFile, Buffer, 1024))
	{
		TrimString(Buffer);
		hCSGO_FixFileLine(Buffer, 1024, 32);
		new var3;
		if (!(strlen(Buffer) < 1 || Buffer[0] == ';' || Buffer[0] == '#' || (Buffer[0] == '/' && Buffer[0] == '/')))
		{
			Size = ExplodeString(Buffer, " ", Buffers, 4, 256, false);
			if (Size >= 2)
			{
				new var4 = Buffers;
				hCSGO_ClearLine(var4[0][var4], 4);
				new var5 = Buffers;
				new var6 = Buffers;
				hCSGO_ExtractSteamID(var6[0][var6], var5[0][var5], 256);
				new var7 = Buffers;
				PushArrayString(g_pSteams, var7[0][var7]);
				hCSGO_ClearLine(Buffers[1], 4);
				PushArrayString(g_pFlags, Buffers[1]);
			}
		}
	}
	CloseHandle(pFile);
	return void:0;
}

public void:OnClientDisconnect(Id)
{
	if (0 < Id)
	{
		g_inGame[Id] = 0;
		g_bVIP[Id] = 0;
		g_bAsk[Id] = 0;
		g_TagOption[Id] = 0;
	}
	return void:0;
}

public void:OnClientPutInServer(Id)
{
	static Iter;
	static Size;
	static String:Object[32];
	static String:Steam[32];
	if (0 < Id)
	{
		g_inGame[Id] = 0;
		g_bVIP[Id] = 0;
		g_inGame[Id] = 1;
		Size = GetArraySize(g_pSteams);
		if (0 < Size)
		{
			GetClientAuthId(Id, AuthIdType:0, Steam, 32, true);
			Iter = 0;
			while (Iter < Size)
			{
				GetArrayString(g_pSteams, Iter, Object, 32);
				if (StrContains(Steam, Object, false) != -1)
				{
					GetArrayString(g_pFlags, Iter, g_Flags[Id], 32);
					CreateTimer(GetRandomFloat(2.75, 4.5), TimerVIPJoined, Id, 2);
					g_bVIP[Id] = 1;
				}
				Iter += 1;
			}
		}
		if (g_bAsk[Id])
		{
			CreateTimer(GetRandomFloat(18.5, 27.5), Ask, Id, 2);
		}
	}
	return void:0;
}

public Action:CommandSay(Client, Args)
{
	static String:Command[32];
	static String:RawCommand[32];
	new var1;
	if (Client > 0 && g_inGame[Client])
	{
		GetCmdArgString(RawCommand, 32);
		hCSGO_PureChatCommand(RawCommand, Command, 32);
		if (0 < strlen(Command))
		{
			new var2;
			if (strcmp(Command, "VIP", false) && strcmp(15152 + 1, "VIP", false) && strcmp(Command, "TAG", false) && strcmp(15152 + 1, "TAG", false))
			{
				g_bAsk[Client] = 1;
				CreateTimer(GetRandomFloat(0.1, 0.3), Ask, Client, 2);
			}
		}
	}
	return Action:0;
}

public Action:Ask(Handle:pTimer, any:Id)
{
	static Handle:pPanel;
	static bool:bAdmin;
	new var1;
	if (Id > any:0 && g_inGame[Id] && g_bAsk[Id])
	{
		pPanel = CreatePanel(Handle:0);
		if (pPanel)
		{
			bAdmin = hCSGO_IsClientAdmin(Id);
			SetPanelKeys(pPanel, 1023);
			SetPanelTitle(pPanel, "The Type of Tag in The Scores Table?", false);
			DrawPanelText(pPanel, " \n");
			new var2;
			if (g_bVIP[Id] && bAdmin)
			{
				DrawPanelText(pPanel, "1. Only VIP★ Tag");
				DrawPanelText(pPanel, "2. VIP★ & Admin Tag");
				DrawPanelText(pPanel, "3. Only Admin Tag");
				DrawPanelText(pPanel, "4. No Tag At All (Do Not Change)");
			}
			else
			{
				new var3;
				if (g_bVIP[Id] && !bAdmin)
				{
					DrawPanelText(pPanel, "1. Only VIP★ Tag");
					DrawPanelText(pPanel, "2. No Tag At All (Do Not Change)");
				}
				new var4;
				if (!g_bVIP[Id] && bAdmin)
				{
					DrawPanelText(pPanel, "1. Only Admin Tag");
					DrawPanelText(pPanel, "2. No Tag At All (Do Not Change)");
				}
				DrawPanelText(pPanel, "1. No Tag At All (Do Not Change)");
			}
			SendPanelToClient(pPanel, Id, AskPanel, 0);
			CloseHandle(pPanel);
		}
	}
	return Action:0;
}

public AskPanel(Handle:pPanel, MenuAction:pAction, Client, Selection)
{
	static String:Option[8];
	static bool:bAdmin;
	new var1;
	if (pAction == MenuAction:4 && g_inGame[Client] && g_bAsk[Client])
	{
		bAdmin = hCSGO_IsClientAdmin(Client);
		new var2;
		if (g_bVIP[Client] && bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = 1;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only VIP★ Tag\x01.");
				}
				case 2:
				{
					g_TagOption[Client] = 3;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 VIP★ & Admin Tag\x01.");
				}
				case 3:
				{
					g_TagOption[Client] = 2;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only Admin Tag\x01.");
				}
				case 4:
				{
					g_TagOption[Client] = 4;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
				default:
				{
				}
			}
		}
		new var3;
		if (g_bVIP[Client] && !bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = 1;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only VIP★ Tag\x01.");
				}
				case 2:
				{
					g_TagOption[Client] = 4;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
				default:
				{
				}
			}
		}
		new var4;
		if (!g_bVIP[Client] && bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = 2;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 Only Admin Tag\x01.");
				}
				case 2:
				{
					g_TagOption[Client] = 4;
					g_bAsk[Client] = 0;
					IntToString(g_TagOption[Client], Option, 8);
					SetClientCookie(Client, g_pTagsCookie, Option);
					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
				default:
				{
				}
			}
		}
		switch (Selection)
		{
			case 1:
			{
				g_TagOption[Client] = 4;
				g_bAsk[Client] = 0;
				IntToString(g_TagOption[Client], Option, 8);
				SetClientCookie(Client, g_pTagsCookie, Option);
				PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
			}
			default:
			{
			}
		}
	}
	return 0;
}

public Action:TimerReload(Handle:pTimer)
{
	static Flags;
	static Client;
	static Weapon;
	static String:Class[32];
	static bool:bAdmin;
	Client = 1;
	while (Client <= MaxClients)
	{
		new var2;
		if (!g_inGame[Client] || (!hCSGO_IsClientAdmin(Client) && !g_bVIP[Client]))
		{
		}
		else
		{
			new var3;
			if (g_TagOption[Client] && g_TagOption[Client] != 4 && !g_bAsk[Client])
			{
				bAdmin = hCSGO_IsClientAdmin(Client);
				new var4;
				if (g_bVIP[Client] && g_TagOption[Client] == 1)
				{
					CS_SetClientClanTag(Client, "VIP★");
				}
				new var5;
				if (bAdmin && g_TagOption[Client] == 2)
				{
					Flags = GetUserFlagBits(Client);
					if (Flags & 16384)
					{
						CS_SetClientClanTag(Client, "Owner");
					}
					if (Flags & 32768)
					{
						CS_SetClientClanTag(Client, "Co-Owner");
					}
					if (Flags & 65536)
					{
						CS_SetClientClanTag(Client, "Moderator");
					}
					if (Flags & 131072)
					{
						CS_SetClientClanTag(Client, "Administrator");
					}
					if (Flags & 262144)
					{
						CS_SetClientClanTag(Client, "Helper");
					}
					if (Flags & 524288)
					{
						CS_SetClientClanTag(Client, "YouTube");
					}
					if (Flags & 1048576)
					{
						CS_SetClientClanTag(Client, "Legend");
					}
				}
				new var6;
				if (bAdmin && g_bVIP[Client] && g_TagOption[Client] == 3)
				{
					Flags = GetUserFlagBits(Client);
					if (Flags & 16384)
					{
						CS_SetClientClanTag(Client, "VIP★ Owner");
					}
					if (Flags & 32768)
					{
						CS_SetClientClanTag(Client, "VIP★ Co-Owner");
					}
					if (Flags & 65536)
					{
						CS_SetClientClanTag(Client, "VIP★ Mod");
					}
					if (Flags & 131072)
					{
						CS_SetClientClanTag(Client, "VIP★ Admin");
					}
					if (Flags & 262144)
					{
						CS_SetClientClanTag(Client, "VIP★ Helper");
					}
					if (Flags & 524288)
					{
						CS_SetClientClanTag(Client, "VIP★ YouTube");
					}
					if (Flags & 1048576)
					{
						CS_SetClientClanTag(Client, "VIP★ Legend");
					}
				}
			}
			new var7;
			if (g_bVIP[Client] && StrContains(g_Flags[Client], "U", false) != -1 && IsPlayerAlive(Client))
			{
				Weapon = GetEntPropEnt(Client, PropType:0, "m_hActiveWeapon", 0);
				new var8;
				if (Weapon != -1 && GetEdictClassname(Weapon, Class, 32))
				{
					new var9;
					if (StrContains(Class, "Knife", false) == -1 && StrContains(Class, "Taser", false) == -1 && StrContains(Class, "Nade", false) == -1 && StrContains(Class, "Flash", false) == -1 && StrContains(Class, "Bayonet", false) == -1 && StrContains(Class, "Smoke", false) == -1 && StrContains(Class, "Incendiary", false) == -1 && StrContains(Class, "Molotov", false) == -1 && StrContains(Class, "Kit", false) == -1 && StrContains(Class, "Defuse", false) == -1 && StrContains(Class, "Projectile", false) == -1 && StrContains(Class, "Bang", false) == -1 && StrContains(Class, "Bomb", false) == -1 && StrContains(Class, "C4", false) == -1 && StrContains(Class, "Zeus", false) == -1 && StrContains(Class, "Decoy", false) == -1)
					{
						SetEntProp(Weapon, PropType:0, "m_iClip1", any:32, 4, 0);
						SetEntProp(Weapon, PropType:0, "m_iClip2", any:32, 4, 0);
					}
				}
			}
		}
		Client += 1;
	}
	return Action:0;
}

public Action:TimerVIPJoined(Handle:pTimer, any:Client)
{
	static String:Name[32];
	new var1;
	if (g_bVIP[Client] && g_inGame[Client])
	{
		GetClientName(Client, Name, 32);
		hCSGO_MakeHtmlSafe(Name, 32);
		PrintHintTextToAll("<b><font color='#FF0000'>VIP</font></b> <font color='#00FF00'>%s</font> <font color='#FFFFFF'>joined!</font>", Name);
	}
	return Action:0;
}

public void:OnDeath(Handle:pEvent, String:myName[], bool:bNoBroadcast)
{
	static Gained;
	static newHealth;
	static Health;
	static Killer;
	static Client;
	static bool:bWarmup;
	Client = GetClientOfUserId(GetEventInt(pEvent, "userid", 0));
	Killer = GetClientOfUserId(GetEventInt(pEvent, "attacker", 0));
	bWarmup = hCSGO_IsWarmup();
	new var1;
	if (Killer != Client && Client > 0 && Killer > 0 && g_bVIP[Killer] && IsPlayerAlive(Killer) && StrContains(g_Flags[Killer], "H", false) != -1 && !bWarmup)
	{
		Health = GetClientHealth(Killer);
		if (0 < Health)
		{
			newHealth = hCSGO_ClampInt(Health + 5, 6, 100);
			Gained = newHealth - Health;
			if (Gained)
			{
				SetEntProp(Killer, PropType:0, "m_iHealth", newHealth, 4, 0);
				PrintHintText(Killer, "<b><font color='#FF0000'>+%d</font></b> <font color='#00FF00'>HP</font> <font color='#FFFFFF'>GAINED!</font>", Gained);
			}
		}
	}
	if (!bWarmup)
	{
		CreateTimer(GetRandomFloat(0.05, 0.105), TimerShowInfo, any:0, 2);
	}
	return void:0;
}

public Action:TimerShowInfo(Handle:pTimer)
{
	static Time;
	static CTPlayer;
	static TPlayer;
	static CT;
	static T;
	static String:enemyName[32];
	static String:Name[32];
	Time = GetTime({0,0});
	T = hCSGO_CountTeam(2, true);
	CT = hCSGO_CountTeam(3, true);
	new var1;
	if (T == 1 && CT > 0)
	{
		TPlayer = hCSGO_GetOnePlayerTeam(2, true);
		if (TPlayer != -1)
		{
			GetClientName(TPlayer, Name, 32);
			if (CT > 1)
			{
				if (g_Time < Time)
				{
					if (!g_bOneAndOnly)
					{
						g_bOneAndOnly = true;
					}
					PrintToChatAll("*\x07 %s\x01 (\x04%d HP\x01) against\x0B %d CT", Name, GetClientHealth(TPlayer), CT);
					g_Time = Time + 1;
				}
			}
			CTPlayer = hCSGO_GetOnePlayerTeam(3, true);
			if (CTPlayer != -1)
			{
				GetClientName(CTPlayer, enemyName, 32);
				PrintToChatAll("*\x07 %s\x01 (\x04%d HP\x01) against\x0B %s\x01 (\x04%d HP\x01)", Name, GetClientHealth(TPlayer), enemyName, GetClientHealth(CTPlayer));
			}
		}
	}
	else
	{
		new var2;
		if (CT == 1 && T > 0)
		{
			CTPlayer = hCSGO_GetOnePlayerTeam(3, true);
			if (CTPlayer != -1)
			{
				GetClientName(CTPlayer, Name, 32);
				if (T > 1)
				{
					if (g_Time < Time)
					{
						if (!g_bOneAndOnly)
						{
							g_bOneAndOnly = true;
						}
						PrintToChatAll("*\x0B %s\x01 (\x04%d HP\x01) against\x07 %d T", Name, GetClientHealth(CTPlayer), T);
						g_Time = Time + 1;
					}
				}
				TPlayer = hCSGO_GetOnePlayerTeam(2, true);
				if (TPlayer != -1)
				{
					GetClientName(TPlayer, enemyName, 32);
					PrintToChatAll("*\x0B %s\x01 (\x04%d HP\x01) against\x07 %s\x01 (\x04%d HP\x01)", Name, GetClientHealth(CTPlayer), enemyName, GetClientHealth(TPlayer));
				}
			}
		}
	}
	return Action:0;
}

public void:OnSpawn(Handle:pEvent, String:myName[], bool:bNoBroadcast)
{
	static Client;
	Client = GetClientOfUserId(GetEventInt(pEvent, "userid", 0));
	new var1;
	if (Client > 0 && g_bVIP[Client] && g_inGame[Client] && IsPlayerAlive(Client))
	{
		CreateTimer(0.275, EquipClient, Client, 2);
	}
	return void:0;
}

public Action:EquipClient(Handle:pTimer, any:Client)
{
	static Team;
	new var1;
	if (!g_bEquipped[Client] && g_bVIP[Client] && g_inGame[Client] && IsPlayerAlive(Client))
	{
		Team = GetClientTeam(Client);
		switch (GetRandomInt(0, 1))
		{
			case 0:
			{
				if (StrContains(g_Flags[Client], "G", false) != -1)
				{
					GivePlayerItem(Client, "weapon_hegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "I", false) != -1)
				{
					new var3;
					if (Team == 2)
					{
						var3[0] = 17124;
					}
					else
					{
						var3[0] = 17140;
					}
					GivePlayerItem(Client, var3, 0);
				}
				if (StrContains(g_Flags[Client], "S", false) != -1)
				{
					GivePlayerItem(Client, "weapon_smokegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "F", false) != -1)
				{
					GivePlayerItem(Client, "weapon_flashbang", 0);
				}
			}
			case 1:
			{
				if (StrContains(g_Flags[Client], "I", false) != -1)
				{
					new var2;
					if (Team == 2)
					{
						var2[0] = 17212;
					}
					else
					{
						var2[0] = 17228;
					}
					GivePlayerItem(Client, var2, 0);
				}
				if (StrContains(g_Flags[Client], "G", false) != -1)
				{
					GivePlayerItem(Client, "weapon_hegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "S", false) != -1)
				{
					GivePlayerItem(Client, "weapon_smokegrenade", 0);
				}
				if (StrContains(g_Flags[Client], "F", false) != -1)
				{
					GivePlayerItem(Client, "weapon_flashbang", 0);
				}
			}
			default:
			{
			}
		}
		new var4;
		if (Team == 3 && StrContains(g_Flags[Client], "D", false) != -1)
		{
			GivePlayerItem(Client, "item_defuser", 0);
		}
		if (StrContains(g_Flags[Client], "A", false) != -1)
		{
			SetEntProp(Client, PropType:0, "m_ArmorValue", any:100, 4, 0);
			SetEntProp(Client, PropType:0, "m_bHasHelmet", any:1, 4, 0);
		}
		g_bEquipped[Client] = 1;
	}
	return Action:0;
}
**********************************

That's the source


**********************************
Code:
#include <hattrick_csgo>
#include <clientprefs>

enum
{
	TagInvalid = 0,
	TagOnlyVIP,
	TagOnlyAdmin,
	TagBoth,
	TagNone
};

Handle g_pTagsCookie = INVALID_HANDLE;

Handle g_pSteams = INVALID_HANDLE;
Handle g_pFlags = INVALID_HANDLE;

int g_TagOption[128 + 1] = { TagInvalid, ... };

bool g_bVIP[128 + 1] = { false, ... };
bool g_bAsk[128 + 1] = { false, ... };
bool g_bEquipped[128 + 1] = { false, ... };

char g_Flags[128 + 1][MAX_NAME_LENGTH];

int g_Time = 0;

bool g_bOneAndOnly = false;

bool g_inGame[128 + 1] = { false, ... };

public APLRes AskPluginLoad2(Handle pMyself, bool bLate, char[] Error, int maxLen)
{
	CreateNative("ReloadVIPs", __ReloadVIPs);
	CreateNative("IsClientVIP", __IsClientVIP);

	RegPluginLibrary("vip_ex");

	return APLRes_Success;
}

public int __IsClientVIP(Handle pPlugin, int Params)
{
	return g_bVIP[GetNativeCell(1)] ? 1 : 0;
}

public int __ReloadVIPs(Handle pPlugin, int Params)
{
	static int Player, Size, Iterator;
	static char Buffer[1024], Steam[MAX_NAME_LENGTH];
	static char Buffers[4][PLATFORM_MAX_PATH];
	static Handle pFile;

	ClearArray(g_pSteams);
	ClearArray(g_pFlags);

	for (Player = 1; Player <= MaxClients; Player++)
	{
		if (g_bVIP[Player])
		{
			g_Flags[Player][0] = EOS;

			g_bVIP[Player] = false;
		}
	}

	BuildPath(Path_SM, Buffer, sizeof(Buffer), "configs/vips.txt");

	if (!FileExists(Buffer))
		return 0;

	pFile = OpenFile(Buffer, "r");

	if (pFile == INVALID_HANDLE)
		return 0;

	while (!IsEndOfFile(pFile) && ReadFileLine(pFile, Buffer, sizeof(Buffer)))
	{
		TrimString(Buffer);
		hCSGO_FixFileLine(Buffer, sizeof(Buffer));

		if (strlen(Buffer) < 1 || Buffer[0] == ';' || Buffer[0] == '#' || \
			(Buffer[0] == '/' && Buffer[1] == '/'))
		{
			continue;
		}

		Size = ExplodeString(Buffer, " ", Buffers, sizeof(Buffers), sizeof(Buffers[]));

		if (Size >= 2)
		{
			hCSGO_ClearLine(Buffers[0]);
			hCSGO_ExtractSteamID(Buffers[0], Buffers[0], sizeof(Buffers[]));
			PushArrayString(g_pSteams, Buffers[0]);

			hCSGO_ClearLine(Buffers[1]);
			PushArrayString(g_pFlags, Buffers[1]);
		}
	}

	CloseHandle(pFile);

	Size = GetArraySize(g_pSteams);

	if (Size > 0)
	{
		for (Iterator = 0; Iterator < Size; Iterator++)
		{
			GetArrayString(g_pSteams, Iterator, Buffer, sizeof(Buffer));

			for (Player = 1; Player <= MaxClients; Player++)
			{
				if (g_inGame[Player])
				{
					GetClientAuthId(Player, AuthId_Engine, Steam, sizeof(Steam));

					if (StrContains(Steam, Buffer, false) != -1)
					{
						g_bVIP[Player] = true;

						GetArrayString(g_pFlags, Iterator, g_Flags[Player], sizeof(g_Flags[]));

						PrintToChat(Player, "*\x04 VIPs\x01 were reloaded by the\x03 owner\x01.");
						PrintToChat(Player, "* You are\x04 VIP\x01 and you can type\x03 !vip\x01.");
					}
				}
			}
		}
	}

	return 1;
}

public void OnClientCookiesCached(int Client)
{
	static char Data[8];
	GetClientCookie(Client, g_pTagsCookie, Data, sizeof(Data));

	if (strlen(Data) < 1)
	{
		g_TagOption[Client] = TagInvalid;
		g_bAsk[Client] = true;
	}

	else
	{
		g_TagOption[Client] = hCSGO_ClampInt(StringToInt(Data), TagInvalid, TagNone);
		g_bAsk[Client] = false;
	}
}

public void OnRoundStart(Handle pHndl, const char[] Name, bool bNoBCast)
{
	static int Iter;

	for (Iter = 1; Iter <= MaxClients; Iter++)
		g_bEquipped[Iter] = false;

	g_bOneAndOnly = false;
}

public void OnPluginStart()
{
	HookEvent("round_start", OnRoundStart);
	HookEvent("player_spawn", OnSpawn);
	HookEvent("player_death", OnDeath);

	RegConsoleCmd("say", CommandSay);
	RegConsoleCmd("say_team", CommandSay);

	g_pSteams = CreateArray(MAX_NAME_LENGTH);
	g_pFlags = CreateArray(MAX_NAME_LENGTH);

	g_pTagsCookie = RegClientCookie("VipTags", "Stores the VIP tag setting.", CookieAccess_Private);

	CreateTimer(60.0 * GetRandomFloat(5.0, 10.0), TimerAd, _, TIMER_REPEAT);
	CreateTimer(2.25, TimerReload, _, TIMER_REPEAT);
}

public Action OnWpnReload(int Weapon)
{
	static int Owner;
	Owner = GetEntPropEnt(Weapon, Prop_Send, "m_hOwner");

	if (Owner != INVALID_ENT_REFERENCE && g_bVIP[Owner] && StrContains(g_Flags[Owner], "U", false) != -1)
		return Plugin_Stop;

	return Plugin_Continue;
}

public void OnEntityCreated(int Entity, const char[] Class)
{
	if (Entity != INVALID_ENT_REFERENCE && \
		StrContains(Class, "Weapon_", false) != -1 && \
		StrContains(Class, "Knife", false) == -1 && \
		StrContains(Class, "Bayonet", false) == -1 && \
		StrContains(Class, "Taser", false) == -1 && \
		StrContains(Class, "Zeus", false) == -1 && \
		StrContains(Class, "Nade", false) == -1 && \
		StrContains(Class, "Flash", false) == -1 && \
		StrContains(Class, "C4", false) == -1 && \
		StrContains(Class, "Bomb", false) == -1 && \
		StrContains(Class, "World", false) == -1)
	{
		SDKHook(Entity, SDKHook_Reload, OnWpnReload);
	}
}

public Action TimerAd(Handle pTimer)
{
	static int Plr;

	switch (GetRandomInt(0, 1))
	{
		case 0:
		{
			for (Plr = 1; Plr <= MaxClients; Plr++)
			{
				if (g_inGame[Plr] && !IsPlayerAlive(Plr))
					PrintHintText(Plr, "<b><font color='#FF0000'>VIP?</font></b>  Send us <b><font color='#00FF00'>5</font></b>.");
			}
		}

		case 1:
		{
			for (Plr = 1; Plr <= MaxClients; Plr++)
			{
				if (g_inGame[Plr] && !IsPlayerAlive(Plr))
					PrintHintText(Plr, "<b><font color='#FF0000'>Tag Settings?</font></b>  Type <b><font color='#00FF00'>!vip</font></b>.");
			}
		}
	}
}

public void OnMapStart()
{
	static int Size;
	static char Buffer[1024];
	static Handle pFile;
	static char Buffers[4][PLATFORM_MAX_PATH];

	g_Time = 0;

	ClearArray(g_pSteams);
	ClearArray(g_pFlags);

	BuildPath(Path_SM, Buffer, sizeof(Buffer), "configs/vips.txt");

	if (!FileExists(Buffer))
		return;

	pFile = OpenFile(Buffer, "r");

	if (pFile == INVALID_HANDLE)
		return;

	while (!IsEndOfFile(pFile) && ReadFileLine(pFile, Buffer, sizeof(Buffer)))
	{
		TrimString(Buffer);
		hCSGO_FixFileLine(Buffer, sizeof(Buffer));

		if (strlen(Buffer) < 1 || Buffer[0] == ';' || Buffer[0] == '#' || \
			(Buffer[0] == '/' && Buffer[1] == '/'))
		{
			continue;
		}

		Size = ExplodeString(Buffer, " ", Buffers, sizeof(Buffers), sizeof(Buffers[]));

		if (Size >= 2)
		{
			hCSGO_ClearLine(Buffers[0]);
			hCSGO_ExtractSteamID(Buffers[0], Buffers[0], sizeof(Buffers[]));
			PushArrayString(g_pSteams, Buffers[0]);

			hCSGO_ClearLine(Buffers[1]);
			PushArrayString(g_pFlags, Buffers[1]);
		}
	}

	CloseHandle(pFile);
}

public void OnClientDisconnect(int Id)
{
	if (Id > 0)
	{
		g_inGame[Id] = false;
		g_bVIP[Id] = false;
		g_bAsk[Id] = false;

		g_TagOption[Id] = TagInvalid;
	}
}

public void OnClientPutInServer(int Id)
{
	static int Size, Iter;
	static char Steam[MAX_NAME_LENGTH], Object[MAX_NAME_LENGTH];

	if (Id > 0)
	{
		g_inGame[Id] = false;
		g_bVIP[Id] = false;
		g_inGame[Id] = true;

		Size = GetArraySize(g_pSteams);

		if (Size > 0)
		{
			GetClientAuthId(Id, AuthId_Engine, Steam, sizeof(Steam));

			for (Iter = 0; Iter < Size; Iter++)
			{
				GetArrayString(g_pSteams, Iter, Object, sizeof(Object));

				if (StrContains(Steam, Object, false) != -1)
				{
					GetArrayString(g_pFlags, Iter, g_Flags[Id], sizeof(g_Flags[]));

					CreateTimer(GetRandomFloat(2.75, 4.5), TimerVIPJoined, Id, TIMER_FLAG_NO_MAPCHANGE);

					g_bVIP[Id] = true;

					break;
				}
			}
		}

		if (g_bAsk[Id])
			CreateTimer(GetRandomFloat(18.5, 27.5), Ask, Id, TIMER_FLAG_NO_MAPCHANGE);
	}
}

public Action CommandSay(int Client, int Args)
{
	static char RawCommand[MAX_NAME_LENGTH], Command[MAX_NAME_LENGTH];

	if (Client > 0 && g_inGame[Client])
	{
		GetCmdArgString(RawCommand, sizeof(RawCommand));
		hCSGO_PureChatCommand(RawCommand, Command, sizeof(Command));

		if (strlen(Command) > 0)
		{
			if (strcmp(Command, "VIP", false) == 0 || strcmp(Command[1], "VIP", false) == 0 || \
				strcmp(Command, "TAG", false) == 0 || strcmp(Command[1], "TAG", false) == 0)
			{
				g_bAsk[Client] = true;
				CreateTimer(GetRandomFloat(0.1, 0.3), Ask, Client, TIMER_FLAG_NO_MAPCHANGE);
			}
		}
	}
}

public Action Ask(Handle pTimer, any Id)
{
	static Handle pPanel;
	static bool bAdmin;

	if (Id > 0 && g_inGame[Id] && g_bAsk[Id])
	{
		pPanel = CreatePanel();

		if (pPanel != INVALID_HANDLE)
		{
			bAdmin = hCSGO_IsClientAdmin(Id);

			SetPanelKeys(pPanel, hCSGO_MKeysAll);
			SetPanelTitle(pPanel, "The Type of Tag in The Scores Table?");

			DrawPanelText(pPanel, " \n");

			if (g_bVIP[Id] && bAdmin)
			{
				DrawPanelText(pPanel, "1. Only VIP★ Tag");
				DrawPanelText(pPanel, "2. VIP★ & Admin Tag");
				DrawPanelText(pPanel, "3. Only Admin Tag");
				DrawPanelText(pPanel, "4. No Tag At All (Do Not Change)");
			}
			
			else if (g_bVIP[Id] && !bAdmin)
			{
				DrawPanelText(pPanel, "1. Only VIP★ Tag");
				DrawPanelText(pPanel, "2. No Tag At All (Do Not Change)");
			}
			
			else if (!g_bVIP[Id] && bAdmin)
			{
				DrawPanelText(pPanel, "1. Only Admin Tag");
				DrawPanelText(pPanel, "2. No Tag At All (Do Not Change)");
			}
			
			else
				DrawPanelText(pPanel, "1. No Tag At All (Do Not Change)");

			SendPanelToClient(pPanel, Id, AskPanel, MENU_TIME_FOREVER);

			CloseHandle(pPanel);
		}
	}
}

public int AskPanel(Handle pPanel, MenuAction pAction, int Client, int Selection)
{
	static char Option[8];
	static bool bAdmin;

	if (pAction == MenuAction_Select && g_inGame[Client] && g_bAsk[Client])
	{
		bAdmin = hCSGO_IsClientAdmin(Client);

		if (g_bVIP[Client] && bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = TagOnlyVIP;
					g_bAsk[Client] = false;

					IntToString(g_TagOption[Client], Option, sizeof(Option));
					SetClientCookie(Client, g_pTagsCookie, Option);

					PrintToChat(Client, ">> Option selected!\x04 Only VIP★ Tag\x01.");
				}

				case 2:
				{
					g_TagOption[Client] = TagBoth;
					g_bAsk[Client] = false;

					IntToString(g_TagOption[Client], Option, sizeof(Option));
					SetClientCookie(Client, g_pTagsCookie, Option);

					PrintToChat(Client, ">> Option selected!\x04 VIP★ & Admin Tag\x01.");
				}

				case 3:
				{
					g_TagOption[Client] = TagOnlyAdmin;
					g_bAsk[Client] = false;

					IntToString(g_TagOption[Client], Option, sizeof(Option));
					SetClientCookie(Client, g_pTagsCookie, Option);

					PrintToChat(Client, ">> Option selected!\x04 Only Admin Tag\x01.");
				}

				case 4:
				{
					g_TagOption[Client] = TagNone;
					g_bAsk[Client] = false;

					IntToString(g_TagOption[Client], Option, sizeof(Option));
					SetClientCookie(Client, g_pTagsCookie, Option);

					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
			}
		}
		
		else if (g_bVIP[Client] && !bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = TagOnlyVIP;
					g_bAsk[Client] = false;

					IntToString(g_TagOption[Client], Option, sizeof(Option));
					SetClientCookie(Client, g_pTagsCookie, Option);

					PrintToChat(Client, ">> Option selected!\x04 Only VIP★ Tag\x01.");
				}

				case 2:
				{
					g_TagOption[Client] = TagNone;
					g_bAsk[Client] = false;

					IntToString(g_TagOption[Client], Option, sizeof(Option));
					SetClientCookie(Client, g_pTagsCookie, Option);

					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
			}
		}
		
		else if (!g_bVIP[Client] && bAdmin)
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = TagOnlyAdmin;
					g_bAsk[Client] = false;

					IntToString(g_TagOption[Client], Option, sizeof(Option));
					SetClientCookie(Client, g_pTagsCookie, Option);

					PrintToChat(Client, ">> Option selected!\x04 Only Admin Tag\x01.");
				}

				case 2:
				{
					g_TagOption[Client] = TagNone;
					g_bAsk[Client] = false;

					IntToString(g_TagOption[Client], Option, sizeof(Option));
					SetClientCookie(Client, g_pTagsCookie, Option);

					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
					PrintToChat(Client, ">> You might need to\x04 Re-Try Connection\x01 to get rid of it.");
				}
			}
		}
		
		else
		{
			switch (Selection)
			{
				case 1:
				{
					g_TagOption[Client] = TagNone;
					g_bAsk[Client] = false;

					IntToString(g_TagOption[Client], Option, sizeof(Option));
					SetClientCookie(Client, g_pTagsCookie, Option);

					PrintToChat(Client, ">> Option selected!\x04 No Tag At All (Do Not Change)\x01.");
				}
			}
		}
	}
}

public Action TimerReload(Handle pTimer)
{
	static int Weapon, Client, Flags;
	static char Class[MAX_NAME_LENGTH];
	static bool bAdmin;

	for (Client = 1; Client <= MaxClients; Client++)
	{
		if (!g_inGame[Client] || \
			(!hCSGO_IsClientAdmin(Client) && !g_bVIP[Client]))
		{
			continue;
		}

		if (g_TagOption[Client] != TagInvalid && g_TagOption[Client] != TagNone && !g_bAsk[Client])
		{
			bAdmin = hCSGO_IsClientAdmin(Client);

			if (g_bVIP[Client] && g_TagOption[Client] == TagOnlyVIP)
				CS_SetClientClanTag(Client, "[VIP]");

			if (bAdmin && g_TagOption[Client] == TagOnlyAdmin)
			{
				Flags = GetUserFlagBits(Client);

				if (Flags & ADMFLAG_ROOT)
					CS_SetClientClanTag(Client, "Fondator");

				else if (Flags & ADMFLAG_CUSTOM1)
					CS_SetClientClanTag(Client, "OverLord");

				else if (Flags & ADMFLAG_CUSTOM2)
					CS_SetClientClanTag(Client, "Lord");

				else if (Flags & ADMFLAG_CUSTOM3)
					CS_SetClientClanTag(Client, "Legendary");

				else if (Flags & ADMFLAG_CUSTOM4)
					CS_SetClientClanTag(Client, "Legend");

				else if (Flags & ADMFLAG_CUSTOM5)
					CS_SetClientClanTag(Client, "Diamond");

				else if (Flags & ADMFLAG_CUSTOM6)
					CS_SetClientClanTag(Client, "Helper");
					
				else if (Flags & ADMFLAG_RESERVATION)
					CS_SetClientClanTag(Client, "Slot");					
			}

			if (bAdmin && g_bVIP[Client] && g_TagOption[Client] == TagBoth)
			{
				Flags = GetUserFlagBits(Client);

				if (Flags & ADMFLAG_ROOT)
					CS_SetClientClanTag(Client, "VIP★ Fondator");

				else if (Flags & ADMFLAG_CUSTOM1)
					CS_SetClientClanTag(Client, "VIP★ OverLord");

				else if (Flags & ADMFLAG_CUSTOM2)
					CS_SetClientClanTag(Client, "VIP★ Lord");

				else if (Flags & ADMFLAG_CUSTOM3)
					CS_SetClientClanTag(Client, "VIP★ Legendary");

				else if (Flags & ADMFLAG_CUSTOM4)
					CS_SetClientClanTag(Client, "VIP★ Legend");

				else if (Flags & ADMFLAG_CUSTOM5)
					CS_SetClientClanTag(Client, "VIP★ Diamond");

				else if (Flags & ADMFLAG_CUSTOM6)
					CS_SetClientClanTag(Client, "VIP★ Helper");
					
				else if (Flags & ADMFLAG_RESERVATION)
					CS_SetClientClanTag(Client, "VIP★ Slot");					
			}
		}

		if (g_bVIP[Client] && StrContains(g_Flags[Client], "U", false) != -1 && IsPlayerAlive(Client))
		{
			Weapon = GetEntPropEnt(Client, Prop_Send, "m_hActiveWeapon");

			if (Weapon != INVALID_ENT_REFERENCE && GetEdictClassname(Weapon, Class, sizeof(Class)))
			{
				if (StrContains(Class, "Knife", false) == -1 && \
					StrContains(Class, "Taser", false) == -1 && \
					StrContains(Class, "Nade", false) == -1 && \
					StrContains(Class, "Flash", false) == -1 && \
					StrContains(Class, "Bayonet", false) == -1 && \
					StrContains(Class, "Smoke", false) == -1 && \
					StrContains(Class, "Incendiary", false) == -1 && \
					StrContains(Class, "Molotov", false) == -1 && \
					StrContains(Class, "Kit", false) == -1 && \
					StrContains(Class, "Defuse", false) == -1 && \
					StrContains(Class, "Projectile", false) == -1 && \
					StrContains(Class, "Bang", false) == -1 && \
					StrContains(Class, "Bomb", false) == -1 && \
					StrContains(Class, "C4", false) == -1 && \
					StrContains(Class, "Zeus", false) == -1 && \
					StrContains(Class, "Decoy", false) == -1)
				{
					SetEntProp(Weapon, Prop_Send, "m_iClip1", 32);
					SetEntProp(Weapon, Prop_Send, "m_iClip2", 32);
				}
			}
		}
	}
}

public Action TimerVIPJoined(Handle pTimer, any Client)
{
	static char Name[MAX_NAME_LENGTH];

	if (g_bVIP[Client] && g_inGame[Client])
	{
		GetClientName(Client, Name, sizeof(Name));
		hCSGO_MakeHtmlSafe(Name, sizeof(Name));

		PrintHintTextToAll("<b><font color='#FF0000'>VIP-ul</font></b> <font color='#00FF00'>%s</font> <font color='#FFFFFF'>a intrat pe server!</font>", \
			Name);
	}
}

public void OnDeath(Handle pEvent, const char[] myName, bool bNoBroadcast)
{
	static int Client, Killer, Health, newHealth, Gained;
	static bool bWarmup;

	Client = GetClientOfUserId(GetEventInt(pEvent, "userid"));
	Killer = GetClientOfUserId(GetEventInt(pEvent, "attacker"));

	bWarmup = hCSGO_IsWarmup();

	if (Client != Killer && \
		Client > 0 && Killer > 0 && \
		g_bVIP[Killer] && IsPlayerAlive(Killer) && \
		StrContains(g_Flags[Killer], "H", false) != -1 && !bWarmup)
	{
		Health = GetClientHealth(Killer);

		if (Health > 0)
		{
			newHealth = hCSGO_ClampInt(Health + 5, 6, 100);

			Gained = newHealth - Health;

			if (Gained != 0)
			{
				SetEntProp(Killer, Prop_Send, "m_iHealth", newHealth);

				PrintHintText(Killer, \
					"<b><font color='#FF0000'>+%d</font></b> <font color='#00FF00'>HP</font> <font color='#FFFFFF'>GAINED!</font>", \
					Gained);
			}
		}
	}

	if (!bWarmup)
		CreateTimer(GetRandomFloat(0.05, 0.105), TimerShowInfo, _, TIMER_FLAG_NO_MAPCHANGE);
}

public Action TimerShowInfo(Handle pTimer)
{
	static int T, CT, TPlayer, CTPlayer, Time;
	static char Name[MAX_NAME_LENGTH], enemyName[MAX_NAME_LENGTH];

	Time = GetTime();

	T = hCSGO_CountTeam(CS_TEAM_T, true);
	CT = hCSGO_CountTeam(CS_TEAM_CT, true);

	if (T == 1 && CT > 0)
	{
		TPlayer = hCSGO_GetOnePlayerTeam(CS_TEAM_T, true);

		if (TPlayer != INVALID_ENT_REFERENCE)
		{
			GetClientName(TPlayer, Name, sizeof(Name));

			if (CT > 1)
			{
				if (g_Time < Time)
				{
					if (!g_bOneAndOnly)
					{
						g_bOneAndOnly = true;
					}

					PrintToChatAll("*\x07 %s\x01 (\x04%d HP\x01) against\x0B %d CT", \
						Name, GetClientHealth(TPlayer), CT);

					g_Time = Time + 1;
				}
			}

			else
			{
				CTPlayer = hCSGO_GetOnePlayerTeam(CS_TEAM_CT, true);

				if (CTPlayer != INVALID_ENT_REFERENCE)
				{
					GetClientName(CTPlayer, enemyName, sizeof(enemyName));

					PrintToChatAll("*\x07 %s\x01 (\x04%d HP\x01) against\x0B %s\x01 (\x04%d HP\x01)", \
						Name, GetClientHealth(TPlayer), enemyName, GetClientHealth(CTPlayer));
				}
			}
		}
	}

	else if (CT == 1 && T > 0)
	{
		CTPlayer = hCSGO_GetOnePlayerTeam(CS_TEAM_CT, true);

		if (CTPlayer != INVALID_ENT_REFERENCE)
		{
			GetClientName(CTPlayer, Name, sizeof(Name));

			if (T > 1)
			{
				if (g_Time < Time)
				{
					if (!g_bOneAndOnly)
					{
						g_bOneAndOnly = true;
					}

					PrintToChatAll("*\x0B %s\x01 (\x04%d HP\x01) against\x07 %d T", \
						Name, GetClientHealth(CTPlayer), T);

					g_Time = Time + 1;
				}
			}

			else
			{
				TPlayer = hCSGO_GetOnePlayerTeam(CS_TEAM_T, true);

				if (TPlayer != INVALID_ENT_REFERENCE)
				{
					GetClientName(TPlayer, enemyName, sizeof(enemyName));

					PrintToChatAll("*\x0B %s\x01 (\x04%d HP\x01) against\x07 %s\x01 (\x04%d HP\x01)", \
						Name, GetClientHealth(CTPlayer), enemyName, GetClientHealth(TPlayer));
				}
			}
		}
	}
}

public void OnSpawn(Handle pEvent, const char[] myName, bool bNoBroadcast)
{
	static int Client;
	Client = GetClientOfUserId(GetEventInt(pEvent, "userid"));

	if (Client > 0 && g_bVIP[Client] && \
		g_inGame[Client] && IsPlayerAlive(Client))
	{
		CreateTimer(0.275, EquipClient, Client, TIMER_FLAG_NO_MAPCHANGE);
	}
}

public Action EquipClient(Handle pTimer, any Client)
{
	static int Team;

	if (!g_bEquipped[Client] && g_bVIP[Client] && g_inGame[Client] && IsPlayerAlive(Client))
	{
		Team = GetClientTeam(Client);

		switch (GetRandomInt(0, 1))
		{
			case 0:
			{
				if (StrContains(g_Flags[Client], "G", false) != -1)
					GivePlayerItem(Client, "weapon_hegrenade");

				if (StrContains(g_Flags[Client], "I", false) != -1)
					GivePlayerItem(Client, Team == CS_TEAM_T ? "weapon_molotov" : "weapon_incgrenade");

				if (StrContains(g_Flags[Client], "S", false) != -1)
					GivePlayerItem(Client, "weapon_smokegrenade");

				if (StrContains(g_Flags[Client], "F", false) != -1)
					GivePlayerItem(Client, "weapon_flashbang");
			}

			case 1:
			{
				if (StrContains(g_Flags[Client], "I", false) != -1)
					GivePlayerItem(Client, Team == CS_TEAM_T ? "weapon_molotov" : "weapon_incgrenade");

				if (StrContains(g_Flags[Client], "G", false) != -1)
					GivePlayerItem(Client, "weapon_hegrenade");

				if (StrContains(g_Flags[Client], "S", false) != -1)
					GivePlayerItem(Client, "weapon_smokegrenade");

				if (StrContains(g_Flags[Client], "F", false) != -1)
					GivePlayerItem(Client, "weapon_flashbang");
			}
		}

		if (Team == CS_TEAM_CT && StrContains(g_Flags[Client], "D", false) != -1)
			GivePlayerItem(Client, "item_defuser");

		if (StrContains(g_Flags[Client], "A", false) != -1)
		{
			SetEntProp(Client, Prop_Send, "m_ArmorValue", 100);
			SetEntProp(Client, Prop_Send, "m_bHasHelmet", true);
		}

		g_bEquipped[Client] = true;
	}
}

Last edited by GUCCICSGO; 01-12-2019 at 12:37.
GUCCICSGO is offline
Sincronic
Junior Member
Join Date: Dec 2018
Old 01-12-2019 , 20:58   Re: Plugin compile help
Reply With Quote #8

Thanks a lot !!! Do u have and the hattrick_csgo.inc ? i can't compile without it.
Sincronic is offline
GUCCICSGO
Junior Member
Join Date: Jan 2019
Location: IASI
Old 01-13-2019 , 03:02   Re: Plugin compile help
Reply With Quote #9

Quote:
Originally Posted by Sincronic View Post
Thanks a lot !!! Do u have and the hattrick_csgo.inc ? i can't compile without it.
Yes . https://ufile.io/gsomn
GUCCICSGO is offline
Sincronic
Junior Member
Join Date: Dec 2018
Old 01-13-2019 , 08:34   Re: Plugin compile help
Reply With Quote #10

Thanks. Multumesc de ajutor !
Sincronic is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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