CT i TT kod poniżej , nie działa. Brak innych pomysłów wiec zakladam temat
#include <amxmodx>
#include <csx>
#include <ColorChat>
new RoundDmg[32]
public plugin_init() {
register_plugin("Best Player (Round)", "1.0", "MarWit")
register_logevent("Poczatek_Rundy", 2, "1=Round_Start")
register_logevent("Koniec_Rundy_TT", 2, "1=Round_End");
register_logevent("Koniec_Rundy_CT", 2, "1=Round_End");
register_event("Damage", "Damage", "b", "2!=0")
}
public Poczatek_Rundy()
{
new num, players[32]
get_players(players, num, "ch")
for(new i=0; i<num; i++)
{
RoundDmg[i] = 0
}
}
public Damage(id)
{
new kid = get_user_attacker(id)
RoundDmg[kid] += read_data(2)
}
public Koniec_Rundy_TT(id)
{
new stats[8], bodyhits[8], players[32], bestscore = 0, bestplayer, besths, num, i, bestdmg, bestdmgplayer
if(get_user_team(id) == 1)
{
get_players(players, num, "h")
for(i=0; i<num; i++)
{
get_user_rstats(players[i], stats, bodyhits)
if(stats[0] > bestscore)
{
bestscore = stats[0]
bestplayer = players[i]
besths = stats[2]
}
if(RoundDmg[i] > bestdmg)
{
bestdmg = RoundDmg[i]
bestdmgplayer = players[i]
}
}
new nick[33], dmg_nick[33]
get_user_name(bestplayer, nick, 32)
get_user_name(bestdmgplayer, dmg_nick, 32)
ColorChat(0, TEAM_COLOR, "[ZOMBIE]^x01 Najwiecej: Obrazen: ^x04%s ^x01%d ^x03dmg! Zabic: ^x04%s ^x01%d ^x03HS!", nick, besths, bestdmgplayer, bestdmg)
}
}
public Koniec_Rundy_CT(id)
{
new stats[8], bodyhits[8], players[32], bestscore = 0, bestplayer, besths, num, i, bestdmg, bestdmgplayer
if(get_user_team(id) == 2)
{
get_players(players, num, "h")
for(i=0; i<num; i++)
{
get_user_rstats(players[i], stats, bodyhits)
if(stats[0] > bestscore)
{
bestscore = stats[0]
bestplayer = players[i]
besths = stats[2]
}
if(RoundDmg[i] > bestdmg)
{
bestdmg = RoundDmg[i]
bestdmgplayer = players[i]
}
}
new nick[33], dmg_nick[33]
get_user_name(bestplayer, nick, 32)
get_user_name(bestdmgplayer, dmg_nick, 32)
ColorChat(0, TEAM_COLOR, "[HUMAN]^x01 Najwiecej: Obrazen: ^x04%s ^x01%d ^x03dmg! Zabic: ^x04%s ^x01%d ^x03HS!", nick, besths, bestdmgplayer, bestdmg)
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/
Prosiłbym o szybką odpowiedź


Dodatki SourceMod













