Эта тема, давно закрыта, спасибо dr_lex
#include <sourcemod>
#pragma newdecls required
public Plugin myinfo =
{name = "Round start bonus",author = "dr lex",description = "",version = "0.1",url = ""
}
public void OnPluginStart()
{
HookEvent("round_start", Event_RoundStart);
}
public void OnClientPostAdminCheck(int client)
{
if (client > 0)
{
CreateTimer(5.0, TimerRetryRestore, client, TIMER_FLAG_NO_MAPCHANGE);
}
}
public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
{
int i = 1;
while (i <= MaxClients)
{
if (IsValidEntity(i))
{
if (IsClientInGame(i))
{
if (GetClientTeam(i) == 2)
{
CreateTimer(1.0, TimerRetryRestore, i);
}
}
}i += 1;
}
}
public Action TimerRetryRestore(Handle timer, any client)
{
AdminId AId = GetUserAdmin(client);
int flags = GetAdminFlags(AId, Access_Effective);
if (flags & ADMFLAG_KICK)
{
Ec17CHEAT(client, "give", "first_aid_kit");
Ec17CHEAT(client, "give", "pain_pills");
Ec17CHEAT(client, "give", "molotov");
Ec17CHEAT(client, "give", "katana");
Ec17CHEAT(client, "give", "rifle_ak47");
}
}
public void Ec17CHEAT(int client, char[] sCmd, char[] sArg)
{
int iFlags = GetCommandFlags(sCmd);
SetCommandFlags(sCmd, iFlags & ~FCVAR_CHEAT);
FakeClientCommand(client, "%s %s", sCmd, sArg);
SetCommandFlags(sCmd, iFlags);
}