Raised This Month: $ Target: $400
 0% 

That one killed that one


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-16-2010 , 09:49   That one killed that one
Reply With Quote #1

I wan't to do that then you kill someone it print in chat: "Name" Killed "name" but i don't know how. I only want example. ;)
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
Vechta
Veteran Member
Join Date: Jun 2010
Old 10-16-2010 , 10:11   Re: That one killed that one
Reply With Quote #2

DeathMsg event check the name of attacker & victim
Vechta is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-16-2010 , 10:23   Re: That one killed that one
Reply With Quote #3

No, i need that etc. Admin "name" gived 100hp for "name"
That's my idea.
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 10-16-2010 , 11:45   Re: That one killed that one
Reply With Quote #4

get_user_name()

like Vechta said?
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-16-2010 , 11:52   Re: That one killed that one
Reply With Quote #5

PHP Code:
public Event_DeathMsg()
{
    new 
killer read_data)
    new 
victim read_data)
    new 
headshot read_data)

    if( !
is_user_connectedkiller ) || !is_user_connectedvictim ) )
           return 
PLUGIN_HANDLED

    
new killerName[32], victimName[32]
    
get_user_namekillerkillerName31)
    
get_user_namevictimvictimName31)
       
    if( 
headshot )
    {
        
client_print0print_chat"%s killed %s with a headshot!"killerNamevictimName )
        return 
PLUGIN_HANDLED
    
}
    
    
client_print0print_chat"%s killed %s."killerNamevictimName )

__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-16-2010 , 12:15   Re: That one killed that one
Reply With Quote #6

It's shows for me "Counter-Strike killed Counter-Strike".
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-16-2010 , 12:20   Re: That one killed that one
Reply With Quote #7

Lolwut?

Is the players's names counter-strike?
lol

Anyway, here's the full code, if it didn't work for you:

Code:
#include <amxmodx>

public plugin_init()
{
    register_plugin( "Show Killers", "1.0", "nikhilgupta345" )
    register_event( "DeathMsg", "Event_Deathmsg", "a" )
}

public Event_DeathMsg()
{
    new killer = read_data( 1 )
    new victim = read_data( 2 )
    new headshot = read_data( 3 )

    if( !is_user_connected( killer ) || !is_user_connected( victim ) )
           return PLUGIN_HANDLED

    new killerName[32], victimName[32]
    get_user_name( killer, killerName, 31)
    get_user_name( victim, victimName, 31)
       
    if( headshot )
    {
        client_print( 0, print_chat, "%s killed %s with a headshot!", killerName, victimName )
        return PLUGIN_HANDLED
    }
    
    client_print( 0, print_chat, "%s killed %s.", killerName, victimName )
    return PLUGIN_HANDLED
}
That should work now.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-16-2010 , 12:36   Re: That one killed that one
Reply With Quote #8

Didn't work
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 10-16-2010 , 12:42   Re: That one killed that one
Reply With Quote #9

Then try it yourself, you now have everything you need. And you could say "Thanks" to nikhilgupta345 for his helping.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
Vechta
Veteran Member
Join Date: Jun 2010
Old 10-16-2010 , 12:52   Re: That one killed that one
Reply With Quote #10

Wtf, i said the same thing to do and he said he want something other O.o
Vechta 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 10:18.


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