Advertisement
nomy

Untitled

Mar 23rd, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.16 KB | None | 0 0
  1. #include <sourcemod>
  2.  
  3. #pragma semicolon 1
  4.  
  5. public Plugin:myinfo =
  6. {
  7.     name = "Radar Kill",
  8.     author = "]HeLL[ Clan",
  9.     description = "Radar kill spammer",
  10.     version     = "1.0",
  11.     url = "https://hellclan.co.uk/"
  12. }
  13.  
  14. new Handle:Player_Timers[MAXPLAYERS];
  15.  
  16. public OnPluginStart()
  17. {
  18.     HookEventEx("player_spawn", Player_Spawn);
  19. }
  20.  
  21. public Player_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
  22. {
  23.     new client = GetClientOfUserId(GetEventInt(event, "userid"));
  24.  
  25.     if(Player_Timers[client] != INVALID_HANDLE)
  26.     {
  27.         KillTimer(Player_Timers[client]);
  28.         Player_Timers[client] = INVALID_HANDLE;
  29.     }
  30.  
  31.     if(GetClientTeam(client) >= 2)
  32.     {
  33.         Player_Timers[client] = CreateTimer(0.1, KillRadar, client, TIMER_REPEAT);
  34.     }
  35. }
  36.  
  37. public Action:KillRadar(Handle:timer, any:client)
  38. {
  39.     if(!IsClientInGame(client) || GetClientTeam(client) <= 1 || !IsPlayerAlive(client))
  40.     {
  41.         Player_Timers[client] = INVALID_HANDLE;
  42.         return Plugin_Stop;
  43.     }
  44.  
  45.     Client_HideRadar(client);
  46.  
  47.     return Plugin_Continue;
  48. }
  49.  
  50. Client_HideRadar(client)
  51. {
  52.     SetEntPropFloat(client, Prop_Send, "m_flFlashDuration", 3600.0);
  53.     SetEntPropFloat(client, Prop_Send, "m_flFlashMaxAlpha", 0.5);
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement