PHP-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
#include <sourcemod>
#include <cstrike>
#include <morecolors>
#define MINKILLS 4
new g_iKills[MAXPLAYERS+1] = 0;
new bool:g_bStopkillstreakondeath = true;
public Plugin:myinfo =
{
name = "Killstreak",
author = "Jackmaster/Bara",
description = "asdfmoviez",
version = "1.0",
url = "hd-gamer.de"
}
public OnPluginStart()
{
HookEvent("player_death", OnPlayerDeath);
}
public OnClientPutInServer(client)
{
g_iKills[client] = 0;
}
public Action:OnPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new att = GetClientOfUserId(GetEventInt(event, "attacker"));
new vic = GetClientOfUserId(GetEventInt(event, "userid"));
if(IsClientInGame(att) && IsClientInGame(vic))
{
g_iKills[att]++;
if(g_iKills[att] >= MINKILLS)
{
CPrintToChatAllEx(att, "{blue}%N {FARBE}hat {FARBE}%i {FARBE}Kills in Folge", att, g_iKills[att]);
}
if(g_bStopkillstreakondeath)
{
g_iKills[vic] = 0;
}
}
return Plugin_Continue;
}
|
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Bara« (9. März 2013, 00:32)