Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Plugin:myinfo =
- {
- name = "msscore",
- author = "AzON",
- description = "A",
- version = "0.1",
- url = "a"
- }
- new Handle:hTS[MAXPLAYERS+1];
- public OnPluginStart()
- {
- HookEvent("player_death", PD);
- new i=MAXPLAYERS;
- do hTS[i] = CreateTrie();
- while(--i);
- }
- public OnClientPostAdminCheck(C)
- {
- decl String:k[5]="d", String:n[5]="d";
- IntToString(C, n[1],sizeof(n));
- new i=1;
- do if(i!=C)
- {
- IntToString(i, k[1],sizeof(k));
- SetTrieValue(hTS[C], k[1], 0);
- SetTrieValue(hTS[C], k, 0);
- SetTrieValue(hTS[i], n[1], 0);
- SetTrieValue(hTS[i], n, 0);
- }while(i++<MaxClients);
- }
- public OnClientDisconnect_Post(C) ClearTrie(hTS[C]);
- public PD(Handle:E, String:N[], bool:B)
- {
- decl a;
- if((a=GetClientOfUserId(GetEventInt(E,"attacker"))))
- {
- decl v;
- if((v=GetClientOfUserId(GetEventInt(E,"userid"))) !=a)
- {
- N[0] = 'd';
- IntToString(a, N[1],4);
- SetTrieValue(hTS[v], N, 0);
- decl d, f, w;
- GetTrieValue(hTS[v], N[1], f);
- IntToString(v, N[1],4);
- GetTrieValue(hTS[a], N, d);
- SetTrieValue(hTS[a], N, ++d);
- GetTrieValue(hTS[a], N[1], w);
- SetTrieValue(hTS[a], N[1], ++w);
- new Handle:hHudText = CreateHudSynchronizer();
- SetHudTextParams(0.0, 0.92, 5.0, 255, 0, 0, 255);
- ShowSyncHudText(a, hHudText, "%N %i:%i %N (+%i Killstreak)", a,w,f,v,d);
- ShowSyncHudText(v, hHudText, "%N %i:%i %N (-%i Killstreak)", v,f,w,a,d);
- CloseHandle(hHudText);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement