Why does this code return the correct "kills" in a win32 cs server;
(You are a Private with 114 kills)
but in a linux cs server it returns;
(You are a Private with rF0 kills)
Code:
#include <amxmodx>
#include <amxmisc>
#include <csstats>
#define RANK_CIVILIAN 0
#define RANK_PRIVATE 1
#define RANK_MARSHALL 2
#define MAXRANKS 3
new PlayerRank[33]
new const RANKS[MAXRANKS][] =
{
"Civilian",
"Private",
"Marshall"
}
public plugin_init()
{
register_plugin("Rank Display", "1.0", "")
register_clcmd("say /myrank","showrank");
}
public showrank(id)
{
if(!is_user_connected(id))
return 0
new stats[8]
new kills[8]
get_user_stats(id, stats, kills)
new name[33]
get_user_name(id, name, 32)
if(stats[0] < 1)
{
PlayerRank[id] = RANK_CIVILIAN
}
if(stats[0] >= 1 && stats[0] <= 3)
{
PlayerRank[id] = RANK_PRIVATE
}
if(stats[0] >= 3)
{
PlayerRank[id] = RANK_MARSHALL
}
client_print(id,print_chat, "You are a %s with %s kills", RANKS[PlayerRank[id]], stats[0]);
return 0
}
Thanks for any help you can give.