Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. public Plugin:myinfo =
  2. {
  3. name = "msscore",
  4. author = "AzON",
  5. description = "A",
  6. version = "0.1",
  7. url = "a"
  8. }
  9.  
  10. new Handle:hTS[MAXPLAYERS+1];
  11. public OnPluginStart()
  12. {
  13. HookEvent("player_death", PD);
  14. new i=MAXPLAYERS;
  15. do hTS[i] = CreateTrie();
  16. while(--i);
  17. }
  18.  
  19. public OnClientPostAdminCheck(C)
  20. {
  21. decl String:k[5]="d", String:n[5]="d";
  22. IntToString(C, n[1],sizeof(n));
  23. new i=1;
  24. do if(i!=C)
  25. {
  26. IntToString(i, k[1],sizeof(k));
  27. SetTrieValue(hTS[C], k[1], 0);
  28. SetTrieValue(hTS[C], k, 0);
  29. SetTrieValue(hTS[i], n[1], 0);
  30. SetTrieValue(hTS[i], n, 0);
  31. }while(i++<MaxClients);
  32. }
  33. public OnClientDisconnect_Post(C) ClearTrie(hTS[C]);
  34.  
  35. public PD(Handle:E, String:N[], bool:B)
  36. {
  37. decl a;
  38. if((a=GetClientOfUserId(GetEventInt(E,"attacker"))))
  39. {
  40. decl v;
  41. if((v=GetClientOfUserId(GetEventInt(E,"userid"))) !=a)
  42. {
  43. N[0] = 'd';
  44. IntToString(a, N[1],4);
  45. SetTrieValue(hTS[v], N, 0);
  46. decl d, f, w;
  47. GetTrieValue(hTS[v], N[1], f);
  48. IntToString(v, N[1],4);
  49. GetTrieValue(hTS[a], N, d);
  50. SetTrieValue(hTS[a], N, ++d);
  51. GetTrieValue(hTS[a], N[1], w);
  52. SetTrieValue(hTS[a], N[1], ++w);
  53.  
  54. new Handle:hHudText = CreateHudSynchronizer();
  55. SetHudTextParams(0.0, 0.92, 5.0, 255, 0, 0, 255);
  56. ShowSyncHudText(a, hHudText, "%N %i:%i %N (+%i Killstreak)", a,w,f,v,d);
  57. ShowSyncHudText(v, hHudText, "%N %i:%i %N (-%i Killstreak)", v,f,w,a,d);
  58. CloseHandle(hHudText);
  59. }
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement