Raised This Month: $51 Target: $400
 12% 

show /me and /hp on player death


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-28-2020 , 04:12   show /me and /hp on player death
Reply With Quote #1

Hello, so i thought of an idea, to make gameplay even more simple, can someone teach me how can i make /hp and /me show on player death? So you dont need to write /hp and /me
HowToRuski is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-28-2020 , 07:43   Re: show /me and /hp on player death
Reply With Quote #2

Code:
amxclient_cmd(id, "say /hp") amxclient_cmd(id, "say /me")
__________________









Last edited by CrazY.; 10-28-2020 at 07:44.
CrazY. is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-28-2020 , 08:50   Re: show /me and /hp on player death
Reply With Quote #3

Quote:
Originally Posted by CrazY. View Post
Code:
amxclient_cmd(id, "say /hp") amxclient_cmd(id, "say /me")
Should i do it like this?

PHP Code:
public client_death()
{
 
//your code here
return PLUGIN_HANDLED

HowToRuski is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-28-2020 , 18:28   Re: show /me and /hp on player death
Reply With Quote #4

Quote:
Originally Posted by HowToRuski View Post
Hello, so i thought of an idea, to make gameplay even more simple, can someone teach me how can i make /hp and /me show on player death? So you dont need to write /hp and /me
The HP on player death is less than 0 or else they would be alive. Script posts remaining HP after each hit.

Code:
register_event("Damage","@event_damage","b","2!0","3=0","4!0") @event_damage(id) {     new killer = get_user_attacker(id);         if( is_user_connected(killer) && is_user_alive(killer) && !is_user_bot(killer) )         {             client_print(killer,print_center,"HP: %i",get_user_health(id));         }     return PLUGIN_CONTINUE; }
__________________
DJEarthQuake is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-29-2020 , 04:07   Re: show /me and /hp on player death
Reply With Quote #5

Quote:
Originally Posted by DJEarthQuake View Post
The HP on player death is less than 0 or else they would be alive. Script posts remaining HP after each hit.

Code:
register_event("Damage","@event_damage","b","2!0","3=0","4!0") @event_damage(id) {     new killer = get_user_attacker(id);         if( is_user_connected(killer) && is_user_alive(killer) && !is_user_bot(killer) )         {             client_print(killer,print_center,"HP: %i",get_user_health(id));         }     return PLUGIN_CONTINUE; }
Not what i wanted. Have you ever used statsx on amxx? Because you just made me a new whole plugin.
HowToRuski is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-29-2020 , 07:34   Re: show /me and /hp on player death
Reply With Quote #6

Code:
public plugin_init() {     register_event("DeathMsg", "Event_DeathMsg", "ae") } public Event_DeathMsg() {     new victim = read_data(2)     amxclient_cmd(victim, "say", "/hp")     amxclient_cmd(victim, "say", "/me") }
__________________









Last edited by CrazY.; 10-29-2020 at 07:35.
CrazY. is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-29-2020 , 08:45   Re: show /me and /hp on player death
Reply With Quote #7

I missed that at first and changed the post. It came back like it never was edited.
__________________
DJEarthQuake is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-29-2020 , 08:49   Re: show /me and /hp on player death
Reply With Quote #8

Quote:
Originally Posted by CrazY. View Post
Code:
public plugin_init() {     register_event("DeathMsg", "Event_DeathMsg", "ae") } public Event_DeathMsg() {     new victim = read_data(2)     amxclient_cmd(victim, "say", "/hp")     amxclient_cmd(victim, "say", "/me") }
Is there a timing script somehow? Because when i get killed it automatically shows * You have no killer
maybe should like add 1 sec interval before it shows?
HowToRuski is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-29-2020 , 10:45   Re: show /me and /hp on player death
Reply With Quote #9

Quote:
Originally Posted by HowToRuski View Post
Is there a timing script somehow? Because when i get killed it automatically shows * You have no killer
maybe should like add 1 sec interval before it shows?
You are on top of it. Works properly now.
Code:
#include amxmodx public plugin_init() register_event("DeathMsg", "Event_DeathMsg", "acdf"); public Event_DeathMsg(victim) {     victim = read_data(2);     client_cmd(victim, "say /hp");     set_task(1.0,"sayme",victim); } public sayme(victim) client_cmd(victim, "say /me");
__________________

Last edited by DJEarthQuake; 10-29-2020 at 10:58.
DJEarthQuake is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-29-2020 , 12:26   Re: show /me and /hp on player death
Reply With Quote #10

Quote:
Originally Posted by DJEarthQuake View Post
You are on top of it. Works properly now.
Code:
#include amxmodx public plugin_init() register_event("DeathMsg", "Event_DeathMsg", "acdf"); public Event_DeathMsg(victim) {     victim = read_data(2);     client_cmd(victim, "say /hp");     set_task(1.0,"sayme",victim); } public sayme(victim) client_cmd(victim, "say /me");
Thanks, worked great.
HowToRuski is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode