Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Опубликовано:

 

Hello, i will use a SAM Turret. The Code from nextgenupdate.com works not for FourDeltaOne. Can you help me please?

 

Regards from Germany

BODYGUARD

 

Error: uninitialised variable 'owner' at file maps/mp/killstreaks/_new.gsc, line 49:
team = owner.pers["team"];

 

You need to define

 

owner =self;

 

But you will probably still get errors further on in the code, take it all from my patch exactly as its written and it will work .

 

SamTurret()
{
       self endon ( "disconnect" );
       self endon ( "death" );
       self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
       self.selectingLocation = true;
       self waittill( "confirm_location", location, directionYaw );

       NapalmLoc = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
       NapalmLoc += (0, 0, 400);
       self endLocationSelection();
       self.selectingLocation = undefined;  
       self thread killstreakNotify(self.name,"SAM TURRET IN COMING");        
       Plane = spawn("script_model", NapalmLoc+(-15000, 0, 5000) );
       Plane setModel( "vehicle_ac130_low_mp" );
       Plane.angles = (45, 119.004, 0);
       Plane playLoopSound( "veh_ac130_dist_loop" );
       Plane moveTo( NapalmLoc + (15000, 0, 2500), 10);
       wait 15;
       bomb = spawn("script_model", Plane.origin );
       bomb setModel( "projectile_hellfire_missile" );
       bomb.angles = self.origin;
       wait 1.6;
       TurretBox= spawn("script_model",bomb.origin-(0,0,0) );
       TurretBox setModel("com_plasticcase_beige_big");    
       TurretBox.angles=bomb.angles;
       wait 2;
       self playsound("capture_a");
       TurretBox moveto(bomb.origin+(0,0,90),2);
       wait 1.5;      
       sky = VectorToAngles( (self.origin+(0,0,500)) - (self.origin ));
       self playsound("capture_c");
       self rotateto(sky, 2);
       wait 5;
       for(;
       {
       self playsound("weap_cobra_missile_fire");
       self rotateYaw(360,4);
       wait 4;
       self rotateYaw(-360,4);
       wait 4;
       self thread SamFireSetup();
       }
}
SamFireSetup()
{
self endon("chopper_down");
self endon("disconnect");
team = owner.pers["team"]; //<---- Bug?
for(;
{
	if( (level.teambased) && (isDefined(level.chopper)) && (level.chopper.team !=team))
	{
		self thread SamFire();
		self notify("chopper_down");
	}
       }
}
SamFire()
{
   self iPrintlnBold("Now wait to an helicopter come");
   targets = GetTargetList();
   targetsInReticle = [];
   foreach ( target in targets )
   {
       if ( !isDefined( target ) )
           continue;
       if ( bulletTracePassed( self.origin, target.origin, false, self ) )
           targetsInReticle[targetsInReticle.size] = target;
   }
   sortedTargets = SortByDistance( targetsInReticle, self.origin );
   self.stingerTarget = sortedTargets[0];
   rocket = MagicBullet( "stinger_mp", self.origin, self.stingerTarget.origin, self );
   rocket Missile_SetTargetEnt( self.stingerTarget );
   rocket Missile_SetFlightmodeDirect();
}

GetTargetList()
{
   targets = [];
   if ( level.teamBased )
   {
       if ( IsDefined( level.chopper ) && ( level.chopper.team != self.team || level.chopper.owner == self ) )
           targets[targets.size] = level.chopper;
       if ( isDefined( level.ac130player ) && level.ac130player.team != self.team )
           targets[targets.size] = level.ac130.planemodel;
       if ( isDefined( level.harriers) )
       {
           foreach( harrier in level.harriers )
           {
               if ( isDefined( harrier ) && ( harrier.team != self.team || ( isDefined( harrier.owner ) && harrier.owner == self ) ) )
                   targets[targets.size] = harrier;
           }
       }
       if ( level.UAVModels[level.otherTeam[self.team]].size )
       {
           foreach ( UAV in level.UAVModels[level.otherTeam[self.team]] )
               targets[targets.size] = UAV;
       }
       if ( isDefined( level.littleBird ) )
       {
           foreach ( bird in level.littleBird )
           {
               if ( !isDefined( bird ) )
                   continue;
               if ( self.team != bird.owner.team || self == bird.owner )
                   targets[targets.size] = bird;
           }
       }
   }
   else
   {
       if ( IsDefined( level.chopper ) && ( level.chopper.owner != self ) ) ///check for teams
           targets[targets.size] = level.chopper;
       if ( isDefined( level.ac130player ) )
           targets[targets.size] = level.ac130.planemodel;
       if ( isDefined( level.harriers) )
       {
           foreach( harrier in level.harriers )
           {
               if ( isDefined( harrier ) )
                   targets[targets.size] = harrier;
           }
       }
       if ( level.UAVModels.size )
       {
           foreach ( ownerGuid, UAV in level.UAVModels )
           {
               if ( isDefined( UAV.owner ) && UAV.owner == self )
                   continue;
               targets[targets.size] = UAV;
           }
       }
   }
   return targets;
}
killStreakNotify(user,ks)
{
self endon("disconnect");
       foreach(P in level.players)
       {
       P.ksText setPoint( "RIGHT", "CENTER", 270, -50);
       P.ksText setText("^3"+user+"\n^7"+ks);
       wait 5;
       P.ksText moveOverTime(0.5);
       P.ksText setPoint( "CENTER", "CENTER", 600, -50);
       }
}

 

 

Credits:

247Yamato - For his awesomes tutorials.

SatanicAmerican - For his Killstreak Notify.

IELIITEMODZX - For teaching me the triggers and all that.

 

Quelle: http://www.nextgenupdate.com/forums/cal ... urret.html

Featured Replies

Опубликовано:

^ add a semicolon to the end of that btw ;)

Опубликовано:
  • Автор

Hmmm.... now start funktion. But we have more Problem :shock:

 

1. AC-130 no disappears

2. No rockets

3. No SAM Turret

 

 


[    185744] Sent heartbeat to iw4.prod.fourdeltaone.net
[    204788] script runtime error: potential infinite loop in script - killing thread.
[    204788] Error: @ 472600

Опубликовано:
Hmmm.... now start funktion. But we have more Problem :shock:

 

1. AC-130 no disappears

2. No rockets

3. No SAM Turret

 

 


[    185744] Sent heartbeat to iw4.prod.fourdeltaone.net
[    204788] script runtime error: potential infinite loop in script - killing thread.
[    204788] Error: @ 472600

 

 

 

 

yah might want to contact the guy who made it on NGU or remake it (looks like shit anyway)

 

 

The one in the video is not the code your using btw

Опубликовано:
  • Автор

yah might want to contact the guy who made it on NGU or remake it (looks like shit anyway)

 

The one in the video is not the code your using btw

 

Okay.... i have now from DaftVader the SAM Code. DaftVader say this works for MW2! Console say unknown Skript error. I fix the "team = self.pers" and now say the Console this here:

 

******* script compile error *******
Howdy there, fella' - it seems you made a mistake!
Error: bad syntax at file _samturret.gsc, line 2098:
for(;
*
************************************

 

Here is the SAM Turret Code:

http://pastebin.com/9rzAs1Nb

Опубликовано:
  • Автор

 

Not at all. :3

 

You forgot the ;

 

Okay THX... i fixed. Now say this here:

 

gamename: IW4
gamedate: Jan 14 2010
Error: 
******* script compile error *******
Error: unknown function: Error: @ 289476
************************************
********************
ERROR: script compile error
unknown function

(see console for details)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.