Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <colors>
public Plugin:myinfo =
{
name = "VIP",
author = "SzYma",
description = "",
version = "1.0.2",
url = "http://3Mod.pl/"
};
public OnPluginStart()
{
HookEvent("player_spawn", Event_OnPlayerSpawn);
HookEvent("player_team", Event_TagTable);
HookEvent("player_spawn", Event_TagTable);
}
public Event_OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new team = GetClientTeam(client);
new money = GetEntProp(client, Prop_Send, "m_iAccount");
if (client > 0 && IsPlayerAlive(client))
{
if (IsPlayerGenericAdmin(client))
{
PrintToChat(client, "Mosul ti-a dat privilegiile de V.I.P !");
SetEntityHealth(client, 110); //hp
SetEntProp(client, Prop_Send, "m_ArmorValue", 100, 4); //armor
SetEntProp(client, Prop_Send, "m_bHasHelmet", 1); //helm
SetEntProp(client, Prop_Send, "m_iAccount", money + 200); //200$ plus
GivePlayerItem(client, "weapon_smokegrenade"); //smoke
GivePlayerItem(client, "weapon_flashbang"); //flash
GivePlayerItem(client, "weapon_hegrenade"); //grenade
GivePlayerItem(client, "weapon_flashbang"); //flash
if(team == CS_TEAM_CT)
{
GivePlayerItem(client, "item_defuser"); //kombinerki
}
}
}
}
public Action:Event_TagTable(Handle:event, String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (IsPlayerGenericAdmin(client))
{
CS_SetClientClanTag(client, "[V.I.P]");
}
}
/*
@param client id
return bool
*/
bool:IsPlayerGenericAdmin(client)
{
return CheckCommandAccess(client, "generic_admin", ADMFLAG_CUSTOM4, false);
}
i have this vip plugin
i want to add:
2x jump (default jump +1 more jump)
and vip have !menu
!menu contains:
1. ak47
2. m4a1-s
3. m4a4
!menu can be used one/per round
__________________