Plugin na końcu rundy wyświetla na "sayu" kto zadał najwięcej obrażeń.
Kod: Zaznacz cały
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <csx>
#define PLUGIN "TOP Damage"
#define VERSION "1.0"
#define AUTHOR "MEFSON"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("round_end", 2, "1=Round_End");
}
public round_end()
{
new players[32], num, i, id, stats[8], bodyhits[8], best_id, best_damage;
get_players(players, num, "ch");
for(i = 0; i <= num; i++)
{
id = players[i];
get_user_rstats(id, stats, bodyhits);
if ( stats[0] > best_damage )
{
best_id = id;
best_damage = stats[0];
}
}
if( is_user_connected(best_id) )
{
new name[32];
get_user_name(best_id, name, 31);
client_print(0, print_chat, "Najlepszym graczem rundy jest %s", name)
client_print(0, print_chat, "%s Obrazenia: (%d)", name, best_damage)
}
}
TODAY-TOMMOROW GALATASARAY-AMERICAN SAN TEXAS!
