BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
Search
 
 

Display results as :
 


Rechercher Advanced Search

December 2024
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

Gametype Help

2 posters

Go down  Message [Page 1 of 1]

1Gametype Help Empty Gametype Help 2/18/2015, 6:29 am

[STG]Sgt.Ghost

[STG]Sgt.Ghost
Modder & Code Porter

Resize GSC add gametype tested and freezes and nothing works but if i delete and test it it works need help.

http://pastebin.com/0q6rcH8P


_________________
Gametype Help Cod-gh10
Gametype Help Coollo10

2Gametype Help Empty Re: Gametype Help 2/18/2015, 8:11 am

Bully@WiiPlaza

Bully@WiiPlaza
 
 

Since you're probably trying to port this, make sure that the stuff you want to load exists. It must be related to code that runs when you load the map and not when you play the actual gametype.

So from what you posted, it must be something from the init() function:
Code:
PreCacheModel("projectile_cbu97_clusterbomb");
 
level._effect["fx_mp_nuked_nuclear_explosion"] = loadfx("maps/mp_maps/fx_mp_nuked_nuclear_explosion");

However, the first one exists on CoD 4 and then 2nd one on Black Ops so it should be good on Black Ops. Hmm, maybe show more of the code? I don't think that's all you've added or changed.


_________________
Gametype Help YBjg74I

3Gametype Help Empty Re: Gametype Help 2/18/2015, 12:08 pm

[STG]Sgt.Ghost

[STG]Sgt.Ghost
Modder & Code Porter

I fixed it but still working on it here and there this is the game type script.

Code:
#include common_scripts\utility;
#include maps\mp\_airsupport;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

init()
{
   thread onPlayerConnect();
   thread onPlayerConnected();
}
onPlayerConnect()
{
   for(;;)
   {
      level waittill( "connecting", player );
      player thread onPlayerSpawned();
      player thread onJoinedSpectators();
   }
}
onPlayerConnected()
{
   for(;;)
   {
      level waittill( "connected", player );
      self thread maps\mp\gametypes\_hud_message::hintMessage("GUNSHIP BATTLE by AZUMIKKEL");
      self thread maps\mp\gametypes\_hud_message::hintMessage("youtube.com/^2MPKILLER100");
   }
}
onPlayerSpawned()
{
   self endon("disconnect");
   for(;;)
   {
      self waittill("spawned_player");
      self thread maps\mp\gametypes\_hud::fadeToBlackForXSec( 0.0, 4, 0, 1 );
      self hide();
      wait 2;
      self freeze_player_controls( true );
      self maps\mp\_helicopter::useKillstreakHelicopter();
      self.health = 9999999;
      self.maxhealth = self.health;
      self takeAllWeapons();
      self giveWeapon("napalm_mp");
      self switchToWeapon("napalm_mp");
   }
}
onJoinedSpectators()
{
   self endon( "disconnect" );
   for(;;)
   {
      self waittill( "joined_spectators" );
   }
}
onDeath()
{
   self endon("disconnect");
   for(;;)
   {
      self waittill("death");
      self thread maps\mp\_helicopter::destroyHelicopter();
   }
}
onTimeup()
{
   self endon("disconnect");
   self endon("death");
   self waittill("heli_timeup");
   self.health = 1;
}

Also, your killstreak rules need this in order to work. Also, it needs to be compressed in order to fit. if its not you have to resize it.

