I seem to be having some difficulty with my code, i've tested it with many different methods, and yet still it doesn't work. All i'd like for it to do is speak Danger.wav when hp is below 20. Take a look at the following code
Code:
#include <amxmodx>
#include <fun>
#define MAX_PLAYERS 32
public plugin_init() {
register_plugin("Environment Status","0.1","Lloyd Banks")
set_task(1.0,"check_status")
}
public check_status(id)
{
new iPlayer
new iPlayers[MAX_PLAYERS]
new iNumPlayers
get_players(iPlayers,iNumPlayers)
if (get_user_health(iPlayer) < 20)
{
new name[33]
get_user_name(0, name, 32)
client_print(id, print_chat, "Careful %s, Your hp is low!", name)
client_cmd(id, "spk fvox/danger.wav")
}
}
Anybody see something I don't ?
__________________