PDA

View Full Version : [KZ/Bhop] Heal yourself!


Ardonicek
05-19-2013, 16:36
HEAL YOURSELF
Hello, i made another one plugin.
This is for KZ/BHOP servers.

Commands: /heal
Normal players: say /heal and get healed to 100HP
VIP Players (Admin LVL H): say /heal and get healed to 200HP and get 100 Armor!

It has also some announces.

I'm using it on my bhop server and it works perfectly.
If you know how to improve this plugin, tell me.

Kia
05-19-2013, 17:52
Almost every KZ / BHOP server runs on ProKreedz, I don't think such a plugin is neccessary as ProKreedz provides this already (godmode etc.)

Anyway :


if (get_user_flags(id) & ADMIN_USER) // Normal Player Heal Announce
{
set_hudmessage(155, 120, 45, -1.0, -0.7, 1, 3.0, 6.0, 1.0, 1.0, 4)
show_hudmessage(id, "Want to heal myself?^nType /heal !");
client_print(id,print_chat,"[Heal]Want to heal myself? Type /heal !")
client_print(id,print_chat,"[Heal]If you get VIP, you'll get Heal benefits!")
}
if (get_user_flags(id) & ADMIN_LEVEL_H) // VIP Heal Announce
{
set_hudmessage(155, 120, 45, -1.0, -0.7, 1, 3.0, 6.0, 1.0, 1.0, 4)
show_hudmessage(id, "Want to heal myself?^nType /heal !");
client_print(id,print_chat,"[Heal]Want to heal myself? Type /heal !")
client_print(id,print_chat,"[Heal]Your benefits = Heal to 200HP + 100 Armor!")
}


->


if (get_user_flags(id) & ADMIN_LEVEL_H)
{
set_hudmessage(155, 120, 45, -1.0, -0.7, 1, 3.0, 6.0, 1.0, 1.0, 4)
show_hudmessage(id, "Want to heal myself?^nType /heal !");
client_print(id,print_chat,"[Heal]Want to heal myself? Type /heal !")
client_print(id,print_chat,"[Heal]Your benefits = Heal to 200HP + 100 Armor!")
}
else
{
set_hudmessage(155, 120, 45, -1.0, -0.7, 1, 3.0, 6.0, 1.0, 1.0, 4)
show_hudmessage(id, "Want to heal myself?^nType /heal !");
client_print(id,print_chat,"[Heal]Want to heal myself? Type /heal !")
client_print(id,print_chat,"[Heal]If you get VIP, you'll get Heal benefits!")
}


You should also check if the user is still connected, in the five second delay they could disconnect.

Xalus
05-19-2013, 18:00
Almost every KZ / BHOP server runs on ProKreedz, I don't think such a plugin is neccessary as ProKreedz provides this already (godmode etc.)

Anyway :


if (get_user_flags(id) & ADMIN_USER) // Normal Player Heal Announce
{
set_hudmessage(155, 120, 45, -1.0, -0.7, 1, 3.0, 6.0, 1.0, 1.0, 4)
show_hudmessage(id, "Want to heal myself?^nType /heal !");
client_print(id,print_chat,"[Heal]Want to heal myself? Type /heal !")
client_print(id,print_chat,"[Heal]If you get VIP, you'll get Heal benefits!")
}
if (get_user_flags(id) & ADMIN_LEVEL_H) // VIP Heal Announce
{
set_hudmessage(155, 120, 45, -1.0, -0.7, 1, 3.0, 6.0, 1.0, 1.0, 4)
show_hudmessage(id, "Want to heal myself?^nType /heal !");
client_print(id,print_chat,"[Heal]Want to heal myself? Type /heal !")
client_print(id,print_chat,"[Heal]Your benefits = Heal to 200HP + 100 Armor!")
}


->


if (get_user_flags(id) & ADMIN_LEVEL_H)
{
set_hudmessage(155, 120, 45, -1.0, -0.7, 1, 3.0, 6.0, 1.0, 1.0, 4)
show_hudmessage(id, "Want to heal myself?^nType /heal !");
client_print(id,print_chat,"[Heal]Want to heal myself? Type /heal !")
client_print(id,print_chat,"[Heal]Your benefits = Heal to 200HP + 100 Armor!")
}
else
{
set_hudmessage(155, 120, 45, -1.0, -0.7, 1, 3.0, 6.0, 1.0, 1.0, 4)
show_hudmessage(id, "Want to heal myself?^nType /heal !");
client_print(id,print_chat,"[Heal]Want to heal myself? Type /heal !")
client_print(id,print_chat,"[Heal]If you get VIP, you'll get Heal benefits!")
}


You should also check if the user is still connected, in the five second delay they could disconnect.

->


set_hudmessage(155, 120, 45, -1.0, -0.7, 1, 3.0, 6.0, 1.0, 1.0, 4)
show_hudmessage(id, "Want to heal myself?^nType /heal !");
client_print(id,print_chat,"[Heal]Want to heal myself? Type /heal !")
client_print(id,print_chat,"[Heal] %s", (get_user_flags(id) & ADMIN_LEVEL_H) ? "Your benefits = Heal to 200HP + 100 Armor!" : "If you get VIP you'll get Heal benefits!")

HamletEagle
09-27-2015, 13:21
This could be exploited a lot so players will always have full health. Unapproved.