Ok, when I compile this I get an error stating argument type mismatch. It says its on the line where I have set_user_health. I tried to fix this in many different ways but it keeps showing this error. This is one problem I can't seem to figure out. I only included the public part of the code just so you know. This is part of a bigger plugin. Thanks in advance for any help.
Code:
public minisethealth(id) {
new entid, entbody, health[32]
read_argv(1,health,31)
remove_quotes(health)
// "You don't know who you messing with fool!"
if(!(get_user_flags(id) & ADMIN_SLAY)) {
client_print(id, print_console, "***Access Denied***^n")
return PLUGIN_HANDLED
}
if(equali(health,"")) {
client_print(id,print_console,"Usage: amx_sethealth <health>^n")
return PLUGIN_HANDLED
}
get_user_aiming(id,entid,entbody,9999)
// Are you looking at someone?
if(!is_user_connected(entid)) {
client_print(id,print_chat,"What are you looking at? A wall?^n")
return PLUGIN_HANDLED
}
// Setting the health
set_user_health(entid, health)
return PLUGIN_HANDLED
}