Hello every body :-)
I just started scripting and i wanted some help with this plugin that im trying to create.
The purpose of this plugin is simple:
Play 4 diferent sounds for 4 diferent kill types, for example:
I do 2 kills, it plays double-kill.wav
I do 3 kills, it plays triple-kill.wav
I do 10 kills, it plays monster-kill.wav
I do 20 kills, it plays mega-kill.wav
There are only 4 sound files.The plugin compiles find.
The sounds download perfectly.
But i get an error when compiling.And i dont think i can hear them when i kill the amount of people that are listed below to play the sound to all of the players.
Can some one help me out with this source code?
Thank you for eny help, im just a starter :-O
P.S. - Sorry if my english is bad, or i said something you didin't understand.
If i sed something you didin't understand please tell me, and i will try to explain what i ment :-)
Double P.S. The original source code is not my.
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME ""
#define PLUGIN_VERSION ""
#define PLUGIN_AUTHOR ""
new kills[33] = {0,...};
new deaths[33] = {0,...};
new kill[33][24];
#define LEVELS 4
#define TASK_CLEAR_KILL 100
new levels[4] = {2, 3, 10, 20};
new sounds[4][] =
{
"hpn/double-kill",
"hpn/triple-kill",
"hpn/monster-kill",
"hpn/mega-kill"
};
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
return PLUGIN_CONTINUE;
}
public client_connect(id) {
kills[id] = 0;
deaths[id] = 0;
}
public clear_kill(taskid)
{
new id = taskid-TASK_CLEAR_KILL;
kill[id][0] = 0;
}
public plugin_precache() {
precache_sound("hpn/double-kill.wav")
precache_sound("hpn/triple-kill.wav")
precache_sound("hpn/monster-kill.wav")
precache_sound("hpn/mega-kill.wav")
}