PHP Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <multicolors>
#define PLUGIN_TAG "nudonudo"
public void OnPluginStart()
{
HookEvent("round_start", Event_RoundStart);
}
public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
{
//Ignore warmup
if (GameRules_GetProp("m_bWarmupPeriod") == 1)
return;
new rounds;
rounds = CS_GetTeamScore(3) + CS_GetTeamScore(2);
//If rounds are < than 2 return
if (rounds < 1)
return;
for (int i = 1; i <= MaxClients; i++)
if (IsValidClient(i))
CheckTag(i);
}
void CheckTag(int client)
{
//If clients team is T or CT
if (GetClientTeam(client) > 1)
{
//Clear Variables
char sTag[256];
//Get Client Clan Tag
CS_GetClientClanTag(client, sTag, sizeof(sTag));
//If Client Clan Tag Contains input from PLUGIN_TAG
if (StrEqual(sTag, PLUGIN_TAG))
{
SetEntProp(client, Prop_Send, "m_iAccount", GetClientCash(client) + 200);
CPrintToChat(client, "You got $100 bonus for using our clantag, thank you!");
}
else
{
CPrintToChat(client, "Use our tag nudonudo for an in-game bonus!");
}
}
}
int GetClientCash(int client)
{
return GetEntProp(client, Prop_Send, "m_iAccount");
}
stock bool IsValidClient(int client)
{
return (1 <= client <= MaxClients && IsClientInGame(client));
}
That'll sort spectators being included. As for your translations I see no reference to a translation file anywhere in the code so I don't understand what you mean with translations.
__________________