Trying to create a plugin that gives only kevlar to Ct's NOT helmet and armor. I realize you can use mp_free_armor 1 however I want it only for one team so this wouldn't work. Plugin seems to compile fine but its not working. Any help is much appreciated.
Code:
#include <sourcemod>
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
public Plugin:myinfo =
{
name = "armor for ct",
description = "basic plugin, give 100 armor to all cts uses code from last ct. Repurposed of course",
author = "trucka",
version = "1.0",
url = ""
};
public OnPluginStart()
{
HookEvent("round_start", roundStart);
}
public roundStart(Handle:event, String:name[], bool:dontBroadcast)
{
new userid = GetEventInt(event, "userid");
new client = GetClientOfUserId(userid);
if (IsClientInGame(client) && GetClientTeam(client) == 3 && IsPlayerAlive(client)) {
GivePlayerItem(client, "item_kevlar");
}
}