Raised This Month: $ Target: $400
 0% 

Not displaying right


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
asd13
Member
Join Date: Apr 2009
Old 05-25-2010 , 22:58   Not displaying right
Reply With Quote #1

Its not reading or displaying right the message.
Problem is that if player kills he/she sees always the same message "You killed '%s' with HeadShot" no matter is it hs or not.

PHP Code:
#include < amxmodx >
#include < hamsandwich >

public plugin_init( ) {
    
RegisterHamHam_Killed"player""PlayerKilled" );
}

public 
PlayerKillediVictimiKilleriHs ) {
    if ( 
iHs == ) {
        
client_printiKillerprint_chat"You killed '%s' with HeadShot"iVictim );
    }
    else {
        
client_printiKillerprint_chat"You killed '%s'"iVictim );
    }

asd13 is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-25-2010 , 23:04   Re: Not displaying right
Reply With Quote #2

Code:
#include <amxmodx> public plugin_init() {     register_plugin( "Death Message", "1.0", "Wrecked" )     register_event( "DeathMsg", "EventDeathMsg", "a", "1>0" ) } public EventDeathMsg() {     // read_data( 1 ) = Killer     // read_data( 2 ) = Victim     // read_data( 3 ) = Headshot     new name[32]     get_user_name( read_data( 2 ), name, 31 )     client_print( read_data( 1 ), print_chat, "You killed '%s'%s", name, read_data( 3 ) ? "with a headshot!" : "!" ) }
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
asd13
Member
Join Date: Apr 2009
Old 05-25-2010 , 23:09   Re: Not displaying right
Reply With Quote #3

Thanks, but can it be done with hamsandwich ? :O
asd13 is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-25-2010 , 23:11   Re: Not displaying right
Reply With Quote #4

Why does it matter?

EDIT: The 3rd parameter for Ham_Killed is shouldgib.

I have no idea what that is, but I think it'd be named headshot if it were related to the kill being a headshot.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
asd13
Member
Join Date: Apr 2009
Old 05-25-2010 , 23:12   Re: Not displaying right
Reply With Quote #5

It'd doesent but i like ham. And other stuff like player spawning and so is done with ham.
asd13 is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-25-2010 , 23:14   Re: Not displaying right
Reply With Quote #6

Quote:
Originally Posted by asd13 View Post
It'd doesent but i like ham.
With green eggs?


Quote:
Originally Posted by asd13 View Post
And other stuff like player spawning and so is done with ham.
So use hamsandwich for spawning and other things and use DeathMsg for the killed event...
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-27-2010 , 05:58   Re: Not displaying right
Reply With Quote #7

Quote:
Originally Posted by asd13 View Post
Its not reading or displaying right the message.
Problem is that if player kills he/she sees always the same message "You killed '%s' with HeadShot" no matter is it hs or not.
PHP Code:
#include < amxmodx >

public plugin_init( ) {
    
register_event("DeathMsg""eDeath""a");
}

public 
eDeath() {
    new 
iKillerID read_data(1);
    new 
iVictimID read_data(2);
    new 
isHeadshot read_data(3);
    new 
Name[32];
    
get_user_name(iVictimIDNamecharsmax(Name));
    if(
isHeadshot) {
        
client_print(iKillerclient_print"You killed %s with a headshot!"Name);
        }
    else {
        
client_print(iKillerclient_print"You killed %s!"Name);
        }

note:
isHeadshot is a bool.

I know it's the same thing wrecked said, but I think that this way it's more user-friendly (if it would be in any way xD)
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
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 05:16.


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