Well , i have a code and i want on each kill / death to Count for 2 players gun stats. For the killer and the victim...
ex:
PHP Code:
new PlayerID[32];
new g_weap_names[32][32] = {"", "p228", "", "scout", "hegrenade",
"xm1014", "c4", "mac10", "aug", "smokegrenade", "elite",
"fiveseven", "ump45", "sg550", "galil", "famas", "usp", "glock18",
"awp", "mp5navy", "m249", "m3", "m4a1", "tmp",
"g3sg1", "flashbang", "deagle", "sg552", "ak47",
"knife", "p90", ""}
public client_death(killer, victim, wpnindex, hitplace, TK)
{
new headshot = ( hitplace == HIT_HEAD ) : "yes" : "no"
new const HitPlaceStrings[][] =
{
"Generic",
"Head",
"Chest",
"Stomach",
"LeftArm",
"RightArm",
"LeftLeg",
"RightLeg"
};
new killername[32], victimname[32], actuallkillerid[33], actuallvictimid[33]
get_user_name(killer,killername,31)
get_user_name(victim,victimname,31)
format(actualkillerid,PlayerID[killername],32);
format(actualvictimid,PlayerID[victimname],32);
msg("Kill Status: Killer: %s (%d) / Victim: %s (%d) / Weapon: %d / Hitplace: %s / TK: %d / HeadShot: %s ",killername, killer, victimname, victim, wpnindex, HitPlaceStrings[ hitplace ] , TK, headshot );
}
Well First of all in the array
PlayerID[32]
i store virtual ids for each player. Base on theese ids i want to store in a database for each player gunstats. Kills and deaths from each gun for each player.
now i want to make an array and put the stats in it
example:
weaponstats[32 -
PlayerID][32 - WeaponID][1 - Kill - Deaths]
example for killing:
weaponstats[killer][wpnindex][0] - 0 for kills
weaponstats[victim][wpnindex][1] - 1 for deaths
But i am not sure how to make it

can anyone help me ?
__________________