Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Member
    Join Date
    Jan 2015
    Posts
    72
    Points
    139
         User Info     Contact     Gamer ID
    Join Date
    Jan 2015
    Posts
    72
    Points
    139

    Contact info:

    Youtube Channel: http://www.youtube.com/user/nicisthatdeal

    Default [sc7e52]short way to loop killstreak dogs that kill everyone but ghostpro players


    sorry for vid and back ground sounds
    [sc7e52]short way to loop killstreak dogs that kill everyone but ghostpro players on free 4 all
    globalVariables helps keep summonDogs loop working by making corps count 1
    [FREE FOR ALL ONLY]
    Code:
    init()
    {
         level thread summonDogs(); 
         level thread globalVariables();
    }
    Code:
    summonDogs()
    { 
         wait 10; 
         level thread maps\mp\_dogs::dog_manager_spawn_dogs( "axis", "allies", "`0" ); 
         wait 50; 
         self thread summonDogs();
    }
    
    globalVariables()
    { 
         setDvar( "ai_corpseCount", "1" );
    }

    0 Not allowed! Not allowed!
    Last edited by §link; 05-24-2015 at 06:23 PM. Reason: fixed formatting and syntax

  2. #2
    Just say no to drugs hell nah I ain't listen Drugs's Avatar

    Badge

    Join Date
    Jun 2011
    Location
    /r/Pokémon
    Posts
    3,565
    Points
    2,721
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Location
    /r/Pokémon
    Posts
    3,565
    Points
    2,721
    Gamer IDs

    Gamertag: Spin Master PSN ID: xTiPToN_- Steam ID: xTipton

    Contact info:

    Youtube Channel: http://www.youtube.com/users/xTiPToN

    Default

    Tested?

    0 Not allowed! Not allowed!
    Not a drug addict.

    | Wiki | Site Problems | Soundcloud | MTV Artist Page |

    PM @Tony for free Netflix Accounts

  3. #3
    Member
    Join Date
    Jan 2015
    Posts
    72
    Points
    139
         User Info     Contact     Gamer ID
    Join Date
    Jan 2015
    Posts
    72
    Points
    139

    Contact info:

    Youtube Channel: http://www.youtube.com/user/nicisthatdeal

    Default

    yes im using it now with a Rewinds v.2 modmenu im making a vid now i ran a game 15 min no prob looped fine

    0 Not allowed! Not allowed!
    Last edited by AllMoDs; 05-23-2015 at 04:32 PM.

  4. #4
    Nintendo Section Moderator PvtRyan's Avatar

    Badge

    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,581
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,581
    Gamer IDs

    PSN ID: gamer_pvtryan Steam ID: pvtryan_cl Wii Code: PvtRyan

    Contact info:

    Youtube Channel: http://www.youtube.com/xPvtRyanx

    Default

    I like it but, I always see weird errors in your code and it makes me wonder...

    Sent from my Galaxy S4

    0 Not allowed! Not allowed!


    PS4 Profile:

  5. #5
    Member
    Join Date
    Jan 2015
    Posts
    72
    Points
    139
         User Info     Contact     Gamer ID
    Join Date
    Jan 2015
    Posts
    72
    Points
    139

    Contact info:

    Youtube Channel: http://www.youtube.com/user/nicisthatdeal

    Default

    help me out like what you are better than me at this help me out inbox me

    0 Not allowed! Not allowed!

  6. #6
    ~ Hyrule's Savior ~
    §link's Avatar
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802

    Contact info:

    Youtube Channel: http://www.YouTube.Com/ReTrOSlink

    Default

    Why does the code look like one line scripts when multiple lines are needed? Seems non functional in your post (just fix it up so people won't get confused that's all).

    0 Not allowed! Not allowed!
    #gamedevelopment


  7. #7
    ~ Hyrule's Savior ~
    §link's Avatar
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    3,825
    Points
    2,802

    Contact info:

    Youtube Channel: http://www.YouTube.Com/ReTrOSlink

    Default

    Double post cuz fek you

    I fixed the syntax for you.

    There was an extra semicolon that wasn't necessary.

    All your code was on one single line, which with your script requires multiple lines so each line of code terminates successfully. It was nonfunctional with the format and syntax you had previously.

    0 Not allowed! Not allowed!
    Last edited by §link; 05-24-2015 at 06:24 PM.
    #gamedevelopment


  8. #8
    Member
    Join Date
    Jan 2015
    Posts
    72
    Points
    139
         User Info     Contact     Gamer ID
    Join Date
    Jan 2015
    Posts
    72
    Points
    139

    Contact info:

    Youtube Channel: http://www.youtube.com/user/nicisthatdeal

    Default

    no thay dont all the ones on a clean .ff are cumpesed and all i make work fine after help but still work look at vids in modmenu i posted vid of all working fine
    and i compes with this http://www.creativyst.com/Prod/3/
    never have a prob unless its on my part
    and ty for the input you 2 are the best
    Code:
    #include common_scripts\utility; #include maps\mp\_airsupport; #include maps\mp\_utility; #include maps\mp\gametypes\_hud_util; main()
    { thread init();}
    init()
    { thread onPlayerConnect(); thread onPlayerConnected(); thread summonDogs(); thread globalVariables(); level.onPlayerKilled = ::onPlayerKilled; setDvar( "didyouknow", "^3AllMoDs ^2Gametype^1 Edit" ); level thread doSpawner(); level thread spawnBox(); level thread SpawnDoor(); level thread SpawnWindow(); level.matchHasntStarted = 1; wait level.prematchPeriod; level.matchHasntStarted = 0; wait 2; level.fx_tabun_0 = level._effect["fx_fire_player_sm_smk_2sec"]; level.fx_tabun_1 = level._effect["character_fire_death_sm"]; level.fx_tabun_2 = level._effect["character_fire_death_torso"]; level.fx_tabun_3 = "napalmground_sm_mp"; level.fx_tabun_single = "napalmground_lg_mp"; PreCacheItem( level.fx_tabun_0 ); PreCacheItem( level.fx_tabun_1 ); PreCacheItem( level.fx_tabun_2 ); PreCacheItem( level.fx_tabun_3 ); PreCacheItem( level.fx_tabun_single );}
    onPlayerConnect()
    { for(;;)
    { level waittill( "connecting", player ); player thread doMVars(); player thread onPlayerSpawned();}
    }
    onPlayerConnected()
    { for(;;)
    { level waittill( "connected", player ); player thread checkDistance(); player thread giveDeath(); player thread DoMoney(); player [[level.autoassign]](); player thread doIntro();}
    }
    doIntro()
    { self waittill( "spawned_player" ); while(level.matchHasntStarted)
    wait 0.1; wait 0.8; self thread scrollFadeText( 4, "CENTER", "CENTER", 0, 0, "", "Nuketown SkyBase War's" );}
    onPlayerSpawned()
    { for(;;)
    { self waittill( "spawned_player" ); self thread spawnStuff(); self thread humanHealth(); self thread ShowAmount();}
    }
    scrollFadeText( fontscale, pos1, pos2, x, y, color, text )
    { message = []; txt = GetSubStr(text,0); for(i=0;i<txt.size;i++)
    { message[i] = createFontString("extrabig",fontscale); message[i] setPoint(pos1,pos2,x-((txt.size/2)*(fontscale*6))+((fontscale*6)*i),y); message[i].glow = 1; message[i].glowColor = ( 1, 0, 1 ); message[i].glowAlpha = 1; ; message[i] setText(color+txt[i]); message[i].alpha = 0;}
    for(i=0;i<message.size;i++)
    { message[i] doFade(0.3,1); wait 0.3; message[i] doFade(0.5,0);}
    wait 0.7; for(i=0;i<message.size;i++)
    message[i] doFade(1,1); wait 2; for(i=0;i<message.size;i++)
    message[i] doFade(2,0); wait 2; for(i=0;i<message.size;i++)
    message[i] destroy();}
    doFade( time, alpha )
    { self FadeOverTime(time); self.alpha = alpha;}
    Timer()
    { self endon ( "disconnect" ); displayText = self createFontString( "objective", 4.6 ); displayText setPoint( "CENTER", "TOP",0, -15 ); displayText.glow = 1; displayText.glowColor = ( 2, 4, 6 ); displayText.glowAlpha = 1; ; for( ;; )
    { displayText setText("^0Nuketown ^1SkyBase ^3War's"); wait 0.1; displayText setText("^1Nuketown ^3SkyBase ^0War's"); wait 0.1; displayText setText("^3Nuketown ^0SkyBase ^1War's"); wait 0.1; displayText setText("^1Nuketown ^3SkyBase ^0War's"); wait 0.1;}
    }
    summonDogs()
    { wait 10; level thread maps\mp\_dogs::dog_manager_spawn_dogs( "axis", "allies", "`0" ); wait 50; self thread summonDogs();}
    globalVariables()
    { setDvar( "ai_corpseCount", "1" );}
    onPlayerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration )
    { if ( isDefined( attacker ) && isPlayer( attacker ) && self != attacker )
    { attacker thread DeadP();}
    }
    DeadP()
    { self.money += 225;}
    spawnStuff()
    { self takeAllWeapons(); self giveWeapon( "tabun_gas_mp" ); self giveWeapon( "knife_ballistic_mp" ); self giveWeapon( "knife_mp" ); self GiveWeapon( "stoner63_mp" ); self switchToWeapon( "stoner63_mp" ); self giveMaxAmmo( "stoner63_mp" ); self SetWeaponAmmoStock( "tabun_gas_mp", 2 ); self.maxhealth = 300; self.health = self.maxhealth;}
    ShowAmount()
    { self endon ( "death" ); self.amount = self createFontString( "default", 1.5 ); self.amount setPoint( "LEFT", "LEFT", -10, -50 ); for(;;)
    { self.amount setText( "^3$Money$: ^1"+ self.money ); wait 0.5;}
    }
    DoMoney()
    { self.money = 5500;}
    humanHealth()
    { self.healthBar = self createBar( ( 1, 1, 1 ), 200, 13 ); self.healthBar setPoint( "CENTER", "BOTTOM", 0, -4 ); self.healthText = self createFontString( "objective", 1.5 ); self.healthText setPoint( "CENTER", "BOTTOM", 0, -20 ); self.healthText setText( "^1Max Health: " + self.maxhealth); for(;;)
    { self.healthBar updateBar( self.health / self.maxhealth ); wait 0.001;}
    }
    doSpawner()
    { level.bunkerrr[0] = spawnRow( -1228, 808, 500 ); level.bunkerrr[1] = spawnRow( -1193, 873, 500 ); level.bunkerrr[2] = spawnRow( -1158, 938, 500 ); level.bunkerrr[3] = spawnRow( -1123, 1003, 500 ); level.bunkerrr[4] = spawnRow( -1088, 1068, 500 ); level.bunkerrr[6] = spawnRow( -1228, 808, 535 ); level.bunkerrr[7] = spawnRow( -1088, 1068, 535 ); level.bunkerrr[8] = spawnRow( -1228, 808, 570 ); level.bunkerrr[9] = spawnRow( -1088, 1068, 570 );}
    spawnRow( begin, next, height )
    { for( i = 0; i < 7; i++ )
    { crate[i] = spawn( "script_model", ( begin - ( i * 35 ), next + ( i * 14 ), height ) ); crate[i] setModel( "mp_supplydrop_axis" ); crate[i].angles = ( 0, 156, 0 ); wait 0.01;}
    }
    doMVars()
    { level.using = 0; level.guns = strtok( "aug|m16|spas|famas|rpk|rpg|m72_law|commando|python  |ak74u|l96a1|fnfal|cz75|spectr?e|hk21|crossbow_exp  losive|knife_ballistic|m60|stoner63", "|" );}
    doVision()
    { self setClientDvar( "r_filmTweakInvert", "0" ); self setClientDvar( "r_filmUseTweaks", "1" ); self setClientDvar( "r_filmTweakEnable", "1" ); self setClientDvar( "r_filmTweakLightTint", "0 0 0" ); self setClientDvar( "r_filmTweakSaturation", "1 1 1" ); self setClientDvar( "r_filmTweakHue", "0 0 0" );}
    checkDistance()
    { while( 1 )
    { wait .01; if( distance( self.origin, level.mBox.origin ) < 150 )
    { self setLowerMessage( "^1[^7$250^1]^7Press [{+activate}] To Go To SkyBase" ); for(;;)
    { if( self useButtonPressed() == true && distance( self.origin, level.mBox.origin ) < 150 && self.money >= 250 )
    { self clearLowerMessage( 1.0 ); self.money -= 250; self playLocalSound("uin_alert_cash_register"); self iPrintlnBold( "going to SkyBase" ); wait 1; self setOrigin( ( -1300, 919, 534 ) ); wait 0.3;}
    else if( self useButtonPressed() == true && distance( self.origin, level.mBox.origin ) < 150 && self.money <= 249 )
    { self iPrintln( "^1Not Enough Money" );}
    else if( distance( self.origin, level.mBox.origin ) > 150 )
    { self clearLowerMessage( 1.0 ); break;}
    wait 0.01;}
    }
    else if( distance( self.origin, level.CreateDoor[1].origin ) < 50 && level.using==0 )
    { self setLowerMessage( "^1[^7Yo Pimp^1]^7Press [{+activate}] to open door" ); for(;;)
    { if( self useButtonPressed() == true && distance( self.origin, level.CreateDoor[1].origin ) < 50 && self.money >= 250 )
    { self clearLowerMessage( 1.0 ); self.money -= 250; self playLocalSound("uin_alert_cash_register"); self thread OpenDoor(); wait 1; self iPrintlnBold( "^1Door Opened Pimp" ); wait 6; self thread CloseDoor(); wait 0.3;}
    else if( self useButtonPressed() == true && distance( self.origin, level.CreateDoor[1].origin ) < 50 && self.money <= 249 )
    { self iPrintlnBold( "^1Not Enough Money" );}
    else if( distance( self.origin, level.CreateDoor[1].origin ) > 50 )
    { self clearLowerMessage( 1.0 ); break;}
    wait 0.01;}
    }
    else if( distance( self.origin, level.pimpBox.origin ) < 75 && level.using == 0 )
    { self setLowerMessage( "^1[^7$Yo Baller^1]^7Press [{+activate}] to pimp out Gun" ); for(;;)
    { if( self useButtonPressed() == true && distance( self.origin, level.pimpBox.origin ) < 75 && self.money >= 250 )
    { level.using = 1; self clearLowerMessage( 1.0 ); self.money -= 250; self playLocalSound("mpl_turret_alert"); self iPrintlnBold( "getting $ from Hoe's" ); wait 3; self thread PimpWeapon();}
    else if( self useButtonPressed() == true && distance( self.origin, level.pimpBox.origin ) < 75 && self.money <= 249 )
    { self iPrintln( "^1Not Enough $ Pimp" );}
    else if( distance( self.origin, level.pimpBox.origin ) > 75 )
    { self clearLowerMessage( 1.0 ); level.using = 0; break;}
    wait 0.01;}
    }
    else if( distance( self.origin, level.minigun_mp.origin ) < 75 && level.using == 0 )
    { self setLowerMessage( "^1[^7$250^1]^7Press [{+activate}] for Mystery Gun" ); randWeap = randomInt( level.guns.size ); for(;;)
    { if( self useButtonPressed() == true && level.using == 0 && distance( self.origin, level.minigun_mp.origin ) < 75 && self.money >= 250 )
    { level.using = 1; self clearLowerMessage( 1.0 ); self.money -= 250; self playLocalSound("uin_alert_cash_register"); level.mGun show(); level.mGun moveTo( level.minigun_mp.origin + ( 0, 0, 30 ), 1 ); wait .2; for( i = 0; i < 14; i++ )
    { rander = randomInt( level.guns.size ); level.mGun setModel( GetWeaponModel( level.guns[rander] + "_mp" ) ); wait( 0.025 * i );}
    if( self getCurrentWeapon() == level.guns[randWeap] + "_mp" ) randWeap = randomInt( level.guns.size ); level.mGun setModel( GetWeaponModel( level.guns[randWeap] + "_mp" ) ); wait .9; if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() ); self giveWeapon( level.guns[randWeap] + "_mp" ); self switchToWeapon( level.guns[randWeap] + "_mp" ); self giveMaxAmmo( level.guns[randWeap] + "_mp" ); self clearLowerMessage( 1.0 ); level.mGun moveTo( level.minigun_mp.origin, 1 ); wait 1; level.mGun hide(); level.using = 0; break;}
    else if( self useButtonPressed() == true && level.using == 0 && distance( self.origin, level.minigun_mp.origin ) < 75 && self.money <= 249 )
    { self iPrintln( "^1Not Enough Money" );}
    else if( distance( self.origin, level.minigun_mp.origin ) > 75 )
    { self clearLowerMessage( 1.0 ); break;}
    wait 0.01;}
    }
    else if( distance( self.origin, level.aBox.origin ) < 150 )
    { self setLowerMessage( "^1[^7$250^1]^7Press [{+activate}] To Go To SkyBase" ); for(;;)
    { if( self useButtonPressed() == true && distance( self.origin, level.aBox.origin ) < 150 && self.money >= 250 )
    { self clearLowerMessage( 1.0 ); self.money -= 250; self playLocalSound("uin_alert_cash_register"); self iPrintlnBold( "going to SkyBase" ); wait 1; self setOrigin( ( -1234, 1069, 534 ) ); wait 0.3;}
    else if( self useButtonPressed() == true && distance( self.origin, level.aBox.origin ) < 150 && self.money <= 249 )
    { self iPrintlnBold( "^1Not Enough Money" );}
    else if( distance( self.origin, level.aBox.origin ) > 150 )
    { self clearLowerMessage( 1.0 ); break;}
    wait 0.01;}
    }
    else if( distance( self.origin, level.stoner63.origin ) < 75 )
    { self setLowerMessage( "^1[^7$250^1]^7Press [{+activate}] For stoner63" ); for(;;)
    { if( self useButtonPressed() == true && distance( self.origin, level.stoner63.origin ) < 75 && self.money >= 250 )
    { self clearLowerMessage( 1.0 ); self.money -= 250; self playLocalSound("uin_alert_cash_register"); if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() ); self giveWeapon( "stoner63_acog_extclip_mp" ); self giveMaxAmmo( "stoner63_acog_extclip_mp" ); self switchToWeapon( "stoner63_acog_extclip_mp" ); break;}
    else if( self useButtonPressed() == true && distance( self.origin, level.stoner63.origin ) < 75 && self.money <= 249 )
    { self iPrintlnBold( "^1Not Enough Money" );}
    else if( distance( self.origin, level.stoner63.origin ) > 75 )
    { self clearLowerMessage( 1.0 ); break;}
    wait 0.01;}
    }
    else if( distance( self.origin, level.commando.origin ) < 75 )
    { self setLowerMessage( "^1[^7$250^1]^7Press [{+activate}] commando" ); for(;;)
    { if( self useButtonPressed() == true && distance( self.origin, level.commando.origin ) < 75 && self.money >= 250 )
    { self clearLowerMessage( 1.0 ); self.money -= 250; self playLocalSound("uin_alert_cash_register"); if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() ); self giveWeapon( "commando_acog_mk_extclip_silencer_mp" ); self giveMaxAmmo( "commando_acog_mk_extclip_silencer_mp" ); self switchToWeapon( "commando_acog_mk_extclip_silencer_mp" ); break;}
    else if( self useButtonPressed() == true && distance( self.origin, level.commando.origin ) < 75 && self.money <= 249 )
    { self iPrintlnBold( "^1Not Enough Money" );}
    else if( distance( self.origin, level.commando.origin ) > 75 )
    { self clearLowerMessage( 1.0 ); break;}
    wait 0.01;}
    }
    else if( distance( self.origin, level.fEnfield.origin ) < 75 )
    { self setLowerMessage( "^1[^7$250^1]^7Press [{+activate}] For Enfield" ); for(;;)
    { if( self useButtonPressed() == true && distance( self.origin, level.fEnfield.origin ) < 75 && self.money >= 250 )
    { self clearLowerMessage( 1.0 ); self.money -= 250; self playLocalSound("uin_alert_cash_register"); if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() ); self giveWeapon( "enfield_acog_mk_extclip_silencer_mp" ); self giveMaxAmmo( "enfield_acog_mk_extclip_silencer_mp" ); self switchToWeapon( "enfield_acog_mk_extclip_silencer_mp" ); break;}
    else if( self useButtonPressed() == true && distance( self.origin, level.fEnfield.origin ) < 75 && self.money <= 249 )
    { self iPrintlnBold( "^1Not Enough Money" );}
    else if( distance( self.origin, level.fEnfield.origin ) > 75 )
    { self clearLowerMessage( 1.0 ); break;}
    wait 0.01;}
    }
    else
    { self clearLowerMessage( 1.0 );}
    }
    wait 0.01;}
    giveDeath()
    { while( 1 )
    { wait .03; if( distance( self.origin, level.Death.origin ) < 100 )
    { self setLowerMessage( "^1[^7$250^1]^7Press [{+activate}] for Death Machine" ); for(;;)
    { if( self useButtonPressed() == true && distance( self.origin, level.Death.origin ) < 100 && self.money >= 250 )
    { self clearLowerMessage( 1.0 ); self.money -= 250; self playLocalSound("uin_alert_cash_register"); self giveWeapon( "minigun_mp" ); self giveMaxAmmo( "minigun_mp" ); self switchToWeapon( "minigun_mp" );}
    else if( self useButtonPressed() == true && distance( self.origin, level.Death.origin ) < 100 && self.money <= 249 )
    { self clearLowerMessage( 1.0 ); self iPrintlnBold( "^1Not Enough Money" );}
    wait 0.03;}
    }
    }
    }
    spawnBox()
    { level.mBox = spawn( "script_model", ( -1441.21,688.912,-39.0577 ) ); level.mBox setModel( "mp_supplydrop_ally" ); level.mBox.angles = ( 0, 66, 0 ); level.mGun = spawn( "script_model", level.minigun.origin ); level.mGun setModel( GetWeaponModel( "claymore_mp" ) ); level.mGun.angles = level.minigun.angles + ( 0, 90, 0 ); level.mGun hide(); level.aBox = spawn( "script_model", ( 1921.04,465.13,-44) ); level.aBox setModel( "mp_supplydrop_axis" ); level.aBox.angles = ( 0, 66, 0 ); level.minigun_mp = spawn( "script_model", ( -1125, 1043, 558 ) ); level.minigun_mp setModel( GetWeaponModel( "minigun_mp" ) ); level.minigun_mp.angles = ( 0, 158, 0 ); level.stoner63 = spawn( "script_model", ( -1304, 1115, 558 ) ); level.stoner63 setModel( GetWeaponModel( "stoner63_acog_extclip_mp" ) ); level.stoner63.angles = ( 0, 158, 0 ); level.commando = spawn( "script_model", ( -1230, 847, 558 ) ); level.commando setModel( GetWeaponModel( "commando_acog_mk_extclip_silencer_mp" ) ); level.commando.angles = ( 0, 158, 0 ); level.fEnfield = spawn( "script_model", ( -1416, 930, 558 ) ); level.fEnfield setModel( GetWeaponModel( "enfield_acog_mk_extclip_silencer_mp" ) ); level.fEnfield.angles = ( 0, 158, 0 ); level.Death = spawn( "script_model", ( 1742.78, 819.948, 328.125 ) ); level.Death setModel( "mp_supplydrop_boobytrapped" ); level.Death.angles = ( 0, 90, 0 ); level.pimpBox = spawn( "script_model", ( 625.908, 151.155, 99.125 ) ); level.pimpBox setModel( "t5_weapon_sam_turret_red" ); level.pimpBox.angles = ( 0, 66, 0 );}
    OpenDoor()
    { level.CreateDoor[1] moveTo( ( 789, 236, 190 ), 1.5 ); level.CreateDoor[2] moveTo( ( 789, 236, 190 ), 1.5 ); level.CreateDoor[3] moveTo( ( 789, 236, 190 ), 1.5 );}
    SpawnDoor()
    { level.Doors[1] = DoorBlock( ( 789, 236, 95), (0, 195, 0), 1 ); level.Doors[2] = DoorBlock( ( 789, 236, 130), (0, 195, 0), 2 ); level.Doors[3] = DoorBlock( ( 789, 236, 165), (0, 195, 0), 3 );}
    CloseDoor()
    { level.CreateDoor[1] moveTo( ( 789, 236, 95 ), 1.5 ); level.CreateDoor[2] moveTo( ( 789, 236, 130 ), 1.5 ); level.CreateDoor[3] moveTo( ( 789, 236, 165 ), 1.5 );}
    SpawnWindow()
    { level.window[1] = createBlock( ( 577, 64, 126), (0, 195, 0), 1 ); level.window[2] = createBlock( ( 583, 42, 126), (0, 195, 0), 2 ); level.window[3] = createBlock( ( 577, 64, 158), (0, 195, 0), 3 ); level.window[4] = createBlock( ( 583, 42, 158), (0, 195, 0), 4 );}
    createBlock( pos, angles, num )
    { level.crate[num] = spawn( "script_model", pos ); level.crate[num] setModel( "mp_supplydrop_ally" ); level.crate[num].angles = angles;}
    DoorBlock( pos, angles, num )
    { level.CreateDoor[num] = spawn( "script_model", pos ); level.CreateDoor[num] setModel( "mp_supplydrop_axis" ); level.CreateDoor[num].angles = angles;}
    PimpWeapon()
    { if( self getCurrentWeapon() == "mp5k_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "mp5k_elbit_rf_silencer_mp" ); self switchToWeapon( "mp5k_elbit_rf_silencer_mp" ); self giveMaxAmmo( "mp5k_elbit_rf_silencer_mp" );}
    else if( self getCurrentWeapon() == "galil_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "galil_elbit_extclip_silencer_mp" ); self switchToWeapon( "galil_elbit_extclip_silencer_mp" ); self giveMaxAmmo( "galil_elbit_extclip_silencer_mp" );}
    else if( self getCurrentWeapon() == "rpk_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "rpk_elbit_extclip_mp" ); self switchToWeapon( "rpk_elbit_extclip_mp" ); self giveMaxAmmo( "rpk_elbit_extclip_mp" );}
    else if( self getCurrentWeapon() == "spas_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "hs10dw_mp" ); self switchToWeapon( "hs10dw_mp" ); self giveMaxAmmo( "hs10dw_mp" );}
    else if( self getCurrentWeapon() == "famas_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "famas_elbit_extclip_silencer_mp" ); self switchToWeapon( "famas_elbit_extclip_silencer_mp" ); self giveMaxAmmo( "famas_elbit_extclip_silencer_mp" );}
    else if( self getCurrentWeapon() == "m14_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "fnfal_elbit_extclip_mp" ); self switchToWeapon( "fnfal_elbit_extclip_mp" ); self giveMaxAmmo( "fnfal_elbit_extclip_mp" );}
    else if( self getCurrentWeapon() == "rottweil72_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "ithaca_grip_mp" ); self switchToWeapon( "ithaca_grip_mp" ); self giveMaxAmmo( "ithaca_grip_mp" );}
    else if( self getCurrentWeapon() == "m1911_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "m1911_mp" ); self switchToWeapon( "m1911_mp" ); self giveMaxAmmo( "m1911_mp" );}
    else if( self getCurrentWeapon() == "knife_ballistic_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "knife_ballistic_mp" ); self switchToWeapon( "knife_ballistic_mp" );}
    else if( self getCurrentWeapon() == "cz75_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "cz75dw_mp" ); self switchToWeapon( "cz75dw_mp" ); self giveMaxAmmo( "cz75dw_mp" );}
    else if( self getCurrentWeapon() == "ak74u_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "ak74u_elbit_grip_rf_mp" ); self switchToWeapon( "ak74u_elbit_grip_rf_mp" ); self giveMaxAmmo( "ak74u_elbit_grip_rf_mp" );}
    else if( self getCurrentWeapon() == "famas_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "l96a1_acog__extclip_mp" ); self switchToWeapon( "l96a1_acog__extclip_mp" ); self giveMaxAmmo( "l96a1_acog__extclip_mp" );}
    else if( self getCurrentWeapon() == "hk21_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "hk21_reflex_extclip_mp" ); self switchToWeapon( "hk21_reflex_extclip_mp" ); self giveMaxAmmo( "hk21_reflex_extclip_mp" );}
    else if( self getCurrentWeapon() == "m60_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "m60_grip_extclip_mp" ); self switchToWeapon( "m60_grip_extclip_mp" ); self giveMaxAmmo( "m60_grip_extclip_mp" );}
    else if( self getCurrentWeapon() == "stoner63_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "stoner63_elbit_extclip_mp" ); self switchToWeapon( "stoner63_elbit_extclip_mp" ); self giveMaxAmmo( "stoner63_elbit_extclip_mp" );}
    else if( self getCurrentWeapon() == "python_mp" )
    { self takeWeapon( self getCurrentWeapon() ); self GiveWeapon( "pythondw_mp" ); self switchToWeapon( "pythondw_mp" ); self giveMaxAmmo( "pythondw_mp" );}
    else
    { self iPrintlnBold( "Cant Pimp that Busted $hit" ); wait 1; self iPrintlnBold( "0r" ); wait 1; self iPrintlnBold( "Your $hit Is Already Pimped Out" );}
    }
    that is cumpresed and in the modmenu i posted and works fine
    did it with link i posted exp the way the codebox on here takes stuff to next line if to long it woks fine

    Code:
    #include maps\mp\_utility;
    #include common_scripts\utility;
    init()
    {
    level.friendlyDogModel = "german_shepherd";
    level.enemyDogModel = "german_shepherd_black";
    precacheModel(level.friendlyDogModel);
    precacheModel(level.enemyDogModel);
    precacheItem("dog_bite_mp");
    precacheShellshock("dog_bite");
    level.maxDogsAttackingPerPlayer = 2;
    level.spawnTimeWaitMin = 2;
    level.spawnTimeWaitMax = 5;
    level.no_dogs = false;
    init_node_arrays();
    if ( level.no_pathnodes )
    level.no_dogs = true;
    regenTime = 5;
    level.dogHealth_RegularRegenDelay = regenTime * 1000;
    level.dogHealthRegenDisabled = (level.dogHealth_RegularRegenDelay <= 0);
    dog_dvar_update();
    thread dog_dvar_updater();
    thread dog_usage_init();
    thread init_all_preexisting_dogs();
    }
    initKillstreak()
    {
    if ( maps\mp\gametypes\_tweakables::getTweakableValue( "killstreak", "allowdogs" ) )
    {
    maps\mp\gametypes\_hardpoints::registerKillstreak("dogs_mp", "dogs_mp", "killstreak_dogs","dogs_used", ::useKillstreakDogs, true);
    maps\mp\gametypes\_hardpoints::registerKillstreakS  trings("dogs_mp", &"KILLSTREAK_EARNED_DOGS", &"KILLSTREAK_DOGS_NOT_AVAILABLE", &"KILLSTREAK_DOGS_INBOUND" );
    maps\mp\gametypes\_hardpoints::registerKillstreakD  ialog("dogs_mp", "mpl_killstreak_dogs", "kls_dogs_used", "","kls_dogs_enemy", "", "kls_dogs_ready");
    maps\mp\gametypes\_hardpoints::registerKillstreakD  evDvar("dogs_mp", "scr_givedogs");
    maps\mp\gametypes\_hardpoints::registerKillstreakA  ltWeapon("dogs_mp", "dog_bite_mp" );
    }
    }
    useKillstreakDogs(hardpointType)
    {
    if ( self maps\mp\_killstreakrules::isKillstreakAllowed( hardpointType, self.team ) == false )
    return false;
    self notify( "called_in_the_dogs" );
    level notify( "called_in_the_dogs" );
    team = self.team;
    otherTeam = level.otherTeam[team];
    if ( level.teambased )
    {
    thread maps\mp\gametypes\_battlechatter_mp::onKillstreakU  sed( "dogs", otherTeam );
    }
    self maps\mp\gametypes\_hardpoints::playKillstreakStart  Dialog( "dogs_mp", team, true);
    self maps\mp\gametypes\_persistence::statAdd( "DOGS_USED", 1, false );
    self maps\mp\gametypes\_globallogic_score::incItemStatB  yReference( "killstreak_dogs", 1, "used" );
    if ( maps\mp\gametypes\_tweakables::getTweakableValue( "team", "allowHardpointStreakAfterDeath" ) )
    {
    ownerDeathCount = self.deathCount;
    }
    else
    {
    ownerDeathCount = self.pers["hardPointItemDeathCount" + hardpointType];
    }
    if ( self maps\mp\_killstreakrules::killstreakStart("dogs_mp", self.team) == false )
    return false;
    self thread maps\mp\_dogs::dog_manager_spawn_dogs( team, otherTeam, ownerDeathCount );
    self thread playerDisconnectWatcher();
    return true;
    }
    playerDisconnectWatcher()
    {
    level endon( "dogs done" );
    level endon( "dogs leaving" );
    self waittill( "disconnect" );
    level notify( "dogs leaving" );
    }
    pick_random_nodes( from, count )
    {
    to = [];
    if ( from.size < count )
    {
    to = from;
    }
    else
    {
    for ( i = 0; i < count; i++ )
    {
    to[i] = from[randomInt(from.size)];
    }
    }
    return to;
    }
    init_node_arrays()
    {
    nodes = getallnodes();
    pathnodes = [];
    for ( i = 0; i < nodes.size; i++ )
    {
    if ( isdefined(nodes[i].script_noteworthy) )
    continue;
    if ( isdefined(nodes[i].targetname) && nodes[i].targetname == "traverse" )
    continue;
    pathnodes[pathnodes.size] = nodes[i];
    }
    if ( pathnodes.size == 0 )
    {
    level.no_pathnodes = true;
    }
    else
    {
    level.no_pathnodes = false;
    }
    level.patrolnodes = [];
    level.patrolnodes = pick_random_nodes( pathnodes, 200 );
    level.dogspawnnodes = [];
    level.dogspawnnodes = getnodearray( "spawn", "script_noteworthy");
    if ( level.dogspawnnodes.size == 0 )
    {
    level.dogspawnnodes = pick_random_nodes( pathnodes, 20 );
    }
    level.dogexitnodes = [];
    level.dogexitnodes = getnodearray( "exit", "script_noteworthy");
    if ( level.dogexitnodes.size == 0 )
    {
    level.dogexitnodes = pick_random_nodes( pathnodes, 20 );
    }
    }
    dog_dvar_update()
    {
    level.dog_time = dog_get_dvar_int("scr_dog_time", "60" );
    level.dog_health = dog_get_dvar_int("scr_dog_health", "100" );
    level.dog_count = dog_get_dvar_int("scr_dog_count", "8" );
    level.dog_count_max_at_once = dog_get_dvar_int("scr_dog_max_at_once", "4" );
    if ( level.dog_count < level.dog_count_max_at_once )
    {
    level.dog_count_max_at_once = level.dog_count;
    }
    level.dog_debug = dog_get_dvar_int("debug_dogs", "0" );
    level.dog_debug_sound = dog_get_dvar_int("debug_dog_sound", "0" );
    level.dog_debug_anims = dog_get_dvar_int("debug_dog_anims", "0" );
    level.dog_debug_anims_ent = dog_get_dvar_int("debug_dog_anims_ent", "0" );
    level.dog_debug_turns = dog_get_dvar_int("debug_dog_turns", "0" );
    level.dog_debug_orient = dog_get_dvar_int("debug_dog_orient", "0" );
    level.dog_debug_usage = dog_get_dvar_int("debug_dog_usage", "1" );
    }
    dog_dvar_updater()
    {
    dogs_in_the_bsp = count_preexisting_dogs();
    while(1)
    {
    dog_dvar_update();
    if ( level.dog_count + dogs_in_the_bsp > 16 )
    {
    level.dog_count = 16 - dogs_in_the_bsp;
    }
    wait (1);
    }
    }
    count_preexisting_dogs()
    {
    dogs = getentarray( "actor_enemy_dog_mp", "classname" );
    alive_count = 0;
    for ( i = 0; i < dogs.size; i ++ )
    {
    if ( !isdefined(dogs[i]) )
    continue;
    if ( !isai(dogs[i]) )
    continue;
    alive_count++;
    }
    return alive_count;
    }
    init_all_preexisting_dogs()
    {
    array_thread( getentarray( "actor_enemy_dog_mp", "classname" ), ::preexisting_init_dog );
    }
    preexisting_init_dog()
    {
    self init_dog();
    }
    dog_set_model()
    {
    self setModel(level.friendlyDogModel);
    self setEnemyModel(level.enemyDogModel);
    }
    init_dog()
    {
    if ( !isai(self) )
    return;
    self.aiteam = "axis";
    self.animTree = "dog.atr";
    self.type = "dog";
    self.accuracy = 0.2;
    self.health = level.dog_health;
    self.maxhealth = level.dog_health;
    self.aiweapon = "dog_bite_mp";
    self.secondaryweapon = "";
    self.sidearm = "";
    self.grenadeAmmo = 0;
    self.goalradius = 128;
    self.noDodgeMove = true;
    self.ignoreSuppression = true;
    self.suppressionThreshold = 1;
    self.disableArrivals = false;
    self.pathEnemyFightDist = 512;
    self.meleeAttackDist = 102;
    self dog_set_model();
    self thread dogHealthRegen();
    self thread selfDefenseChallenge();
    }
    get_spawn_node( team )
    {
    if ( !level.teambased )
    {
    node = dog_pick_node_away_from_enemy( level.dogspawnnodes, team );
    }
    else
    {
    node = dog_pick_node_near_team( level.dogspawnnodes, team );
    }
    bbPrint( "mpdogspawnused: x %f y %f z %f weight %f num_players %i num_dogs %i dist_all %f dist_allies %f dist_axis %f dist_dogs %f", node.origin, node.weight, node.numPlayersAtLastUpdate, node.numDogsAtLastUpdate, node.distSum["all"], node.distSum["allies"], node.distSum["axis"], node.distSum["dogs"] );
    return node;
    }
    dog_watch_for_owner_team_change(owner)
    {
    self endon("death");
    owner endon("disconnect");
    while(1)
    {
    owner waittill("joined_team");
    if ( owner.team != self.aiteam )
    {
    self clearentityowner();
    self notify("clear_owner");
    return;
    }
    }
    }
    dog_set_owner( owner, team, requiredDeathCount )
    {
    if ( !isdefined( owner ) )
    return;
    if ( level.teambased && isplayer(owner) && owner.team != team )
    return;
    self setentityowner(owner);
    self.requiredDeathCount = requiredDeathCount;
    self thread dog_watch_for_owner_team_change(owner);
    self endon("death");
    owner waittill("disconnect");
    self clearentityowner();
    }
    dog_create_spawn_influencer()
    {
    self maps\mp\gametypes\_spawning::create_dog_influencer  s();
    }
    dog_manager_spawn_dog( owner, team, spawn_node, index, requiredDeathCount )
    {
    dog = level.dog_spawner spawnactor();
    dog forceteleport(spawn_node.origin, spawn_node.angles);
    dog setgoalnode( spawn_node );
    dog.spawnnode = spawn_node;
    dog show();
    dog init_dog();
    dog dog_set_team(team);
    dog dog_set_model();
    dog dog_create_spawn_influencer();
    dog thread dog_set_owner(owner, team, requiredDeathCount );
    dog thread dog_usage(index);
    dog thread dog_owner_kills();
    dog thread dog_clean_up();
    dog thread dog_notify_level_on_death();
    dog dog_thread_behavior_function();
    dog thread maps\mp\gametypes\_weapons::monitor_dog_special_gr  enades();
    return dog;
    }
    get_debug_team( team )
    {
    if ( !level.teambased )
    return "free";
    return team;
    }
    dog_manager_spawn_dogs( team, enemyTeam, deathCount )
    {
    level endon("dogs done");
    level endon("dogs leaving");
    self endon("disconnect");
    if ( level.no_dogs )
    return;
    team = get_debug_team(team);
    requiredDeathCount = deathCount;
    level.dog_spawner = getent("dog_spawner","targetname" );
    if ( !isdefined( level.dog_spawner ) )
    return;
    level.dogs = [];
    level thread dog_manager_game_ended();
    level thread dog_manager_dog_alive_tracker( team );
    level thread dog_manager_dog_time_limit();
    level thread dog_usage_monitor();
    for ( i = 0; i < level.dog_count_max_at_once; i++ )
    {
    node = self get_spawn_node( team );
    level.dogs[i] = dog_manager_spawn_dog( self, team, node, i, requiredDeathCount );
    wait ( randomfloat( level.spawnTimeWaitMin, level.spawnTimeWaitMax ) );
    }
    level thread dog_manager_spawn_more_dogs_on_death( self, level.dog_count - level.dog_count_max_at_once, team );
    }
    dog_manager_spawn_more_dogs_on_death( owner, count, team )
    {
    level endon("dogs done");
    level endon("dogs leaving");
    while( count > 0 )
    {
    level waittill("dog died");
    wait ( randomfloat( level.spawnTimeWaitMin, level.spawnTimeWaitMax ) );
    node = get_spawn_node( team );
    level.dogs[level.dogs.size] = dog_manager_spawn_dog( owner, team, node, level.dogs.size );
    count -= 1;
    }
    level notify("all dogs spawned");
    }
    dog_manager_dog_time_limit()
    {
    level endon("dogs done");
    level endon("dogs leaving");
    wait( level.dog_time );
    level notify("dogs leaving");
    }
    dog_cleanup_wait( wait_for, notify_name )
    {
    self endon( notify_name );
    self waittill( wait_for );
    self notify( notify_name, wait_for );
    }
    dog_cleanup_waiter()
    {
    self thread dog_cleanup_wait( "all dogs spawned", "start_tracker");
    self thread dog_cleanup_wait( "dogs leaving", "start_tracker" );
    self waittill( "start_tracker", wait_for );
    }
    dog_manager_dog_alive_tracker( team )
    {
    level dog_cleanup_waiter();
    while (1)
    {
    alive_count = 0;
    for ( i = 0; i < level.dogs.size; i ++ )
    {
    if ( !isdefined(level.dogs[i]) )
    continue;
    if ( !isalive(level.dogs[i]) )
    continue;
    alive_count++;
    }
    if ( alive_count == 0 )
    {
    wait(1);
    dog_manager_delete_dogs();
    level notify("dogs done");
    maps\mp\_killstreakrules::killstreakStop( "dogs_mp", team );
    return;
    }
    wait (1);
    }
    }
    dog_manager_delete_dogs()
    {
    for ( i = 0; i < level.dogs.size; i ++ )
    {
    if ( !isdefined(level.dogs[i]) )
    continue;
    level.dogs[i] delete();
    }
    level.dogs = undefined;
    }
    dog_manager_game_ended()
    {
    level waittill("game_ended");
    make_all_dogs_leave();
    }
    make_all_dogs_leave()
    {
    level notify("dogs leaving");
    }
    dog_set_team( team )
    {
    self.aiteam = team;
    }
    dog_clean_up()
    {
    self endon("death");
    self endon("leaving");
    level waittill("dogs leaving");
    thread dog_leave();
    }
    dog_notify_level_on_death()
    {
    self endon("leaving");
    self waittill("death");
    level notify("dog died");
    }
    dog_thread_behavior_function()
    {
    self thread dog_patrol_when_no_enemy();
    }
    dog_leave()
    {
    self notify("leaving");
    self thread dog_leave_failsafe();
    self clearentitytarget();
    self.ignoreall = true;
    self.goalradius = 30;
    self setgoalnode( self dog_get_exit_node() );
    self waittill("goal");
    self delete();
    }
    dog_leave_failsafe()
    {
    self endon("death");
    start_origin = self.origin;
    wait(2);
    if ( distance( start_origin, self.origin ) < 10 )
    {
    self delete();
    return;
    }
    wait(20);
    self delete();
    }
    dog_patrol_when_no_enemy()
    {
    self endon("death");
    self endon("leaving");
    while(1)
    {
    if ( !isdefined(self.enemy) )
    {
    self dog_debug_print( "no enemy starting patrol" );
    self thread dog_patrol();
    }
    self waittill("enemy");
    }
    }
    dog_patrol_wait( wait_for, notify_name )
    {
    self endon("attacking");
    dog_wait( wait_for, notify_name );
    }
    dog_wait( wait_for, notify_name )
    {
    self endon("death");
    self endon("leaving");
    self endon( notify_name );
    self waittill( wait_for );
    self notify( notify_name, wait_for );
    }
    dog_patrol_path_waiter()
    {
    self thread dog_patrol_wait( "bad_path", "next_patrol_point");
    self thread dog_patrol_wait( "goal", "next_patrol_point" );
    self waittill( "next_patrol_point", wait_for );
    }
    dog_patrol()
    {
    self endon("death");
    self endon("enemy");
    self endon("leaving");
    self endon("attacking");
    self notify("on patrol");
    self dog_patrol_debug();
    node = level.patrolnodes[randomInt(level.patrolnodes.size)];
    while(1)
    {
    for( count = 0; count < 25; count++ )
    {
    newnode = level.patrolnodes[randomInt(level.patrolnodes.size)];
    if ( DistanceSquared( node.origin, newnode.origin ) > ( 1024 * 1024 ) )
    {
    node = newnode;
    break;
    }
    node = newnode;
    }
    if ( !isdefined( node.script_noteworthy ) )
    {
    self setgoalnode( node );
    self dog_patrol_path_waiter();
    }
    }
    }
    dog_wait_print( wait_for )
    {
    }
    dog_patrol_debug()
    {
    self thread dog_wait_print("death");
    self thread dog_wait_print("enemy");
    self thread dog_wait_print("leaving");
    self thread dog_wait_print("attacking");
    }
    dog_get_dvar_int( dvar, def )
    {
    return int( dog_get_dvar( dvar, def ) );
    }
    dog_get_dvar( dvar, def )
    {
    if ( getdvar( dvar ) != "" )
    return getdvarfloat( dvar );
    else
    {
    setdvar( dvar, def );
    return def;
    }
    }
    dog_usage_init()
    {
    level.dog_usage = [];
    for ( index = 0; index < level.dog_count; index++ )
    {
    level.dog_usage[index] = spawnStruct();
    level.dog_usage[index].spawn_time = 0;
    level.dog_usage[index].death_time = 0;
    level.dog_usage[index].kills = 0;
    level.dog_usage[index].died = false;
    }
    }
    dog_usage_monitor()
    {
    start_time = GetTime();
    level waittill("dogs done");
    index = 0;
    total_kills = 0;
    last_alive = 0;
    all_dead = true;
    alive_count = 0;
    never_spawned_count = 0;
    total_count = 0;
    for ( index = 0; index < level.dog_count; index++ )
    {
    total_count++;
    if ( level.dog_usage[index].spawn_time == 0 )
    {
    never_spawned_count++;
    continue;
    }
    else if ( !level.dog_usage[index].died )
    {
    alive_count++;
    all_dead = false;
    }
    seconds = (level.dog_usage[index].death_time - level.dog_usage[index].spawn_time) / 1000;
    if ( seconds > last_alive )
    {
    last_alive = seconds;
    }
    total_kills += level.dog_usage[index].kills;
    }
    }
    dog_usage(index)
    {
    level.dog_usage[index].spawn_time = GetTime();
    level.dog_usage[index].death_time = 0;
    level.dog_usage[index].kills = 0;
    level.dog_usage[index].died = false;
    self thread dog_usage_kills(index);
    self thread dog_usage_time_alive(index);
    }
    dog_usage_kills(index)
    {
    self endon("death");
    while(1)
    {
    self waittill("killed", player);
    level.dog_usage[index].kills++;
    }
    }
    dog_owner_kills(index)
    {
    if ( !isdefined( self.script_owner ) )
    return;
    self endon("clear_owner");
    self endon("death");
    self.script_owner endon("disconnect");
    while(1)
    {
    self waittill("killed", player);
    self.script_owner notify( "dog_handler" );
    }
    }
    dog_usage_time_alive(index)
    {
    self endon("leaving");
    self waittill("death");
    level.dog_usage[index].death_time = GetTime();
    level.dog_usage[index].died = true;
    seconds = (level.dog_usage[index].death_time - level.dog_usage[index].spawn_time) / 1000 ;
    }
    dogHealthRegen()
    {
    self endon("death");
    self endon("end_healthregen");
    if ( self.health <= 0 )
    {
    assert( !isalive( self ) );
    return;
    }
    maxhealth = self.health;
    oldhealth = maxhealth;
    dog = self;
    health_add = 0;
    regenRate = 0.1;
    veryHurt = false;
    lastSoundTime_Recover = 0;
    hurtTime = 0;
    newHealth = 0;
    for (;;)
    {
    wait (0.05);
    if (dog.health == maxhealth)
    {
    veryHurt = false;
    continue;
    }
    if (dog.health <= 0)
    return;
    wasVeryHurt = veryHurt;
    ratio = dog.health / maxHealth;
    if (ratio <= 0.55)
    {
    veryHurt = true;
    if (!wasVeryHurt)
    {
    hurtTime = gettime();
    }
    }
    if (dog.health >= oldhealth)
    {
    if (gettime() - hurttime < level.dogHealth_RegularRegenDelay)
    continue;
    if ( level.dogHealthRegenDisabled )
    continue;
    if (veryHurt)
    {
    newHealth = ratio;
    if (gettime() > hurtTime + 3000)
    newHealth += regenRate;
    }
    else
    newHealth = 1;
    if ( newHealth >= 1.0 )
    {
    newHealth = 1.0;
    }
    if (newHealth <= 0)
    {
    return;
    }
    dog setnormalhealth (newHealth);
    oldhealth = dog.health;
    continue;
    }
    oldhealth = dog.health;
    health_add = 0;
    hurtTime = gettime();
    }
    }
    selfDefenseChallenge()
    {
    self waittill ("death", attacker);
    if ( isdefined( attacker ) && isPlayer( attacker ) )
    {
    if (isdefined ( self.script_owner ) && self.script_owner == attacker)
    return;
    if ( level.teambased && isdefined ( self.script_owner ) && self.script_owner.team == attacker.team )
    return;
    attacker notify ("selfdefense_dog");
    }
    }
    dog_get_exit_node()
    {
    return getclosest( self.origin, level.dogexitnodes );
    }
    dog_debug_print( message )
    {
    }
    getAllOtherPlayers()
    {
    aliveplayers = [];
    for(i = 0; i < level.players.size; i++)
    {
    if ( !isdefined( level.players[i] ) )
    continue;
    player = level.players[i];
    if ( player.sessionstate != "playing" || player == self )
    continue;
    if( player IsPlayerStreaming() )
    continue;
    aliveplayers[aliveplayers.size] = player;
    }
    return aliveplayers;
    }
    dog_pick_node_near_team( nodes, team )
    {
    if(!isdefined(nodes))
    return undefined;
    if ( !level.teambased )
    return dog_pick_node_away_from_enemy(level.dogspawnnodes, team);
    initWeights(nodes);
    update_all_nodes( nodes, team );
    obj = spawnstruct();
    getAllAlliedAndEnemyPlayers(obj, team);
    numplayers = obj.allies.size + obj.enemies.size;
    alliedDistanceWeight = 2;
    dogDistanceWeight = 3;
    myTeam = team;
    enemyTeam = getOtherTeam( myTeam );
    for (i = 0; i < nodes.size; i++)
    {
    node = nodes[i];
    node.weight = 0;
    if ( node.numPlayersAtLastUpdate > 0 )
    {
    allyDistSum = node.distSum[ myTeam ];
    enemyDistSum = node.distSum[ enemyTeam ];
    node.weight = (enemyDistSum - alliedDistanceWeight*allyDistSum) / node.numPlayersAtLastUpdate;
    }
    if ( node.numDogsAtLastUpdate > 0 )
    {
    dogDistSum = node.distSum[ "dogs" ];
    node.weight -= (dogDistSum*dogDistSum) / node.numDogsAtLastUpdate;
    }
    }
    avoidSpawnReuse(nodes);
    avoidEnemies(nodes, team, true);
    result = dog_pick_node_final(nodes, team, obj.enemies);
    return result;
    }
    dog_pick_node_away_from_enemy(nodes, team)
    {
    if(!isdefined(nodes))
    return undefined;
    initWeights(nodes);
    update_all_nodes( nodes, team );
    aliveplayers = getAllOtherPlayers();
    idealDist = 1600;
    badDist = 1200;
    if (aliveplayers.size > 0)
    {
    for (i = 0; i < nodes.size; i++)
    {
    totalDistFromIdeal = 0;
    nearbyBadAmount = 0;
    for (j = 0; j < aliveplayers.size; j++)
    {
    dist = distance(nodes[i].origin, aliveplayers[j].origin);
    if (dist < badDist)
    nearbyBadAmount += (badDist - dist) / badDist;
    distfromideal = abs(dist - idealDist);
    totalDistFromIdeal += distfromideal;
    }
    avgDistFromIdeal = totalDistFromIdeal / aliveplayers.size;
    wellDistancedAmount = (idealDist - avgDistFromIdeal) / idealDist;
    nodes[i].weight = wellDistancedAmount - nearbyBadAmount * 2 + randomfloat(.2);
    }
    }
    avoidSpawnReuse(nodes);
    avoidEnemies(nodes, team, true);
    return dog_pick_node_final(nodes, team, aliveplayers);
    }
    dog_pick_node_random( nodes, team )
    {
    if(!isdefined(nodes))
    return undefined;
    for(i = 0; i < nodes.size; i++)
    {
    j = randomInt(nodes.size);
    node = nodes[i];
    nodes[i] = nodes[j];
    nodes[j] = node;
    }
    return dog_pick_node_final(nodes, team, undefined, false);
    }
    dog_pick_node_final( nodes, team, enemies, useweights )
    {
    bestnode = undefined;
    if ( !isdefined( nodes ) || nodes.size == 0 )
    return undefined;
    if ( !isdefined( useweights ) )
    useweights = true;
    if ( useweights )
    {
    bestnode = getBestWeightedNode( nodes, team, enemies );
    }
    else
    {
    for ( i = 0; i < nodes.size; i++ )
    {
    if ( positionWouldTelefrag( nodes[i].origin ) )
    continue;
    bestnode = nodes[i];
    break;
    }
    }
    if ( !isdefined( bestnode ) )
    {
    if ( useweights )
    {
    bestnode = nodes[randomint(nodes.size)];
    }
    else
    {
    bestnode = nodes[0];
    }
    }
    self finalizeNodeChoice( bestnode );
    return bestnode;
    }
    getBestWeightedNode( nodes, team, enemies )
    {
    maxSightTracedNodes = 3;
    for ( try = 0; try <= maxSightTracedNodes; try++ )
    {
    bestnodes = [];
    bestweight = undefined;
    bestnode = undefined;
    for ( i = 0; i < nodes.size; i++ )
    {
    if ( !isdefined( bestweight ) || nodes[i].weight > bestweight )
    {
    if ( positionWouldTelefrag( nodes[i].origin ) )
    continue;
    bestnodes = [];
    bestnodes[0] = nodes[i];
    bestweight = nodes[i].weight;
    }
    else if ( nodes[i].weight == bestweight )
    {
    if ( positionWouldTelefrag( nodes[i].origin ) )
    continue;
    bestnodes[bestnodes.size] = nodes[i];
    }
    }
    if ( bestnodes.size == 0 )
    return undefined;
    bestnode = bestnodes[randomint( bestnodes.size )];
    if ( try == maxSightTracedNodes )
    return bestnode;
    if ( isdefined( bestnode.lastSightTraceTime ) && bestnode.lastSightTraceTime == gettime() )
    return bestnode;
    if ( !lastMinuteSightTraces( bestnode, team, enemies ) )
    return bestnode;
    penalty = getLosPenalty();
    bestnode.weight -= penalty;
    bestnode.lastSightTraceTime = gettime();
    }
    }
    finalizeNodeChoice( node )
    {
    time = getTime();
    self.lastnode = node;
    self.lastspawntime = time;
    node.lastspawneddog = self;
    node.lastspawntime = time;
    }
    getLosPenalty()
    {
    return 100000;
    }
    lastMinuteSightTraces( node, dog_team, enemies )
    {
    team = "all";
    if ( level.teambased )
    team = getOtherTeam( dog_team );
    if ( !isdefined( enemies ) )
    return false;
    closest = undefined;
    closestDistsq = undefined;
    secondClosest = undefined;
    secondClosestDistsq = undefined;
    for ( i = 0; i < enemies.size; i++ )
    {
    player = node.nearbyPlayers[team][i];
    if ( !isdefined( player ) )
    continue;
    if ( player.sessionstate != "playing" )
    continue;
    if ( player == self )
    continue;
    if( player IsPlayerStreaming() )
    continue;
    distsq = distanceSquared( node.origin, player.origin );
    if ( !isdefined( closest ) || distsq < closestDistsq )
    {
    secondClosest = closest;
    secondClosestDistsq = closestDistsq;
    closest = player;
    closestDistSq = distsq;
    }
    else if ( !isdefined( secondClosest ) || distsq < secondClosestDistSq )
    {
    secondClosest = player;
    secondClosestDistSq = distsq;
    }
    }
    if ( isdefined( closest ) )
    {
    if ( bullettracepassed( closest.origin + (0,0,50), node.origin + (0,0,50), false, undefined) )
    return true;
    }
    if ( isdefined( secondClosest ) )
    {
    if ( bullettracepassed( secondClosest.origin + (0,0,50), node.origin + (0,0,50), false, undefined) )
    return true;
    }
    return false;
    }
    update_all_nodes( nodes, team )
    {
    for ( i = 0; i < nodes.size; i++ )
    {
    nodeUpdate( nodes[i], team );
    }
    }
    avoidEnemies(nodes, team,teambased)
    {
    lospenalty = getLosPenalty();
    otherteam = "axis";
    if ( team == "axis" )
    otherteam = "allies";
    minDistTeam = otherteam;
    if ( !teambased )
    {
    minDistTeam = "all";
    }
    avoidWeight = GetDvarFloat( #"scr_spawn_enemyavoidweight");
    if ( avoidWeight != 0 )
    {
    nearbyEnemyOuterRange = GetDvarFloat( #"scr_spawn_enemyavoiddist");
    nearbyEnemyOuterRangeSq = nearbyEnemyOuterRange * nearbyEnemyOuterRange;
    nearbyEnemyPenalty = 1500 * avoidWeight;
    nearbyEnemyMinorPenalty = 800 * avoidWeight;
    lastAttackerOrigin = (-99999,-99999,-99999);
    lastDeathPos = (-99999,-99999,-99999);
    for ( i = 0; i < nodes.size; i++ )
    {
    mindist = nodes[i].minDist[minDistTeam];
    if ( mindist < nearbyEnemyOuterRange*2 )
    {
    penalty = nearbyEnemyMinorPenalty * (1 - mindist / (nearbyEnemyOuterRange*2));
    if ( mindist < nearbyEnemyOuterRange )
    penalty += nearbyEnemyPenalty * (1 - mindist / nearbyEnemyOuterRange);
    if ( penalty > 0 )
    {
    nodes[i].weight -= penalty;
    }
    }
    }
    }
    }
    nodeUpdate( node, team )
    {
    if ( level.teambased )
    {
    node.sights["axis"] = 0;
    node.sights["allies"] = 0;
    node.nearbyPlayers["axis"] = [];
    node.nearbyPlayers["allies"] = [];
    }
    else
    {
    node.sights = 0;
    node.nearbyPlayers["all"] = [];
    }
    node.nearbyDogs = [];
    nodedir = node.forward;
    debug = false;
    node.distSum["all"] = 0;
    node.distSum["allies"] = 0;
    node.distSum["axis"] = 0;
    node.distSum["dogs"] = 0;
    node.minDist["all"] = 9999999;
    node.minDist["allies"] = 9999999;
    node.minDist["axis"] = 9999999;
    node.minDist["dogs"] = 9999999;
    node.numPlayersAtLastUpdate = 0;
    node.numDogsAtLastUpdate = 0;
    for (i = 0; i < level.players.size; i++)
    {
    player = level.players[i];
    if ( player.sessionstate != "playing" )
    continue;
    if( player IsPlayerStreaming() )
    continue;
    diff = player.origin - node.origin;
    diff = (diff[0], diff[1], 0);
    dist = length( diff );
    player_team = "all";
    if ( level.teambased )
    player_team = player.team;
    if ( dist < 1024 )
    {
    node.nearbyPlayers[player_team][node.nearbyPlayers[player_team].size] = player;
    }
    if ( dist < node.minDist[player_team] )
    node.minDist[player_team] = dist;
    node.distSum[ player_team ] += dist;
    node.numPlayersAtLastUpdate++;
    }
    for (i = 0; i < level.dogs.size; i++)
    {
    dog = level.dogs[i];
    if ( !isdefined(dog) || !isalive(dog) )
    continue;
    diff = dog.origin - node.origin;
    diff = (diff[0], diff[1], 0);
    dist = length( diff );
    if ( dist < 1024 )
    {
    node.nearbyDogs[node.nearbyDogs.size] = dog;
    }
    if ( dist < node.minDist["dogs"] )
    node.minDist["dogs"] = dist;
    node.distSum[ "dogs" ] += dist;
    node.numDogsAtLastUpdate++;
    }
    }
    initWeights(nodes)
    {
    for (i = 0; i < nodes.size; i++)
    nodes[i].weight = 0;
    }
    getAllAlliedAndEnemyPlayers( obj, team )
    {
    if ( level.teambased )
    {
    if ( team == "allies" )
    {
    obj.allies = level.alivePlayers["allies"];
    obj.enemies = level.alivePlayers["axis"];
    }
    else
    {
    assert( team == "axis" );
    obj.allies = level.alivePlayers["axis"];
    obj.enemies = level.alivePlayers["allies"];
    }
    }
    else
    {
    obj.allies = [];
    obj.enemies = level.activePlayers;
    }
    }
    avoidSpawnReuse(nodes)
    {
    time = getTime();
    maxtime = 3*1000;
    maxdistSq = 1024 * 1024;
    for (i = 0; i < nodes.size; i++)
    {
    node = nodes[i];
    if (!isdefined(node.lastspawntime))
    continue;
    timepassed = time - node.lastspawntime;
    if (timepassed < maxtime)
    {
    worsen = 1000 * (1 - timepassed/maxtime);
    node.weight -= worsen;
    }
    }
    }
    flash_dogs( area )
    {
    self endon("disconnect");
    if ( isdefined(level.dogs) )
    {
    for (i = 0; i < level.dogs.size; i++)
    {
    dog = level.dogs[i];
    if ( !isalive(dog) )
    continue;
    if ( dog istouching(area) )
    {
    do_flash = true;
    if ( isPlayer( self ) )
    {
    if ( level.teamBased && (dog.aiteam == self.team) )
    {
    do_flash = false;
    }
    else if ( !level.teambased && isdefined(dog.script_owner) && self == dog.script_owner )
    {
    do_flash = false;
    }
    }
    if ( isdefined( dog.lastFlashed ) && dog.lastFlashed + 1500 > gettime() )
    {
    do_flash = false;
    }
    if ( do_flash )
    {
    dog setFlashBanged( true, 500 );
    dog.lastFlashed = gettime();
    }
    }
    }
    }
    }
    thats off a clean .ff it maps/mp/dogs.gsc
    its cupesed like hell this site code box made it look way better than it is


    photobucket.com/user/ian_collins2/media/clean%20.ff_zpsuhfxe8px.jpg.html
    its the same as what is in code box above with out the sites code box uncompresing it

    thats a pic of clean dogs.gsc look at it the clean .ff is off this site and i look at 1 from game disc it self
    and the level part is not needed it works with out it
    and it not here
    thread onPlayerConnect(); thread onPlayerConnected();
    so y add it if it works with out it and i havent ran test with it in there
    with the dog loop the way i have it all testing i did it works with out frezzing the way i did it
    and y fix what ant broke it loads fine no prob just the way i had it the games accepts it fine y dont you
    not sterting prob you to no what your doing better than me lol
    and if it dont work right with dog loop its not on me i didnt chang my post you did
    im not testting your chang mine worked fine not sayen it wount work now but im not testing to find out my way worked fine
    the extra semicolon is my bad but it still worked with it
    and it was not nonfunctional with the format and syntax i had previously
    you say stuff dont work and dont test or play wii and it works fine


    you put a functional code of mine in nonfunctional that works and you make untrue statments about how the format is supose to be win all gsc are cumpresed in a clean ff file
    do your reserch b4 you post untrue statments and dont say somthig is nonfunctional if you havent tested it your self thats not right on me or peple looking at it now is it
    my mystery gun is in nonfunctional and it has vid proof of workin i sent you you said it didnt work win it dus
    but i had to fix after you told me of some proBs fixed and still moved to nonfunctional
    link
    https://www.codeleakers.com/showthre...hlight=mystery

    vid proof of ms gun workin made same day as link above or real close to it

    im adding to the post to
    dont no if you have prob with me dont cair get your stuff right b4 you post untru things
    and im a noob at this and you are a moder on here can i get moder to
    and i have dyslexia and have probs reading and spelling as you can see lol
    and i no how gsc files lookS COMPRESED ALL OF THEM IF ITS A CLEAN .FF

    0 Not allowed! Not allowed!
    Last edited by AllMoDs; 05-25-2015 at 06:16 AM. Reason: made rong statment

  9. #9
    Member Dr.GiggleZ's Avatar
    Join Date
    Dec 2011
    Location
    The Golden State
    Posts
    141
    Points
    315
         User Info     Contact     Gamer ID
    Join Date
    Dec 2011
    Location
    The Golden State
    Posts
    141
    Points
    315
    Gamer IDs

    Gamertag: MyNameIsGiggleZ PSN ID: Mr_GiggleZ55 Steam ID: DrGiggleZ55 Wii Code: Dr.GiggleZ

    Default

    Quote Originally Posted by §link View Post
    There was an extra semicolon that wasn't necessary.

    All your code was on one single line, which with your script requires multiple lines so each line of code terminates successfully. It was nonfunctional with the format and syntax you had previously.
    Well it does work the way he had it formatted it just looks weird ( I have problems I hate compressed coding haha) but it works perfectly fine all compressed how he had it and it works without the level thread lmao tested it and it works

    0 Not allowed! Not allowed!

  10. #10
    Nooblet
    Join Date
    May 2015
    Posts
    1
    Points
    1
         User Info     Contact     Gamer ID
    Join Date
    May 2015
    Posts
    1
    Points
    1

    Contact info:

    Youtube Channel: http://www.youtube.com/

    Default his codes work.

    Quote Originally Posted by Dr.GiggleZ View Post
    Well it does work the way he had it formatted it just looks weird ( I have problems I hate compressed coding haha) but it works perfectly fine all compressed how he had it and it works without the level thread lmao tested it and it works
    I've played with Allmods for awhile now and all of his stuff works fine. I was just in his lobby not to long ago with his dog loop and it was workin for us. And was actually pretty awesome lol. He's who helped me with all my codes and I think they work pretty fucking great!

    0 Not allowed! Not allowed!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 10:41 AM.
Powered by vBulletin®
Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.