Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <cstrike>
  3. #include <sdktools>
  4.  
  5. #pragma semicolon 1
  6. #pragma newdecls required
  7.  
  8. public Plugin myinfo =
  9. {
  10. name = "[CS:GO] VIP",
  11. author = "xBonio & Avgariat & Vasto_Lorde",
  12. description = "VIP Generator by cs-plugin.com",
  13. version = "1.0",
  14. url = "http://cs-plugin.com"
  15. };
  16.  
  17. public void OnPluginStart()
  18. {
  19. HookEvent("bomb_planted", EventBombPlanted);
  20. HookEvent("bomb_defused", EventBombDefused);
  21. HookEvent("player_spawn", PlayerSpawn);
  22. HookEvent("player_death", PlayerDeath);
  23. }
  24. public Action PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
  25. {
  26. int client = GetClientOfUserId(GetEventInt(event, "userid"));
  27. if(!IsPlayerVIP(client)) return;
  28. SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
  29. SetEntityHealth(client, 110);
  30. int money = GetEntProp(client, Prop_Send, "m_iAccount");
  31. SetEntProp(client, Prop_Send, "m_iAccount", money+200);
  32. if(GetClientTeam(client) == CS_TEAM_CT)
  33. if(GetEntProp(client, Prop_Send, "m_bHasDefuser") == 0) GivePlayerItem(client, "item_defuser");
  34. }
  35. public Action PlayerDeath(Handle event, const char[] name, bool dontBroadcast)
  36. {
  37. int attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
  38. if(!IsValidPlayer(attacker) || !IsPlayerVIP(attacker)) return;
  39. int health = GetClientHealth(attacker);
  40. SetEntityHealth(attacker, health+5);
  41. int money = GetEntProp(attacker, Prop_Send, "m_iAccount");
  42. SetEntProp(attacker, Prop_Send, "m_iAccount", money+50);
  43. bool headshot = GetEventBool(event, "headshot", false);
  44. if(headshot)
  45. {
  46. money = GetEntProp(attacker, Prop_Send, "m_iAccount");
  47. SetEntProp(attacker, Prop_Send, "m_iAccount", money+100);
  48. }
  49. if(GetClientHealth(attacker) > 125)
  50. SetEntityHealth(attacker, 125);
  51. }
  52.  
  53. public Action EventBombPlanted(Event event, const char[] name, bool dontBroadcast)
  54. {
  55. int client = GetClientOfUserId(GetEventInt(event, "userid"));
  56. int money = GetEntProp(client, Prop_Send, "m_iAccount");
  57. if(IsPlayerVIP(client))
  58. SetEntProp(client, Prop_Send, "m_iAccount", money+50);
  59. }
  60. public Action EventBombDefused(Event event, const char[] name, bool dontBroadcast)
  61. {
  62. int client = GetClientOfUserId(GetEventInt(event, "userid"));
  63. int money = GetEntProp(client, Prop_Send, "m_iAccount");
  64. if(IsPlayerVIP(client))
  65. SetEntProp(client, Prop_Send, "m_iAccount", money+50);
  66. }
  67.  
  68. stock bool IsValidPlayer(int client)
  69. {
  70. if(client >= 1 && client <= MaxClients && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client))
  71. return true;
  72. return false;
  73. }
  74. stock bool IsPlayerVIP(int client)
  75. {
  76. if(GetUserFlagBits(client) & ADMFLAG_CUSTOM1)
  77. return true;
  78. return false;
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement