AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   DoD, need a helping hand with faking a death message (https://forums.alliedmods.net/showthread.php?t=6349)

FeuerSturm 09-28-2004 20:06

DoD, need a helping hand with faking a death message
 
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!

Votorx 09-28-2004 20:44

Lmao I see no problem?

jtp10181 09-28-2004 22:05

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.

FeuerSturm 09-29-2004 04:28

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

so something is wrong there :wink:

jtp10181 09-29-2004 07:01

Quote:

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

so something is wrong there :wink:

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.

FeuerSturm 09-29-2004 09:30

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 :)

SidLuke 09-29-2004 13:28

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.

FeuerSturm 09-29-2004 16:06

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!? :lol:

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


All times are GMT -4. The time now is 17:13.

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