Raised This Month: $51 Target: $400
 12% 

Fake DeathMsg Attacker == Victim


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 06-27-2023 , 01:19   Fake DeathMsg Attacker == Victim
Reply With Quote #1

Can someone tell me if this method of sending a fake death message after zombies are selected by the game is safe? I had tried another method before, but there were zombies on the same team as the humans

PHP Code:
new g_GameModeInfectionID
new g_MsgDeathMsgg_MsgScoreAttrib

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_MsgDeathMsg get_user_msgid("DeathMsg")
    
g_MsgScoreAttrib get_user_msgid("ScoreAttrib")
}

public 
plugin_cfg()
{
    
g_GameModeInfectionID zp_gamemodes_get_id("Infection Mode")
}

public 
zp_fw_core_infect_post(idattacker)
{
    
// Set custom grenade model
    
new current_mode zp_gamemodes_get_current()
    if (
current_mode != g_GameModeInfectionID)
        return;
    
    
SendDeathMsg(attackerid)
    
FixDeadAttrib(id)
}

// Send Death Message for infections
SendDeathMsg(attackervictim)
{
if(
attacker == victim){
    
message_begin(MSG_BROADCASTg_MsgDeathMsg)
    
write_byte(attacker// killer
    
write_byte(victim// victim
    
write_byte(0// headshot flag
    
write_string("teammate"// killer's weapon
    
message_end()
}
}

// Fix Dead Attrib on scoreboard
FixDeadAttrib(id)
{
message_begin(MSG_BROADCASTg_MsgScoreAttrib)
write_byte(id// id
write_byte(0// attrib
message_end()

MeliMeli is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-11-2023 , 13:48   Re: Fake DeathMsg Attacker == Victim
Reply With Quote #2

Testing it would be my advise if u already searched and didn't find any solutions.
__________________

Last edited by Napoleon_be; 07-11-2023 at 13:48.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 12:58.


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