Raised This Month: $ Target: $400
 0% 

DoD, need a helping hand with faking a death message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-28-2004 , 20:06   DoD, need a helping hand with faking a death message
Reply With Quote #1

hey people, i need some help with faking a death message,
i tried it, but it always shows the "splash" like suicide instead
of the gun (garand in my case.)

so i would be really glad if someone could help me out here.

here's the code part:

Code:
public client_damage(attacker,victim,damage,wpnindex,hitplace,TA){    if(get_cvar_num("amx_ubergarand") == 1){         if((wpnindex == DODW_GARAND) && (is_user_alive(victim) == 1)){                 new gunname[32]                 xmod_get_wpnname(wpnindex,gunname,31)                 set_user_health(victim,0)                 new aKills = dod_get_user_kills(attacker)                 dod_set_user_kills(attacker,(aKills += 1))                 message_begin( MSG_ALL, get_user_msgid("DeathMsg"),{0,0,0},0)         write_byte(attacker)         write_byte(victim)         write_byte(0)         write_string(gunname)         message_end()                 }    } }

i already tried "xmod_get_wpnlogname" instead, but it doesn't work either.

thanks for your help!
FeuerSturm is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 09-28-2004 , 20:44  
Reply With Quote #2

Lmao I see no problem?
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 09-28-2004 , 22:05  
Reply With Quote #3

FireStorm, kill someone normally with the gun and look in the console, how it prints in there is what it bases the sprite icon off. Sometimes I have seen when making custom death messages it cuts off the first letter. Check the console when a death message is made by your plugin and make sure it matches the real one.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-29-2004 , 04:28  
Reply With Quote #4

it always says
[RST] FireStorm killed PlayerXYZ with "world",

so something is wrong there
FeuerSturm is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 09-29-2004 , 07:01  
Reply With Quote #5

Quote:
Originally Posted by FireStorm
it always says
[RST] FireStorm killed PlayerXYZ with "world",

so something is wrong there
even if you kill a player normally with any gun (not using your plugin)? Thats what I was asking, to see what SHOULD be there.

also you are not blocking the death message. I'll tweak up your code later tonight if I remeber.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-29-2004 , 09:30  
Reply With Quote #6

it says:
[RST] FireStorm killed PlayerXY with "garand"

and shows the icon for the garand rifle when a player is killed
without "UberGarand Mode".

thanks for your help, looking forward to that
FeuerSturm is offline
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 09-29-2004 , 13:28  
Reply With Quote #7

message_begin(MSG_ALL,get_user_msgid("DeathMs g"),{0,0,0},0)
write_byte( killer )
write_byte( victim )
write_byte( wpnindex )
message_end()

It is now in engine_stock.inc file.

! Warning !
Weapon index returned from DoDX module may be different for weapons with id > 31 as they even are different in DoD 1.0 - DoD 1.3 .

I think I will add a stock function to correct this issue.
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-29-2004 , 16:06  
Reply With Quote #8

Quote:
Originally Posted by SidLuke
message_begin(MSG_ALL,get_user_msgid("DeathMs g"),{0,0,0},0)
write_byte( killer )
write_byte( victim )
write_byte( wpnindex )
message_end()

It is now in engine_stock.inc file.

! Warning !
Weapon index returned from DoDX module may be different for weapons with id > 31 as they even are different in DoD 1.0 - DoD 1.3 .

I think I will add a stock function to correct this issue.
why easy if you can try the hard way!?

thank's SidLuke, you're (like always) the man, works like a charme,
so a beta of my "DoD UberGarand" plugin is finished
FeuerSturm is offline
Reply


Thread Tools
Display Modes

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 17:13.


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