You are viewing our Forum Archives. To view or take place in current topics click here.
how to make things buyable in a mod menu?
Posted:

how to make things buyable in a mod menu?Posted:

xinii
  • Resident Elite
Status: Offline
Joined: Nov 05, 201112Year Member
Posts: 291
Reputation Power: 14
Status: Offline
Joined: Nov 05, 201112Year Member
Posts: 291
Reputation Power: 14
say i wanted the orbital strike with marker to cost 500 points what would i have to add to this?
OrbitalStrike()
{
if( level.script == "nazi_zombie_factory" )
{
self thread SpawnOrbitalStrike( level._effect["mp_light_lamp"], level._effect["zombie_mainframe_link_all"] );
}
else if( level.script == "nazi_zombie_sumpf" )
{
self thread SpawnOrbitalStrike( LoadFx( "env/light/fx_ray_ceiling_amber_dim_sm" ), LoadFx( "maps/zombie/fx_zombie_dog_lightning_buildup" ) );
}
else
{
self thread SpawnOrbitalStrike( LoadFx( "env/light/fx_ray_ceiling_amber_dim_sm" ), LoadFx( "misc/fx_zombie_couch_effect" ) );
}
}
SpawnOrbitalStrike( fx, fx2 )
{
self thread OrbLoc();
self.OrbStrike = spawn( "script_model", self.OrbLoc );
self.OrbStrike SetModel( "tag_origin" );
self.OrbStrike.angles = ( 270, 0, 0 );
for( i = 0;i < 10;i++ )
{
PlayFxOnTag( fx, self.OrbStrike, "tag_origin" );
}
self.OrbStrike thread FollowCHs( self );
edit = true;
self iPrintlnBold( "Press [{+activate}] To Call In Strike At Marker" );
self iPrintlnBold( "Press [{+melee}] To Abort Strike" );
wait 1;
while( edit )
{
if( self UseButtonPressed() && edit == true && self GetStance() != "prone" )
{
self notify( "OrbitOver" );
self PlayLocalSound( "pa_buzz" );
wait 3;
for( i = 0;i < 20;i++ )
{
PlayFx( fx2, self.OrbLoc );
}
Zombz = GetAiSpeciesArray( "axis" );
Zombz = get_array_of_closest( self.OrbStrike.origin, Zombz, undefined, undefined, 300 );
for( i = 0;i < Zombz.size;i++ )
{
wait( RandomFloatRange( .2, .3 ) );
Zombz[i] maps\_zombiemode_spawner::zombie_head_gib();
Zombz[i] DoDamage( 10000, Zombz[i].origin, self );
PlaySoundatPosition( "nuked", Zombz[i].origin );
}
level.zombie_devgui_power = 1;
level.zombie_vars["zombie_drop_item"] = 1;
level.powerup_drop_count = 0;
level thread maps\_zombiemode_powerups::powerup_drop( self.OrbStrike.origin );
edit = false;
}
if( self MeleeButtonPressed() && edit == true && self GetStance() != "prone" )
{
self PlayLocalSound( "pa_buzz" );
edit = false;
}
wait .01;
}
self notify( "OrbitOver" );
self.OrbStrike Delete();
}
OrbLoc()
{
self endon( "OrbitOver" );
for(;;)
{
eye = self GetEye();
vec = AnglesToForward( self GetPlayerAngles() );
end = ( vec[0] * 100000000, vec[1] * 100000000, vec[2] * 100000000 );
Location = BulletTrace( eye, end, 0, self )[ "position" ];
self.OrbLoc = Location;
wait .01;
}
}
FollowCHs( Me )
{
Me endon( "disconnect" );
Me endon( "death" );
Me endon( "OrbitOver" );
for(;;)
{
if( self.origin != Me.OrbLoc )
{
self MoveTo( Me.OrbLoc, .1 );
}
wait .01;
}
}
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.