Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ✕
- See how your visitors are really using your website.
- Try it for Free
- PASTEBIN
- new paste
- API tools faq deals
- Guest User
- -
- Public Pastes
- Untitled
- 4 sec ago
- CollectionCard.js
- 6 sec ago
- Untitled
- 8 sec ago
- Untitled
- 21 sec ago
- Untitled
- 31 sec ago
- Trade Fakemon
- 41 sec ago
- Untitled
- 45 sec ago
- Sunday
- 45 sec ago
- daily pastebin goal
- 19%
- help support pastebin
- SHARE
- TWEET
- Untitled
- a guest Nov 18th, 2018 70 Never
- Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- rawdownloadcloneembedreportprint
- text 4.70 KB
- #pragma semicolon 1
- #define DEBUG
- #define PLUGIN_AUTHOR "boomix"
- #define PLUGIN_VERSION "1.00"
- #include <sourcemod>
- #include <sdktools>
- #include <smlib>
- #include <cstrike>
- //#include <sdkhooks>
- EngineVersion g_Game;
- char g_sEggConfig[PLATFORM_MAX_PATH];
- int g_iPlayerPrevButtons[MAXPLAYERS + 1];
- public Plugin myinfo =
- {
- name = "Easter egg",
- author = PLUGIN_AUTHOR,
- description = "Easter egg",
- version = PLUGIN_VERSION,
- url = "http://happyeaster.com"
- };
- public void OnPluginStart()
- {
- g_Game = GetEngineVersion();
- if(g_Game != Engine_CSGO)
- {
- SetFailState("This plugin is for CSGO/CSS only.");
- }
- BuildPath(Path_SM, g_sEggConfig, sizeof(g_sEggConfig), "configs/eggs/eggs.cfg");
- HookEvent("round_start", Event_RoundStart);
- }
- public void OnMapStart()
- {
- AddFileToDownloadsTable("materials/models/custom_prop/IDEAS/banner/8TanLRyg.vmt");
- AddFileToDownloadsTable("materials/models/custom_prop/IDEAS/banner/8TanLRyg.vtf");
- AddFileToDownloadsTable("models/custom_prop/IDEAS/banner/banner.dx90.vtx");
- AddFileToDownloadsTable("models/custom_prop/IDEAS/banner/banner.mdl");
- }
- public Action Event_RoundStart(Handle event, const char[] name, bool dontBroadcast)
- {
- CreateTimer(0.3, Remove_TakenEggs);
- }
- public Action Remove_TakenEggs(Handle tmr, any client)
- {
- KeyValues kv = CreateKeyValues("Eggs");
- kv.ImportFromFile(g_sEggConfig);
- if (kv.GotoFirstSubKey())
- {
- do
- {
- char found[10];
- kv.GetString("found", found, sizeof(found));
- int ifound = StringToInt(found);
- if(ifound == 1)
- {
- char nameinconfig[120];
- kv.GetSectionName(nameinconfig, sizeof(nameinconfig));
- int ent = 0;
- while ((ent = FindEntityByClassname(ent, "prop_dynamic")) != INVALID_ENT_REFERENCE) {
- if(IsValidEntity(ent) && IsValidEdict(ent)) {
- char entglobaname[50];
- Entity_GetGlobalName(ent, entglobaname, sizeof(entglobaname));
- if (StrEqual(entglobaname, nameinconfig)) {
- if(IsValidEntity(ent)) {
- Entity_Kill(ent);
- }
- }
- }
- }
- }
- } while (kv.GotoNextKey());
- delete kv;
- }
- }
- public Action OnPlayerRunCmd(int client, int &iButtons, int &iImpulse, float fVelocity[3], float fAngles[3], int &iWeapon)
- {
- if(IsClientInGame(client) && IsPlayerAlive(client)
- {
- if(!(g_iPlayerPrevButtons[client] & IN_USE) && iButtons & IN_USE)
- {
- int egg = GetTargetBlock(client);
- if(IsValidEntity(egg))
- {
- float EggOrg[3];
- float PlayerOrg[3];
- GetEntPropVector(egg, Prop_Send, "m_vecOrigin", EggOrg);
- GetClientAbsOrigin(client, PlayerOrg);
- float distance = GetVectorDistance(EggOrg, PlayerOrg);
- if(distance < 80.0)
- {
- char eggname[120];
- Entity_GetGlobalName(egg, eggname, sizeof(eggname));
- char username[128];
- char steamid64[40];
- char founder[168];
- GetClientName(client, username, sizeof(username));
- GetClientAuthId(client, AuthId_SteamID64, steamid64, sizeof(steamid64));
- Format(founder, sizeof(founder), "Username: %s | SteamID64: %s", username, steamid64);
- //EggIsFound(eggname, founder);
- RemoveEggFromMap(egg);
- PrintToChatAll("\x3 \x4 [IDEAS] \x1--------------------------------------");
- PrintToChatAll("\x3 \x4 [IDEAS] \x1Website: https://www.ideas-team.fr/");
- PrintToChatAll("\x3 \x4 [IDEAS] \x1Teamspeak : ts12.verygames.net:50886");
- PrintToChatAll("\x3 \x4 [IDEAS] \x1Our servers : ");
- PrintToChatAll("\x3 \x4 [IDEAS] \x1Hide and Seek : 51.254.26.200:27015 ");
- PrintToChatAll("\x3 \x4 [IDEAS] \x1AIM - AWP : 54.37.240.37:27015");
- PrintToChatAll("\x3 \x4 [IDEAS] \x1ONLY AWP : 54.37.240.37:27015");
- PrintToChatAll("\x3 \x4 [IDEAS] \x1--------------------------------------");
- }
- }
- }
- g_iPlayerPrevButtons[client] = iButtons;
- }
- }
- public void EggIsFound(char eggname[120], char founder[168])
- {
- KeyValues kv = CreateKeyValues("Eggs");
- kv.ImportFromFile(g_sEggConfig);
- if (kv.GotoFirstSubKey())
- {
- char nameinconfig[120];
- do
- {
- kv.GetSectionName(nameinconfig, sizeof(nameinconfig));
- if(StrEqual(nameinconfig, eggname))
- {
- kv.SetString("found", "1");
- kv.SetString("founder", founder);
- kv.Rewind();
- kv.ExportToFile(g_sEggConfig);
- }
- } while (kv.GotoNextKey());
- delete kv;
- }
- }
- public void RemoveEggFromMap(int entity)
- {
- if(IsValidEntity(entity))
- AcceptEntityInput(entity, "Kill");
- }
- public bool IsAdmin(int client)
- {
- if(Client_HasAdminFlags(client, ADMFLAG_GENERIC) || Client_HasAdminFlags(client, ADMFLAG_ROOT) || Client_HasAdminFlags(client, ADMFLAG_BAN))
- return true;
- else return false;
- }
- int GetTargetBlock(int client)
- {
- int entity = GetClientAimTarget(client, false);
- if (IsValidEntity(entity))
- {
- char classname[32];
- GetEdictClassname(entity, classname, 32);
- if (StrContains(classname, "prop_dynamic") != -1)
- return entity;
- }
- return -1;
- }
- RAW Paste Data
- We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
- Get WebStorm, the smartest JavaScript IDE. Free trial, license from $77.
- create new paste / dealsnew! / api / scraping api / syntax languages / archive / faq / tools / night mode / go
- privacy statement / cookies policy / terms of service / security disclosure / dmca / contact
- By using Pastebin.com you agree to our cookies policy to enhance your experience.
- Site design & logo © 2018 Pastebin; user contributions (pastes) licensed under cc by-sa 3.0 -- Dedicated Server Hosting by Steadfast
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement