Bocsánat, én néztem el valamit, azért bugolt. Ez már jó lesz:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#include <csstats>
#define PLUGIN "Slot,Frag,FPS"
#define VERSION "1.0"
#define AUTHOR "CrB"
new ctfrag
new tfrag
new g_fps[33][11];
new g_i[33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "halal", "a")
register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_")
register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing")
}
public client_putinserver(id) set_task(0.1, "count", id, "", 0, "b");
public client_disconnect(id) remove_task(id);
public client_PreThink(id) {
g_fps[id][10]++;
new stats[8],bodyhits[8],irank
irank = get_user_stats(id,stats,bodyhits)
new mrank = get_statsnum()
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.0, 0.26, 0, 6.0, 1.0)
show_hudmessage(id, "Slot %d/%d^n Ct frag: %d^nT frag: %d^nFPS: %i ^nRankod: %d/%d", get_playersnum(), get_maxplayers(), ctfrag, tfrag, get_user_fps(id), irank, mrank)
}
public halal()
{
if(read_data(1) != read_data(2) && cs_get_user_team(read_data(1)) == CS_TEAM_CT)
{
ctfrag++
}
else if(read_data(1) != read_data(2) && cs_get_user_team(read_data(1)) == CS_TEAM_T)
{
tfrag++
}
}
public round_first()
{
ctfrag = 0
tfrag = 0
}
public count(id) {
if ( g_i[id] < 9 )
g_i[id]++;
else
g_i[id] = 0;
g_fps[id][g_i[id]] = g_fps[id][10];
g_fps[id][10] = 0;
}
stock get_user_fps(id)
{
new i;
new j = 0;
for ( i = 0 ; i < 9 ; i++ )
j += g_fps[id][i];
return j - 5;
}