Raised This Month: $ Target: $400
 0% 

[solved] modify original deathMsg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-11-2009 , 11:33   [solved] modify original deathMsg
Reply With Quote #1

How do I modify the killer's name right before the death message is sent ? or if that's not possible how do I block the original and name the player so I can send another fake one ?
__________________

Last edited by Hunter-Digital; 04-15-2009 at 07:33. Reason: problem solved, thanks again :P
Hunter-Digital is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-11-2009 , 11:38   Re: modify original deathMsg
Reply With Quote #2

Use register_message().
Arkshine is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-11-2009 , 12:16   Re: modify original deathMsg
Reply With Quote #3

Ok that's with blocking or modifying... but how about changing the name pretty quick without client_cmd() ? ... so that he has another name only in the death message ? :}
__________________
Hunter-Digital is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-13-2009 , 04:47   Re: modify original deathMsg
Reply With Quote #4

Can anyone help me with the above ?!
I would have tried to do this on my own but I can't search for the term "name"
__________________
Hunter-Digital is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 04-13-2009 , 06:51   Re: modify original deathMsg
Reply With Quote #5

Quote:
but how about changing the name pretty quick without client_cmd()
u can use
PHP Code:
set_pev(idpev_netname"NAME"
Empowers is offline
Send a message via ICQ to Empowers
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-13-2009 , 10:53   Re: modify original deathMsg
Reply With Quote #6

Doesn't work...

Code:
public testCmd(id)
{
set_pev(id, pev_netname, "Test")
make_deathmsg(id, 0, 0, "m4a1")
set_pev(id, pev_netname, "Test2")
set_task(0.1, "testDelay", id+512)
return PLUGIN_HANDLED
}
 
public testDelay(id) make_deathmsg(id-512, 0, 0, "m4a1")
shows my name every time... how about a message to change the player name in the scoreboard ?
__________________
Hunter-Digital is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 04-13-2009 , 11:30   Re: modify original deathMsg
Reply With Quote #7

PHP Code:
 stock set_user_nameid , const name[])  
  {    
     if (
is_user_connected(id)) {    
       
set_user_infoid "name" name 
     } 
  } 
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-13-2009 , 11:33   Re: modify original deathMsg
Reply With Quote #8

That prints the "X changed name to Y"... isn't any other way without blocking that message ? just to tempchange the name really quick without anyone noticing ?

if that is not possible... how do I get the new name in client_infochanged(id) and block the message ? ... and without register_message because I want to send the death message again and I can't in another registered message and I don't want to extend this in 3 functions...
__________________

Last edited by Hunter-Digital; 04-13-2009 at 11:35.
Hunter-Digital is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-13-2009 , 11:54   Re: modify original deathMsg
Reply With Quote #9

This works for me :

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

#define PLUGIN "deathmsg"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_clcmd("say /test""test")
}

public 
test(id)
{
    new 
szName[32]
    
get_user_name(idszNamecharsmax(szName))

    
entity_set_string(idEV_SZ_netname"LoL")
    
set_user_info(id"name""LoL")

    
set_task(0.01"Reset_Name"idszNamestrlen(szName))
}

public 
Reset_Name(szName[], id)
{
    
make_deathmsg(idid1"m4a1")
    
entity_set_string(idEV_SZ_netnameszName)
    
set_user_info(id"name"szName)

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 04-13-2009 , 12:02   Re: modify original deathMsg
Reply With Quote #10

re-read what he said:
Quote:
That prints the "X changed name to Y"...
Empowers is offline
Send a message via ICQ to Empowers
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 02:25.


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