The only Custom PHD mod you will ever need
-
This mod allows you to give/take the effect of the PHD perk of any player on every map by changing a variable for the respective player.
Sources + Download: https://github.com/2-Millimeter-Nahkampfwachter/CustomPHD
Follow this guide if you are not aware of how to load custom gsc scripts: https://forum.plutonium.pw/topic/6966/how-to-use-a-mod-menu-without-injecting-loading-gsc-scripts-client-sided
-
@IMGAYOwO Nice
-
@IMGAYOwO yop, can you help me a bit here?
i was trying to put your source with another mod and the compiler says the error is pretty much in the same line as PHD code starts
ive tried to add a thread for it even if your precompiled version work fine (and im assuming the code is the same)
what could be happening here ? tnx in advance
-
AdrX003 oh wait, i think it was just a missing "}" actually.... it compiled, gonna test it now.
aa still nothing
-
AdrX003 In the new plutonium update the order of execution for certain scripts have been adjusted causing certain level pointer variables to not overwrite how they would before.
It's a simple fix of adding some sort of wait. In this case I will only add 1 line.
init() { thread init_phd(); } init_phd() { level waittill( "start_of_round" ); //added this wait, which can't be in the init() func if(isdefined(level.player_damage_callbacks[0])){ level.first_player_damage_callback = level.player_damage_callbacks[0]; level.player_damage_callbacks[0] = ::playerdamagelastcheck; } else { maps/mp/zombies/_zm::register_player_damage_callback( ::playerdamagelastcheck ); } if(isDefined(level._effect[ "divetonuke_groundhit" ])){ level.phd_fx = level._effect[ "divetonuke_groundhit" ]; } else { if(!isDefined(level._effect[ "def_explosion" ])){ level.phd_fx = loadfx( "explosions/fx_default_explosion" ); } else { level.phd_fx = level._effect[ "def_explosion" ]; } } }
-
Cahz Ohhhhhhhhhhh i think i got it
thanks alot -
Cahz wait a bit, if the wait is set to start of round does it means the game would reload this every round, and not wile the player is alive
if im thinking correctly
might test it later
-
AdrX003 the
init_phd()
function doesn't have a loop, so it will only run 1 time, and will run at the start of round 1.
Long enough after everything is loaded to overwrite thelevel
variables.The main issue before was that the custom script would run first, then the
level
variables would be overwritten by the original game files, causing no actual changes to the game. -
Cahz Does this happen because of an update or something?
-
@IMGAYOwO yes, but it should be fixed when the fixes on staging make their way to production.