Code:
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include common_scripts\utility;
init()
{
   level.killstreakrules = [];
   level.killstreaktype = [];
   createRule( "vehicle", 99, 99);
   createRule( "firesupport", 99, 99);
   createRule( "airsupport", 99, 99);
   createRule( "playercontrolledchopper", 99, 99);
   createRule( "chopperInTheAir", 99, 99);
   createRule( "chopper", 99, 99);
   createRule( "dog", 99, 99);
   createRule( "turret", 99, 99);
   createRule( "weapon", 99, 99);
   createRule( "satellite", 99, 99);
   createRule( "supplydrop", 99, 99);
   createRule( "rcxd", 99, 99);
   createRule( "targetableent", 99, 99);
   addKillstreakToRule( "helicopter_mp", "vehicle", true, true );
   addKillstreakToRule( "helicopter_mp", "chopper", true, true );
   addKillstreakToRule( "helicopter_mp", "playercontrolledchopper", false, true );
   addKillstreakToRule( "helicopter_mp", "chopperInTheAir", true, false );
   addKillstreakToRule( "helicopter_mp", "targetableent", true, true );
   addKillstreakToRule( "helicopter_x2_mp", "vehicle", true, true );
   addKillstreakToRule( "helicopter_x2_mp", "chopper", true, true );
   addKillstreakToRule( "helicopter_x2_mp", "playercontrolledchopper", false, true );
   addKillstreakToRule( "helicopter_x2_mp", "chopperInTheAir", true, false );
   addKillstreakToRule( "helicopter_x2_mp", "targetableent", true, true );
   addKillstreakToRule( "helicopter_comlink_mp", "vehicle", true, true );
   addKillstreakToRule( "helicopter_comlink_mp", "chopper", true, true );
   addKillstreakToRule( "helicopter_comlink_mp", "playercontrolledchopper", false, true );
   addKillstreakToRule( "helicopter_comlink_mp", "chopperInTheAir", true, false );
   addKillstreakToRule( "helicopter_comlink_mp", "targetableent", true, true );
   addKillstreakToRule( "rcbomb_mp", "rcxd", true, true );
   addKillstreakToRule( "supply_drop_mp", "vehicle", true, true );
   addKillstreakToRule( "supply_drop_mp", "supplydrop", true, true );
   addKillstreakToRule( "supply_drop_mp", "targetableent", true, true );
   addKillstreakToRule( "supply_station_mp", "vehicle", true, true );
   addKillstreakToRule( "supply_station_mp", "supplydrop", true, true );
   addKillstreakToRule( "supply_station_mp", "targetableent", true, true );
   addKillstreakToRule( "tow_turret_drop_mp", "vehicle", true, true );
   addKillstreakToRule( "turret_drop_mp", "vehicle", true, true );
   addKillstreakToRule( "tow_turret_drop_mp", "supplydrop", true, true );
   addKillstreakToRule( "turret_drop_mp", "supplydrop", true, true );
   addKillstreakToRule( "autoturret_mp", "turret", true, true );
   addKillstreakToRule( "auto_tow_mp", "turret", true, true );
   addKillstreakToRule( "minigun_mp", "weapon", true, true );
   addKillstreakToRule( "m202_flash_mp", "weapon", true, true );
   addKillstreakToRule( "mp40_drop_mp", "weapon", true, true );
   addKillstreakToRule( "dogs_mp", "dog", true, true );
   addKillstreakToRule( "artillery_mp", "firesupport", true, true );
   addKillstreakToRule( "mortar_mp", "firesupport", true, true );
   addKillstreakToRule( "napalm_mp", "vehicle", true, true );
   addKillstreakToRule( "napalm_mp", "airsupport", true, true );
   addKillstreakToRule( "airstrike_mp", "vehicle", true, true );
   addKillstreakToRule( "airstrike_mp", "airsupport", true, true );
   addKillstreakToRule( "radardirection_mp", "satellite", true, true );
   addKillstreakToRule( "radar_mp", "targetableent", true, true );
   addKillstreakToRule( "counteruav_mp", "targetableent", true, true );
}
createRule( rule, maxAllowable, maxAllowablePerTeam )
{
   if ( !level.teambased )
   {
      if ( maxAllowable > maxAllowablePerTeam )
      {
         maxAllowable = maxAllowablePerTeam;
      }
   }
   level.killstreakrules[rule] = spawnstruct();
   level.killstreakrules[rule].cur = 0;
   level.killstreakrules[rule].curTeam = [];
   level.killstreakrules[rule].max = maxAllowable;
   level.killstreakrules[rule].maxPerTeam = maxAllowablePerTeam;
}
addKillstreakToRule( hardpointType, rule, countTowards, checkAgainst )
{
   if ( !isdefined (level.killstreaktype[hardpointType] ) ) level.killstreaktype[hardpointType] = [];
   keys = GetArrayKeys( level.killstreaktype[hardpointType] );
   assert( isdefined(level.killstreakrules[rule] ) );
   if ( !isdefined( level.killstreaktype[hardpointType][rule] ) ) level.killstreaktype[hardpointType][rule] = spawnstruct();
   level.killstreaktype[hardpointType][rule].counts = countTowards;
   level.killstreaktype[hardpointType][rule].checks = checkAgainst;
}
killstreakStart( hardpointType, team, hacked )
{
   if ( self isKillstreakAllowed( hardpointType, team ) == false ) return false;
   assert ( isdefined ( hardpointType ) );
   if( !IsDefined( hacked ) ) hacked = false;
   if ( isdefined( level.killstreaks[hardpointType] ) && isdefined( level.killstreaks[hardpointType].inboundtext ) && !hacked ) level thread maps\mp\_popups::DisplayKillstreakTeamMessageToAll( hardpointType, self );
   keys = GetArrayKeys( level.killstreaktype[hardpointType] );
   for ( i = 0;i < keys.size;i++ )
   {
      if ( !level.killstreaktype[hardpointType][keys[i]].counts ) continue;
      assert( isdefined(level.killstreakrules[keys[ i ]] ) );
      level.killstreakrules[keys[ i ]].cur++;
      if ( level.teambased )
      {
         if ( !isdefined( level.killstreakrules[keys[ i ]].curTeam[team] ) ) level.killstreakrules[keys[ i ]].curTeam[team] = 0;
         level.killstreakrules[keys[ i ]].curTeam[team]++;
      }
   }
   return true;
}
killstreakStop( hardpointType, team )
{
   assert ( isdefined ( hardpointType ) );
   keys = GetArrayKeys( level.killstreaktype[hardpointType] );
   for ( i = 0;i < keys.size;i++ )
   {
      if ( !level.killstreaktype[hardpointType][keys[i]].counts ) continue;
      assert( isdefined(level.killstreakrules[keys[ i ]] ) );
      level.killstreakrules[keys[ i ]].cur--;
      assert (level.killstreakrules[keys[ i ]].cur >= 0 );
      if ( level.teambased )
      {
         assert( isdefined( team ) );
         assert( isdefined( level.killstreakrules[keys[ i ]].curTeam[team] ) );
         level.killstreakrules[keys[ i ]].curTeam[team]--;
         assert (level.killstreakrules[keys[ i ]].curTeam[team] >= 0 );
      }
   }
}
isKillstreakAllowed( hardpointType, team )
{
   assert ( isdefined ( hardpointType ) );
   isAllowed = true;
   keys = GetArrayKeys( level.killstreaktype[hardpointType] );
   for ( i = 0;i < keys.size;i++ )
   {
      if ( !level.killstreaktype[hardpointType][keys[i]].checks ) continue;
      if ( level.killstreakrules[keys[ i ]].max != 0 )
      {
         if (level.killstreakrules[keys[ i ]].cur >= level.killstreakrules[keys[ i ]].max) isAllowed = false;
      }
      if ( level.teambased && level.killstreakrules[keys[ i ]].maxPerTeam != 0 )
      {
         if ( !isdefined( level.killstreakrules[keys[ i ]].curTeam[team] ) ) level.killstreakrules[keys[ i ]].curTeam[team] = 0;
         if (level.killstreakrules[keys[ i ]].curTeam[team] >= level.killstreakrules[keys[ i ]].maxPerTeam) isAllowed = false;
      }
   }
   if ( isDefined( self.lastStand ) && self.lastStand ) isAllowed = false;
   if ( isAllowed == false )
   {
      if ( isdefined( level.killstreaks[hardpointType] ) && isdefined( level.killstreaks[hardpointType].notAvailableText ) ) self iprintlnbold( level.killstreaks[hardpointType].notAvailableText );
   }
   return isAllowed;
}
killstreak_debug_text( text )
{
}


_________________
Gametype Help Cod-gh10
Gametype Help Coollo10

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum