function et_InitGame( levelTime, randomSeed, restart )
maxclients = tonumber( et.trap_Cvar_Get( "sv_maxClients" ) )
end
function et_Print( text )
local s, e = string.find( text, "Exit: " )
if s == 1 then
ShowStats( )
end
end
function ShowStats( )
local i
for i = 0, maxclients - 1 do
local team = et.gentity_get( i, "sess.sessionTeam" )
if team == 1 or team == 2 then
for j = 0, 21 do
local stats = et.gentity_get( i, "sess.aWeaponStats", j )
et.G_Print( "player " .. i .. ", weapon " .. j .. ": " .. stats[1] .. "," .. stats[2] .. "," .. stats[3] .. "," .. stats[4] .. "," .. stats[5] .. "\n" )
end
end
end
end
=FF=im2good4u wrote:if its so barbage then sorry to say i bu maybe u should lean some LUA
hmm... very useful help. thx
This is the output from the LUA script:
player 4, weapon 0: 3307417600,3295985664,1134788608,3307261952,3295363072
player 4, weapon 1: 1137213440,3307339776,3295674368,1135869952,0
player 4, weapon 2: 0,0,1023,0,0
player 4, weapon 3: 0,573263712,1,0,0
player 4, weapon 4: 0,537849280,0,0,0
player 4, weapon 5: 0,0,0,0,0
player 4, weapon 6: 0,0,0,33619969,0
player 4, weapon 7: 0,0,0,0,0
player 4, weapon 8: 0,0,0,0,0
player 4, weapon 9: 0,0,0,0,0
player 4, weapon 10: 0,0,0,0,0
player 4, weapon 11: 0,0,0,0,0
player 4, weapon 12: 0,0,0,0,0
player 4, weapon 13: 0,0,0,0,0
player 4, weapon 14: 0,0,0,0,0
player 4, weapon 15: 0,0,0,0,0
player 4, weapon 16: 0,0,0,0,0
player 4, weapon 17: 0,0,0,0,0
player 4, weapon 18: 0,537202640,0,0,0
player 4, weapon 19: 1,2,0,0,0
player 4, weapon 20: 0,0,0,0,0
player 4, weapon 21: 0,0,0,0,0
// OSP - weapon stat counters
typedef struct {
unsigned int atts;
unsigned int deaths;
unsigned int headshots;
unsigned int hits;
unsigned int kills;
} weapon_stat_t;