diff --git a/dlls/csx/source/rank.cpp b/dlls/csx/source/rank.cpp index 61d6e735..6ade5a33 100755 --- a/dlls/csx/source/rank.cpp +++ b/dlls/csx/source/rank.cpp @@ -188,7 +188,7 @@ static cell AMX_NATIVE_CALL get_user_stats2(AMX *amx, cell *params) /* 3 param * return 0; } -static cell AMX_NATIVE_CALL get_stats(AMX *amx, cell *params) /* 3 param */ +static cell AMX_NATIVE_CALL get_stats(AMX *amx, cell *params) /* 5 param */ { int index = params[1] + 1; @@ -208,6 +208,8 @@ static cell AMX_NATIVE_CALL get_stats(AMX *amx, cell *params) /* 3 param */ cpStats[7] = (*a).getPosition(); MF_SetAmxString(amx,params[4],(*a).getName(),params[5]); + if (params[6] > 0) + MF_SetAmxString(amx, params[5], (*a).getUnique(), params[6]); for(int i = 1; i < 8; ++i) cpBodyHits[i] = (*a).bodyHits[i]; return --a ? index : 0; @@ -217,7 +219,7 @@ static cell AMX_NATIVE_CALL get_stats(AMX *amx, cell *params) /* 3 param */ return 0; } -static cell AMX_NATIVE_CALL get_stats2(AMX *amx, cell *params) /* 3 param */ +static cell AMX_NATIVE_CALL get_stats2(AMX *amx, cell *params) /* 4 param */ { int index = params[1] + 1; @@ -225,6 +227,8 @@ static cell AMX_NATIVE_CALL get_stats2(AMX *amx, cell *params) /* 3 param */ for(RankSystem::iterator a = g_rank.front(); a ;--a){ if ((*a).getPosition() == index) { cell *cpStats = MF_GetAmxAddr(amx,params[2]); + if (params[4] > 0) + MF_SetAmxString(amx, params[3], (*a).getUnique(), params[4]); cpStats[0] = (*a).bDefusions; cpStats[1] = (*a).bDefused; diff --git a/plugins/include/csstats.inc b/plugins/include/csstats.inc index b14adf20..1d59ce7e 100755 --- a/plugins/include/csstats.inc +++ b/plugins/include/csstats.inc @@ -45,7 +45,7 @@ native reset_user_wstats(index); /* Gets overall stats which stored in stats.dat file in amx folder * and updated on every mapchange or user disconnect. * Function returns next index of stats entry or 0 if no more exists. */ -native get_stats(index,stats[8],bodyhits[8],name[],len); +native get_stats(index,stats[8],bodyhits[8],name[],len,authid[],authidlen = 0); /* Returns number of all entries in stats. */ native get_statsnum(); @@ -58,4 +58,4 @@ native get_statsnum(); * 3 - bomb explosions */ native get_user_stats2(index,stats[4]); -native get_stats2(index,stats[4]); +native get_stats2(index,stats[4],authid[],authidlen = 0);