Raised This Month: $ Target: $400
 0% 

[edit] vip plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
redxxx
Member
Join Date: Mar 2015
Old 10-25-2015 , 04:06   [edit] vip plugin
Reply With Quote #1

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
__________________

CSGO.MEVID.RO
redxxx is offline
Send a message via Yahoo to redxxx
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode