Raised This Month: $ Target: $400
 0% 

[solved] modify original deathMsg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-13-2009 , 12:16   Re: modify original deathMsg
Reply With Quote #1

Recompile amxx and ask all people that gonna use your plugin to do the same ?
...
You can still do this by registering FM_StartFrame and unregister it as soon as the forward is sent.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 04-13-2009 , 14:35   Re: modify original deathMsg
Reply With Quote #2

ConnorMcLeod, I've one question. Two months ago, you used fakemeta for all plugins. Now you're using engine, why ?
__________________
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 , 14:41   Re: modify original deathMsg
Reply With Quote #3

I think http://forums.alliedmods.net/showthread.php?t=88792 < this why
__________________
Hunter-Digital is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-13-2009 , 14:51   Re: modify original deathMsg
Reply With Quote #4

Quote:
you used fakemeta for all plugins. Now you're using engine, why ?
engine is more efficient for a lot of things.

Quote:
you guys could just test to clear it out... set two different tasks, 0.1 and 0.01
No need, as I've said, there is a check to if it's < 0.1 in the set_task source code.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-13-2009 , 17:29   Re: modify original deathMsg
Reply With Quote #5

Quote:
Originally Posted by arkshine View Post
engine is more efficient for a lot of things.
Well, you have your answer, entity_get_XXX is roughly the same as pev though, but i'm just practising
But for such things as DispatchKeyvalue that once converted to FM require many native calls, engine (or whatever) is really more efficient, that was obviously in front of our eyes but we were not seeing it
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-13-2009 , 17:02   Re: modify original deathMsg
Reply With Quote #6

Ok, anyway, but what about my array dilema ? ... passing numbers and strings into an array of arguments through set_task()... I really have no ideea how theese arrays work... I'm used with the flexibility of php :}
__________________
Hunter-Digital is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 04-14-2009 , 02:14   Re: modify original deathMsg
Reply With Quote #7

Is there a reason why we aren't registering the deathmsg, and changing the arg? (Note that maybe we are staying away from this because the deathmsg uses a player index, but maybe you can manipulate it to use any entity index for the second or third argument. I think this method was overlooked maybe?)
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-14-2009 , 02:34   Re: modify original deathMsg
Reply With Quote #8

After i quickly tested, you have to change killer or victim name, then wait a bit before you send the DeathMsg (that's why i put the task), i think altering the name when the message come wouldn't work, but a test is needed to confirm that.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-14-2009 , 04:01   Re: modify original deathMsg
Reply With Quote #9

I blocked all death messages by default with a variable check, and created fake ones... I just need to know how to send the fricken arguments to that task, I can't figure out how to make arrays with integers AND strings...
__________________
Hunter-Digital is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-14-2009 , 04:37   Re: modify original deathMsg
Reply With Quote #10

Not that strings are only array in pawn, put an 'A' in an array cell or put 65 is the same.

You may have to adjust arrays/params sizes, and this should work :
PHP Code:
Fake_Death(victimkillerhsweapon[10], szNewName[32])
{
    new 
szName[32]
    
get_user_name(killerszNamecharsmax(szName))

    
entity_set_string(killerEV_SZ_netnameszNewName)
    
set_user_info(killer"name"szNewName)

    new 
parms[45]
    
parms[0] = victim
    parms
[1] = killer
    parms
[2] = hs
    formatex
(parms[3], charsmax(weapon), weapon)
    
formatex(parms[13], charsmax(szNewName), szNewName)

    
set_task(0.1"event_playerDeathPost"12985parms45)
}
 
//...
 
public event_playerDeathPost(parms[])
{
    new 
victim parms[0]
    new 
killer parms[1]
    new 
hs parms[2]
    new 
weapon[10]
    
formatex(weaponcharsmax(weapon), parms[3])
    new 
szResetName[32]
    
formatex(szResetNamecharsmax(szResetName), parms[13]

    
make_deathmsg(...)

    
entity_set_string(killerEV_SZ_netnameszResetName)
    
set_user_info(killer"name"szResetName)

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 02:25.


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