The only Custom PHD mod you will ever need

Topic created · 8 Posts · 292 Views
  • 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.


    I made an example script that gives the PHD perk effects to any player who achieves 100 kills after respawning. You can download the mod here: Mod

    Follow this guide if you are not aware of how to load custom gsc scripts:

  • @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.

            thread init_phd();
            level waittill( "start_of_round" ); //added this wait, which can't be in the init() func
    		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 the level 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.

Log in to reply