here you go , there was a problem with the way you used random, random only has 1 paramter (max). I beleive it starts at 0 . on line 65 and 66 the arrays wernt indexed properly or something . Note i onlygot it to compile the rest is up to you
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Super HeadShot"
#define VERSION "0.1"
#define AUTHOR "Nyyuu"
#define VIC_MAX 20
new Killer
new Victom
new Headshot
//Victom
new listVicWav[20] [200]
new vicfiledir[200]
new vicsong[VIC_MAX][200]
public viclist()
{
get_configsdir(vicfiledir,199)
format(vicfiledir,199,"%s/shsVictom.ini",vicfiledir)
new trash
for(new i=0;i<VIC_MAX;i++)
{
read_file(vicfiledir,i,vicsong[i],63,trash)
// need to find a way to put listVicWav[i][vicsong[i]
}
}
// Killer
new listKilWav[20] [200]
new kilfiledir[200]
new kilsong[VIC_MAX][200]
public killist()
{
get_configsdir(kilfiledir,199)
format(kilfiledir,199,"%s/shsKiller.ini",kilfiledir)
new trash
for(new i=0;i<VIC_MAX;i++)
{
read_file(kilfiledir,i,kilsong[i],63,trash)
// need to find a way to put listkilWav[i][kilsong[i]
}
}
public head_shot()
{
Killer = read_data(1) //get the guy that killed someone
Victom = read_data(2) //get the guy who died
Headshot = read_data(3) //was a headshot?
if (Headshot == true)
{
//Tempfiles for random song pic
new temp3 = random(20)
// Random only has one paramater , the max number to go to (starts at 0)
new temp1 = listKilWav[temp3][199]
new temp2 = listVicWav[temp3][199]
// you have to figure out what value you want your multi-diminesional arrays to hold
// plays a random file from killers
client_cmd(Killer, "spk temp1")
//plays a random file from victoms
client_cmd(Victom, "spk temp2")
}
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event ("DeathMsg","head_shot","a")
}
Theres only a couple warning left , you never used the symbols. Hope this helps you somewhat