Code:
}
new bite[23]
set_task(1.0,"bite",id,_,_,"b")
set_user_health(id,600)
client_print(id,print_chat,"You sink you teeth in the person's neck.^n")
client_print(entid,print_chat,"You just got bit by a vampire!^n")
return PLUGIN_HANDLED
}
public bite(id){
new entid, entbody
get_user_aiming(id,entid,entbody,400)
set_user_health(entid,get_user_health(entid)-10)
return PLUGIN_HANDLED
}
I have a little problem with that. If I do the command /bite, any one I look at will start to lose health. How do I make it stop when the player dies? for some reason this does not work.
Code:
public bite(id){
new entid, entbody
get_user_aiming(id,entid,entbody,400)
if(get_user_health(entid) <=10){
user_silentkill(entid)
return PLUGIN_HANDLED
}
else{ set_user_health(entid,get_user_health(entid)-10)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}