/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <csx>
#include <colorchat>
#define PLUGIN "TheBestPlayer"
#define VERSION "1.0"
#define AUTHOR "Sn!ffer"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("round_end", 2, "1=Round_End");
}
public round_end()
{
static stats[8], bodyhits[8], players[32], bestscore = 0, bestplayer, besths, num, i
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(is_user_connected(bestplayer))
{
static name[33]
get_user_name(bestplayer, name, 32)
ColorChat(0, BLUE, "^x01*** Najlepszym graczem rundy jest ^x04 %s! ***", name)
set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 4.0)
show_hudmessage(0, "Najlepszym graczem rundy jest %s!", name)
ColorChat(0, GREEN, "^x01*** Zabil ^x04 %d graczy,^x01 w tym ^x04 %d headshot'ow ***", bestscore, besths)
}
else
{
ColorChat(0, RED, "*** Brak najlepszego gracza rundy... ***")
}
}
Oto plugin ktory troche przerobilem.Tylko mam problem w tym ze zapamietuje najlepszego gracza pierwszej rundy i tak leci do konca mapy
Moglby mi ktos to przerobic aby plugin resetowal sie co runde??