#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <sdkhooks>
public Plugin myinfo =
{
name = "GOLDEN MEMBER",
author = "BlaKi",
description = "Golden Member",
version = "S5",
url = "http://CSGdansk.pl"
};
public void OnPluginStart()
{
HookEvent("player_spawn", PlayerSpawn);
}
public Action PlayerSpawn(Handle event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(GetEventInt(event, "userid"));
char sName[MAX_NAME_LENGTH];
GetClientName(client, sName, sizeof(sName))
if(StrContains(sName, "Server Name") != -1)
{
SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
SetEntProp(client, Prop_Send, "m_bHasHelmet", 1);
GivePlayerItem(client, "weapon_smokegrenade");
GivePlayerItem(client, "weapon_hegrenade");
if(GetClientTeam(client)==CS_TEAM_T) GivePlayerItem(client, "weapon_molotov");
if(GetClientTeam(client)==CS_TEAM_CT) GivePlayerItem(client, "weapon_incgrenade");
GivePlayerItem(client, "weapon_decoy");
GivePlayerItem(client, "weapon_flashbang");
if(GetClientTeam(client)==CS_TEAM_CT)
{
SetEntProp(client, Prop_Send, "m_bHasDefuser", 1, 1)
}
}
}
public Action OnChatMessage(&author, Handle recipients, char[] name, char[] message)
{
Format(name, 64, " %s", name);
int MaxMessageLength = 256 - strlen(name) + -5;
char sName[MAX_NAME_LENGTH];
GetClientName(author, sName, sizeof(sName))
if(StrContains(sName, "Server Name") != -1)
{
Format(name, MaxMessageLength, " \x10[GOLDEN MEMBER]\x03%s", name);
return Plugin_Changed;
}
return Plugin_Continue;
}