Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <cstrike>
- #include <sdktools>
- #pragma semicolon 1
- #pragma newdecls required
- public Plugin myinfo =
- {
- name = "[CS:GO] VIP",
- author = "xBonio & Avgariat & Vasto_Lorde",
- description = "VIP Generator by cs-plugin.com",
- version = "1.0",
- url = "http://cs-plugin.com"
- };
- public void OnPluginStart()
- {
- HookEvent("bomb_planted", EventBombPlanted);
- HookEvent("bomb_defused", EventBombDefused);
- HookEvent("player_spawn", PlayerSpawn);
- HookEvent("player_death", PlayerDeath);
- }
- public Action PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
- {
- int client = GetClientOfUserId(GetEventInt(event, "userid"));
- if(!IsPlayerVIP(client)) return;
- SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
- SetEntityHealth(client, 110);
- int money = GetEntProp(client, Prop_Send, "m_iAccount");
- SetEntProp(client, Prop_Send, "m_iAccount", money+200);
- if(GetClientTeam(client) == CS_TEAM_CT)
- if(GetEntProp(client, Prop_Send, "m_bHasDefuser") == 0) GivePlayerItem(client, "item_defuser");
- }
- public Action PlayerDeath(Handle event, const char[] name, bool dontBroadcast)
- {
- int attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
- if(!IsValidPlayer(attacker) || !IsPlayerVIP(attacker)) return;
- int health = GetClientHealth(attacker);
- SetEntityHealth(attacker, health+5);
- int money = GetEntProp(attacker, Prop_Send, "m_iAccount");
- SetEntProp(attacker, Prop_Send, "m_iAccount", money+50);
- bool headshot = GetEventBool(event, "headshot", false);
- if(headshot)
- {
- money = GetEntProp(attacker, Prop_Send, "m_iAccount");
- SetEntProp(attacker, Prop_Send, "m_iAccount", money+100);
- }
- if(GetClientHealth(attacker) > 125)
- SetEntityHealth(attacker, 125);
- }
- public Action EventBombPlanted(Event event, const char[] name, bool dontBroadcast)
- {
- int client = GetClientOfUserId(GetEventInt(event, "userid"));
- int money = GetEntProp(client, Prop_Send, "m_iAccount");
- if(IsPlayerVIP(client))
- SetEntProp(client, Prop_Send, "m_iAccount", money+50);
- }
- public Action EventBombDefused(Event event, const char[] name, bool dontBroadcast)
- {
- int client = GetClientOfUserId(GetEventInt(event, "userid"));
- int money = GetEntProp(client, Prop_Send, "m_iAccount");
- if(IsPlayerVIP(client))
- SetEntProp(client, Prop_Send, "m_iAccount", money+50);
- }
- stock bool IsValidPlayer(int client)
- {
- if(client >= 1 && client <= MaxClients && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client))
- return true;
- return false;
- }
- stock bool IsPlayerVIP(int client)
- {
- if(GetUserFlagBits(client) & ADMFLAG_CUSTOM1)
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement