Modme Forums

Script for giving raygun

Game Modding | Call of Duty: Black Ops 3 | Scripting


mdonledo:

I am using NateSmithZombies shooteable easter egg script and I want to change the reward being all the perks to being an upgraded raygun, although I am not familiar with the code, if anyone could help me out that would be awesome

#using scripts\codescripts\struct;
#using scripts\zm\_zm_perks;

#define SHOOTABLE_FX "_NSZ/Shootable_EE/generic_purple"
#precache( "fx", SHOOTABLE_FX );

function main()
{
level.shootables_shot = 0;
shootables = getentarray( "shootable_ee", "targetname" );
level.shootables_shot_to_shoot = shootables.size;
for( i=0;i<shootables.size;i++ )
shootablesthread waittill_shot();
}

function waittill_shot()
{
self waittill( "trigger", player );
level.shootables_shot++;
shootable_model = getent( self.target, "targetname" );
playfx( SHOOTABLE_FX, shootable_model.origin );
playsoundatposition( "meteor_affirm", self.origin );
shootable_model delete();
self delete();
if( level.shootables_shot == level.shootables_shot_to_shoot )
{
players = getplayers();
for( i=0;i<players.size;i++ )
playersthread give_all_perks();
}
}

function give_all_perks()
{
for( i=0;i<level._custom_perks.size;i++ )
{
self zm_perks::give_random_perk();
wait(0.1);
}
}

That is the script there


tmk_boi:

at the end before the last to brackets put

foreach(player in level.players)
{
player GiveWeapon(GetWeapon("ray_gun"));
}


tmk_boi:

or ray_gun_upgraded for the pap'ed version