Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <cstrike>
  3. #include <sdkhooks>
  4. #include <sdktools>
  5. public Plugin:myinfo =
  6. {
  7. name = "nazwa",
  8. author = "xx`",
  9. description = "xxxx ",
  10. version = "1.0",
  11. url = "xx"
  12. };
  13. new sprite_beam,
  14. sprite_halo;
  15. public OnPluginStart()
  16. {
  17. HookEvent("player_spawn", OdrodzenieGracza);
  18. }
  19. public OnMapStart()
  20. {
  21. sprite_beam = PrecacheModel("sprites/laserbeam.vmt");
  22. sprite_halo = PrecacheModel("sprites/glow01.vmt");
  23. }
  24. public Action:OdrodzenieGracza(Handle:event, String:name[], bool:dontBroadcast)
  25. {
  26. new client = GetClientOfUserId(GetEventInt(event, "userid"));
  27.  
  28. if(!IsPlayerAlive(client))
  29. return Plugin_Continue;
  30.  
  31. if (GetClientTeam(client) == 2)
  32. {
  33. SetEntityRenderMode(client, RENDER_TRANSCOLOR);
  34. SetEntityRenderColor(client, 255, 0, 0, 255);
  35. CreateTimer(0.1, BeaconTT, client);
  36. }
  37. else if (GetClientTeam(client) == 3)
  38. {
  39. SetEntityRenderMode(client, RENDER_TRANSCOLOR);
  40. SetEntityRenderColor(client, 0, 255, 0, 255);
  41. CreateTimer(0.1, BeaconCT, client);
  42. }
  43.  
  44. return Plugin_Continue;
  45. }
  46. public Action:BeaconCT(Handle: timer, any client)
  47. {
  48. if(IsPlayerAlive(client))
  49. {
  50. new Float:odleglosc_gracza = 70.0;
  51. new Float:forigin[3];
  52. GetClientEyePosition(client, forigin);
  53. TE_SetupBeamRingPoint(forigin, 20.0, odleglosc_gracza, sprite_beam, sprite_halo, 0, 10, 0.6, 2.5, 0.0, {0, 255, 0, 170}, 10, 0);
  54. TE_SendToAll();
  55. CreateTimer(3.0, BeaconCT, client);
  56. }
  57. return Plugin_Continue;
  58. }
  59. public Action:BeaconTT(Handle: timer1, any client)
  60. {
  61. if(IsPlayerAlive(client))
  62. {
  63. new Float:odleglosc_gracza = 70.0;
  64. new Float:forigin[3];
  65. GetClientEyePosition(client, forigin);
  66. TE_SetupBeamRingPoint(forigin, 20.0, odleglosc_gracza, sprite_beam, sprite_halo, 0, 10, 0.6, 2.5, 0.0, {255, 0, 0, 170}, 10, 0);
  67. TE_SendToAll();
  68. CreateTimer(3.0, BeaconTT, client);
  69. }
  70. return Plugin_Continue;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement