Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.52 KB | None | 0 0
  1.  
  2. See how your visitors are really using your website.
  3. Try it for Free
  4. PASTEBIN
  5. new paste
  6. API tools faq deals
  7.  
  8.  
  9.  
  10. Guest User
  11. -
  12.  
  13. Public Pastes
  14. Untitled
  15. 4 sec ago
  16. CollectionCard.js
  17. 6 sec ago
  18. Untitled
  19. 8 sec ago
  20. Untitled
  21. 21 sec ago
  22. Untitled
  23. 31 sec ago
  24. Trade Fakemon
  25. 41 sec ago
  26. Untitled
  27. 45 sec ago
  28. Sunday
  29. 45 sec ago
  30. daily pastebin goal
  31.  
  32. 19%
  33. help support pastebin
  34.  
  35.  
  36.  
  37. SHARE
  38. TWEET
  39.  
  40. Untitled
  41. a guest Nov 18th, 2018 70 Never
  42.  
  43.  
  44.  
  45. Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  46. rawdownloadcloneembedreportprint
  47. text 4.70 KB
  48. #pragma semicolon 1
  49.  
  50. #define DEBUG
  51.  
  52. #define PLUGIN_AUTHOR "boomix"
  53. #define PLUGIN_VERSION "1.00"
  54.  
  55. #include <sourcemod>
  56. #include <sdktools>
  57. #include <smlib>
  58. #include <cstrike>
  59. //#include <sdkhooks>
  60.  
  61. EngineVersion g_Game;
  62. char g_sEggConfig[PLATFORM_MAX_PATH];
  63. int g_iPlayerPrevButtons[MAXPLAYERS + 1];
  64.  
  65. public Plugin myinfo =
  66. {
  67. name = "Easter egg",
  68. author = PLUGIN_AUTHOR,
  69. description = "Easter egg",
  70. version = PLUGIN_VERSION,
  71. url = "http://happyeaster.com"
  72. };
  73.  
  74. public void OnPluginStart()
  75. {
  76. g_Game = GetEngineVersion();
  77. if(g_Game != Engine_CSGO)
  78. {
  79. SetFailState("This plugin is for CSGO/CSS only.");
  80. }
  81.  
  82. BuildPath(Path_SM, g_sEggConfig, sizeof(g_sEggConfig), "configs/eggs/eggs.cfg");
  83. HookEvent("round_start", Event_RoundStart);
  84.  
  85. }
  86.  
  87. public void OnMapStart()
  88. {
  89.  
  90. AddFileToDownloadsTable("materials/models/custom_prop/IDEAS/banner/8TanLRyg.vmt");
  91. AddFileToDownloadsTable("materials/models/custom_prop/IDEAS/banner/8TanLRyg.vtf");
  92.  
  93. AddFileToDownloadsTable("models/custom_prop/IDEAS/banner/banner.dx90.vtx");
  94. AddFileToDownloadsTable("models/custom_prop/IDEAS/banner/banner.mdl");
  95.  
  96.  
  97. }
  98.  
  99. public Action Event_RoundStart(Handle event, const char[] name, bool dontBroadcast)
  100. {
  101. CreateTimer(0.3, Remove_TakenEggs);
  102. }
  103.  
  104. public Action Remove_TakenEggs(Handle tmr, any client)
  105. {
  106.  
  107. KeyValues kv = CreateKeyValues("Eggs");
  108. kv.ImportFromFile(g_sEggConfig);
  109.  
  110. if (kv.GotoFirstSubKey())
  111. {
  112. do
  113. {
  114. char found[10];
  115. kv.GetString("found", found, sizeof(found));
  116. int ifound = StringToInt(found);
  117.  
  118. if(ifound == 1)
  119. {
  120. char nameinconfig[120];
  121. kv.GetSectionName(nameinconfig, sizeof(nameinconfig));
  122.  
  123. int ent = 0;
  124. while ((ent = FindEntityByClassname(ent, "prop_dynamic")) != INVALID_ENT_REFERENCE) {
  125. if(IsValidEntity(ent) && IsValidEdict(ent)) {
  126. char entglobaname[50];
  127. Entity_GetGlobalName(ent, entglobaname, sizeof(entglobaname));
  128.  
  129. if (StrEqual(entglobaname, nameinconfig)) {
  130. if(IsValidEntity(ent)) {
  131. Entity_Kill(ent);
  132. }
  133. }
  134.  
  135. }
  136. }
  137.  
  138. }
  139.  
  140. } while (kv.GotoNextKey());
  141.  
  142. delete kv;
  143. }
  144.  
  145. }
  146.  
  147. public Action OnPlayerRunCmd(int client, int &iButtons, int &iImpulse, float fVelocity[3], float fAngles[3], int &iWeapon)
  148. {
  149.  
  150. if(IsClientInGame(client) && IsPlayerAlive(client)
  151. {
  152. if(!(g_iPlayerPrevButtons[client] & IN_USE) && iButtons & IN_USE)
  153. {
  154. int egg = GetTargetBlock(client);
  155.  
  156. if(IsValidEntity(egg))
  157. {
  158. float EggOrg[3];
  159. float PlayerOrg[3];
  160.  
  161. GetEntPropVector(egg, Prop_Send, "m_vecOrigin", EggOrg);
  162. GetClientAbsOrigin(client, PlayerOrg);
  163.  
  164. float distance = GetVectorDistance(EggOrg, PlayerOrg);
  165.  
  166. if(distance < 80.0)
  167. {
  168. char eggname[120];
  169. Entity_GetGlobalName(egg, eggname, sizeof(eggname));
  170.  
  171. char username[128];
  172. char steamid64[40];
  173. char founder[168];
  174. GetClientName(client, username, sizeof(username));
  175. GetClientAuthId(client, AuthId_SteamID64, steamid64, sizeof(steamid64));
  176.  
  177. Format(founder, sizeof(founder), "Username: %s | SteamID64: %s", username, steamid64);
  178. //EggIsFound(eggname, founder);
  179. RemoveEggFromMap(egg);
  180. PrintToChatAll("\x3 \x4 [IDEAS] \x1--------------------------------------");
  181. PrintToChatAll("\x3 \x4 [IDEAS] \x1Website: https://www.ideas-team.fr/");
  182. PrintToChatAll("\x3 \x4 [IDEAS] \x1Teamspeak : ts12.verygames.net:50886");
  183. PrintToChatAll("\x3 \x4 [IDEAS] \x1Our servers : ");
  184. PrintToChatAll("\x3 \x4 [IDEAS] \x1Hide and Seek : 51.254.26.200:27015 ");
  185. PrintToChatAll("\x3 \x4 [IDEAS] \x1AIM - AWP : 54.37.240.37:27015");
  186. PrintToChatAll("\x3 \x4 [IDEAS] \x1ONLY AWP : 54.37.240.37:27015");
  187. PrintToChatAll("\x3 \x4 [IDEAS] \x1--------------------------------------");
  188. }
  189.  
  190. }
  191. }
  192. g_iPlayerPrevButtons[client] = iButtons;
  193. }
  194.  
  195.  
  196.  
  197. }
  198.  
  199. public void EggIsFound(char eggname[120], char founder[168])
  200. {
  201.  
  202. KeyValues kv = CreateKeyValues("Eggs");
  203. kv.ImportFromFile(g_sEggConfig);
  204.  
  205. if (kv.GotoFirstSubKey())
  206. {
  207. char nameinconfig[120];
  208. do
  209. {
  210. kv.GetSectionName(nameinconfig, sizeof(nameinconfig));
  211.  
  212. if(StrEqual(nameinconfig, eggname))
  213. {
  214. kv.SetString("found", "1");
  215. kv.SetString("founder", founder);
  216. kv.Rewind();
  217. kv.ExportToFile(g_sEggConfig);
  218. }
  219.  
  220. } while (kv.GotoNextKey());
  221.  
  222. delete kv;
  223.  
  224. }
  225.  
  226. }
  227.  
  228. public void RemoveEggFromMap(int entity)
  229. {
  230.  
  231. if(IsValidEntity(entity))
  232. AcceptEntityInput(entity, "Kill");
  233.  
  234. }
  235.  
  236.  
  237. public bool IsAdmin(int client)
  238. {
  239. if(Client_HasAdminFlags(client, ADMFLAG_GENERIC) || Client_HasAdminFlags(client, ADMFLAG_ROOT) || Client_HasAdminFlags(client, ADMFLAG_BAN))
  240. return true;
  241. else return false;
  242. }
  243.  
  244.  
  245. int GetTargetBlock(int client)
  246. {
  247. int entity = GetClientAimTarget(client, false);
  248. if (IsValidEntity(entity))
  249. {
  250. char classname[32];
  251. GetEdictClassname(entity, classname, 32);
  252.  
  253. if (StrContains(classname, "prop_dynamic") != -1)
  254. return entity;
  255. }
  256. return -1;
  257. }
  258. RAW Paste Data
  259.  
  260.  
  261.  
  262.  
  263. 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
  264.  
  265. Get WebStorm, the smartest JavaScript IDE. Free trial, license from $77.
  266.  
  267.  
  268. create new paste / dealsnew! / api / scraping api / syntax languages / archive / faq / tools / night mode / go
  269. privacy statement / cookies policy / terms of service / security disclosure / dmca / contact
  270.  
  271. By using Pastebin.com you agree to our cookies policy to enhance your experience.
  272. 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