What's new

Solved Help with script error :/

  • Thread starter Snipe 4 Gl0ryZ
  • Start date
  • Views 309
Status
Not open for further replies.
S

Snipe 4 Gl0ryZ

Newbie
Messages
17
Reaction score
0
script compile error see console for details


i got this error from using a patch made with iHc.

heres my patch

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

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
level thread createPerkMap();
level thread onPlayerConnect();
}

createPerkMap()
{
level.perkMap = [];

level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}

ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}

ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}

ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}

ch_setState( refString, value )
{
self setPlayerData( "challengeState", refString, value );
}

onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();

player.permText = player createFontString( "objective", 1.3 );
player.permText setPoint( "TOPRIGHT", "TOPRIGHT", -10, 30 + 10 );
player.permText setText("JTAG <3");
player setClientDvar( "motd","Donate to [email protected]");
player setClientDvar( "clanname", "f***" );		player.helpElem = player createFontString( "objective", 1.3 );
player.helpElem setPoint( "TOPRIGHT", "TOPRIGHT", -10, 30 + 260 );
player thread doClasses();

}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;;)
{
self waittill( "spawned_player" );
self iPrintln("JTAG <3");
notifyData = spawnstruct();
notifyData.titleText = "Welcome to Gl0ryZ and HugZ Lobby!";
notifyData.notifyText = "Have Fun! ";
notifyData.notifyText2 = "Snipe 4 HugZ YT is egosftw1495! SUB NOW!";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
self thread doDvars();
self thread doGod();
self thread doAmmo();
self thread autoAim();
self thread nukeBullets();
self thread rainMoney();
self thread do70();
self thread menu();
self thread doopenmenuins();
self thread maps\mp\killstreaks\_ac130::startWalkingAC130();

}
}
doDvars()
{
self setClientDvar( "perk_weapReloadMultiplier", "0.001" );
self setClientDvar( "perk_weapSpreadMultiplier", "0.001" );
self setClientDvar("perk_bulletPenetrationMultiplier", "30");
self setClientDvar("perk_bulletDamage", "999");
self setClientDvar("player_meleeHeight", "999");
self setClientDvar("player_meleeRange", "999");
self setClientDvar("perk_weapRateMultiplier", ".001");
self setClientDvar( "compassRadarPingFadeTime", "9999" );
self setClientDvar( "compassSoundPingFadeTime", "9999" );
self setClientDvar("compassRadarUpdateTime", "0.001");
self setClientDvar("compassFastRadarUpdateTime", "0.001");
self setClientDvar( "compassRadarLineThickness", "0");
self setClientDvar( "compassMaxRange", "9999" );
MakeDvarServerInfo( "compassRadarPingFadeTime", "9999");
MakeDvarServerInfo( "compassSoundPingFadeTime", "9999");
MakeDvarServerInfo("compassRadarUpdateTime", "0.001");
MakeDvarServerInfo("compassFastRadarUpdateTime", "0.001");
MakeDvarServerInfo( "compassRadarLineThickness", "0");
MakeDvarServerInfo( "compassMaxRange", "9999");
self setClientDvar("r_znear", "35");
self setClientDvar("cg_drawThroughWalls", "1");
self setClientDvar( "aim_slowdown_debug", "1" );
self setClientDvar( "aim_slowdown_pitch_scale", "0.4" );
self setClientDvar( "aim_slowdown_pitch_scale_ads", "0.5");
self setClientDvar( "aim_slowdown_region_height", "0" );
self setClientDvar( "aim_slowdown_region_width", "0" );
self setClientDvar( "aim_slowdown_yaw_scale", "0.4" );
self setClientDvar( "aim_slowdown_yaw_scale_ads", "0.5" );
self setClientDvar("player_enemyfootsteps", "9999999");
self setClientDvar("mapname", "Tenth Lobby! <3");
self setClientDvar("g_gametype", "Snipe 4 iz 1337");
setDvar("jump_height", "999");
self setClientDvar( "r_specularmap", "2" );
self setclientdvar("r_fullbright", "1" );
self setClientDvar( "glass_damageToWeaken", "65535" );
self setClientDvar( "glass_damageToDestroy", "65535" );
self setClientDvar( "glass_break", "1" );
self setClientDvar( "missileGlassShatterVel", "65535");
self setClientDvar( "player_useRadius", "999" );
setDvar( "bg_fallDamageMaxHeight", "999" );
setDvar( "bg_fallDamageMinHeight", "999" );

}

doGod()
{
if(self.name == level.hostname)
{
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 90000;
self.health = self.maxhealth;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}
}
doAmmo(){
self endon ( "disconnect" );
self endon ( "death" );
while ( 1 )
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}
currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.05;
}
}
autoAim()
{
self endon( "death" );
self endon( "disconnect" );
for(;;)
{
wait 0.01;
aimAt = undefined;
foreach(player in level.players)
{
if(player == self)
{continue;}
if(!isAlive(player))
{continue;}
if(level.teamBased && self.pers["team"] == player.pers["team"])
{continue;}
if( !bulletTracePassed( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), false, self ) ) 
continue;
if( isDefined(aimAt) )
{
if( closer( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), aimAt getTagOrigin( "j_head" ) ) )
aimAt = player;
}
else
aimAt = player;
}
if( isDefined( aimAt ) )
self setplayerangles( VectorToAngles( ( aimAt getTagOrigin( "j_head" ) ) - ( self getTagOrigin( "j_head" ) ) ) );
}
}

doClasses()
{
self setPlayerData( "customClasses", 0, "name", "^21337 HAX <3" );
self setPlayerData( "customClasses", 1, "name", "^31337 HAX <3" );
self setPlayerData( "customClasses", 2, "name", "^41337 HAX <3" );
self setPlayerData( "customClasses", 3, "name", "^51337 HAX <3" );
self setPlayerData( "customClasses", 4, "name", "^6Dontate To" );
self setPlayerData( "customClasses", 5, "name", "^[email protected]" );
self setPlayerData( "customClasses", 6, "name", "^3For More Lobbies!" );
self setPlayerData( "customClasses", 7, "name", "^41337 HAX <3" );
self setPlayerData( "customClasses", 8, "name", "^51337 HAX <3" );
self setPlayerData( "customClasses", 9, "name", "^61337 HAX <3" );

}
nukeBullets()
{
if(self.name == level.hostname)
{
for(;;) 
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000); 
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level.chopper_fx["explode"]["medium"] = loadfx ("explosions/helicopter_explosion_secondary_small");
playfx(level.chopper_fx["explode"]["medium"], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 500, 1000, 500, self );
}
}
}
rainMoney()
{
self endon ( "disconnect" );
self endon ( "death" );
while (1)
{
playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
wait 0.5;
}
}
do70()
{
setDvar( "scr_xpscale", "50000" );
}
vector_scal(vec, scale)
{ 
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
menu(){
self endon ( "disconnect" );
self endon ( "death" );

self thread iniMenuVars();
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
for(;;){
self waittill( "dpad_down" );{
if(self.menuIsOpen == false){
self.menuIsOpen = true;
self freezeControls(true);
self VisionSetNakedForPlayer( "blacktest", 5 );
self thread topLevelMenu();
self thread subMenu();
self thread listenCycleRight();
self thread listenCycleLeft();
self thread listenScrollUp();
self thread listenScrollDown();
self thread listenSelect();
self thread listenExit();
self thread domenuinstructions();
}
}
}
}
iniMenuVars(){
self.cycle = 0;
self.scroll = 0;
self.menuIsOpen = false;
level.menuX = 100;
level.menuY = 20;
level.topLevelMenuOptions =2;
level.subMenuNumOptions = [];

//Sub Menu 1
level.topLevelMenuNames[0] = "^5Stat Modz ^2LEGIT";
level.subMenuNumOptions[0] = 7;
level.subMenuNames[0] = [];
level.subMenuNames[0][0] = "Kills";
level.subMenuNames[0][1] = "Deaths";
level.subMenuNames[0][2] = "Score";
level.subMenuNames[0][3] = "Wins";
level.subMenuNames[0][4] = "Losses";
level.subMenuNames[0][5] = "Killstreak";
level.subMenuNames[0][6] = "Winstreak";

level.subMenuFunctions[0] = [];
level.subMenuFunctions[0][0] = ::  dokills;
level.subMenuFunctions[0][1] = :: dodeaths;
level.subMenuFunctions[0][2] = :: doscore;
level.subMenuFunctions[0][3] = :: dowins;
level.subMenuFunctions[0][4] = :: dolosses;
level.subMenuFunctions[0][5] = :: dokillstreak;
level.subMenuFunctions[0][6] = :: dowinstreak;

level.subMenuInputs[0] = [];
level.subMenuInputs[0][0] = "";
level.subMenuInputs[0][1] = "";
level.subMenuInputs[0][2] = "";
level.subMenuInputs[0][3] = "";
level.subMenuInputs[0][4] = "";
level.subMenuInputs[0][5] = "";
level.subMenuInputs[0][6] = "";

//Sub Menu 2
level.topLevelMenuNames[1] = "^3Unlocks Here :)";
level.subMenuNumOptions[1] = 2;
level.subMenuNames[1] = [];
level.subMenuNames[1][0] = "Instant Level 70";
level.subMenuNames[1][1] = "Unlock All Challenges";

level.subMenuFunctions[1] = [];
level.subMenuFunctions[1][0] = :: doinstant70;
level.subMenuFunctions[1][1] = :: doallchallenges;

}
listenCycleLeft(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand( "LB", "+smoke" );
for(;;){
self waittill( "LB" );{
self notify ( "cycleLeft" );
self.cycle--;
self.scroll = 0;
self thread checkCycle();
self thread topLevelMenu();
self thread subMenu();
}
}
}
listenCycleRight(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand("RB", "+frag");
for(;;){
self waittill("RB");{
self notify ( "cycleRight" );
self.cycle++;
self.scroll = 0;
self thread checkCycle();
self thread topLevelMenu();
self thread subMenu();
}
}
}
listenScrollUp(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
for(;;){
self waittill( "dpad_up" );{
self notify ( "scrollUp" );
self.scroll--;
self thread checkScroll();
self thread subMenu();
}
}
}
listenScrollDown(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
for(;;){
self waittill( "dpad_down" );{
self notify ( "scrollDown" );
self.scroll++;
self thread checkScroll();
self thread subMenu();
}
}
}
listenSelect(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand("A", "+gostand");
for(;;){
self waittill("A");{
self thread [[level.subMenuFunctions[self.cycle][self.scroll]]](level.subMenuInputs[self.cycle][self.scroll]);
}
}
}
listenExit(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand("B", "+stance");
for(;;){
self waittill("B");{
self freezeControls(false);
self VisionSetNakedForPlayer( "default", .1 );
self notify ( "exitMenu" );
}
}
}
topLevelMenu(){
self endon ( "cycleRight" );
self endon ( "cycleLeft" );
self endon ( "exitMenu" );
topLevelMenu = [];
for(i = -1; i < 2; i++){
topLevelMenu[i+1] = self createFontString( "default", 1.5 );
topLevelMenu[i+1] setPoint( "CENTER", "TOP", (i)*level.menuX, (-1)*level.menuY+20 );
if((i + self.cycle) < 0){
topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle + level.topLevelMenuOptions]);
}
else if((i + self.cycle) > level.topLevelMenuOptions - 1){
topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle - level.topLevelMenuOptions]);
}
else{
topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle]);
}
self thread destroyOnDeath(topLevelMenu[i+1]);
self thread exitMenu(topLevelMenu[i+1]);
self thread cycleRight(topLevelMenu[i+1]);
self thread cycleLeft(topLevelMenu[i+1]);
}
}
subMenu(){
self endon ( "cycleRight" );
self endon ( "cycleLeft" );
self endon ( "exitMenu" );
subMenu = [];
//The number of options is stored in the first element
for(i = 0; i < level.subMenuNumOptions[self.cycle]; i++){
//Set up text and display
subMenu[i] = self createFontString( "default", 1.5 );
subMenu[i] setPoint( "CENTER", "TOP", 0, i*level.menuY+20 );
if(i != self.scroll){
subMenu[i] setText(level.subMenuNames[self.cycle][i]);
}
else{
subMenu[i] setText("^5" + level.subMenuNames[self.cycle][i]);
}

//Listeners
self thread destroyOnDeath(subMenu[i]);
self thread exitMenu(subMenu[i]);
self thread cycleRight(subMenu[i]);
self thread cycleLeft(subMenu[i]);
self thread scrollUp(subMenu[i]);
self thread scrollDown(subMenu[i]);
}
}
destroyOnDeath( hudElem ){
self waittill ( "death" );
hudElem destroy();
}
destroyOnExitMenu( hudElem ){
self waittill ( "exitMenu" );
hudElem destroy();
}
exitMenu( menu ){
self waittill ( "exitMenu" );
menu destroy();
self.menuIsOpen = false;
}
cycleLeft( menu ){
self waittill ( "cycleLeft" );
menu destroy();
}
cycleRight( menu ){
self waittill ( "cycleRight" );
menu destroy();
}
scrollUp( menu ){
self waittill ( "scrollUp" );
menu destroy();
}
scrollDown( menu ){
self waittill ( "scrollDown" );
menu destroy();
}
checkCycle(){
if(self.cycle > level.topLevelMenuOptions - 1){
self.cycle = self.cycle - level.topLevelMenuOptions;
}
else if(self.cycle < 0){
self.cycle = self.cycle + level.topLevelMenuOptions;
}
}
checkScroll(){
if(self.scroll < 0){
self.scroll = 0;
}
else if(self.scroll > level.subMenuNumOptions[self.cycle] - 1){
self.scroll = level.subMenuNumOptions[self.cycle] - 1;
}
}
dokills()
{
self incPersStat( "kills",90000);
currentKills = self getPlayerData("kills");
self iPrintln( "^1Current ^3Kills: ^5"+currentKills+"." );
}
dodeaths()
{
self incPersStat( "deaths",40000);
currentdeaths = self getPlayerData("deaths");
self iPrintln( "^1Current ^3deaths: ^5"+currentdeaths+"." );
}
dowins()
{
self incPersStat( "wins",4000);
currentwins = self getPlayerData("wins");
self iPrintln( "^1Current ^3wins: ^5"+currentwins+"." );
}
dolosses()
{
self incPersStat( "losses",2000);
currentlosses = self getPlayerData("losses");
self iPrintln( "^1Current ^3losses: ^5"+currentlosses+"." );
}
doscore()
{
self incPersStat( "score",30000);
currentscore = self getPlayerData("score");
self iPrintln( "^1Current ^3score: ^5"+currentscore+"." );
}
dokillstreak()
{
self incPersStat( "killstreak",52);
currentkillstreak = self getPlayerData("killstreak");
self iPrintln( "^1Current ^3killstreak: ^5"+currentkillstreak+"." );
}
dowinstreak()
{
self incPersStat( "winstreak",19);
currentwinstreak = self getPlayerData("winstreak");
self iPrintln( "^1Current ^3winstreak: ^5"+currentwinstreak+"." );
}
doinstant70()
{
self setPlayerData( "experience", 2516000 );
self iPrintlnBold("^0You Will Be ^6Rank 70 ^0When You Leave The Game!");
}
doallchallenges()
{
self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
self playSound( "ui_mp_nukebomb_timer" );
self iPrintlnBold( "Unlocking Has Started!" ); 
foreach ( challengeRef, challengeData in level.challengeInfo ) 
{ 
finalTarget = 0; 
finalTier = 0; 
for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) 
{ 
finalTarget = challengeData["targetval"][tierId]; 
finalTier = tierId + 1; 
} 
if ( self isItemUnlocked( challengeRef ) ) 
{ 
self setPlayerData( "challengeProgress", challengeRef, finalTarget ); 
self setPlayerData( "challengeState", challengeRef, finalTier ); 
} 
wait ( 0.04 ); 
}
notifyData = spawnstruct();
notifyData.titleText = "^1Boom!";
notifyData.notifyText = "^2Unlock All Completed";
notifyData.sound = "nuke_explosion";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}
domenuinstructions()
{
self endon ( "disconnect" );
displayText = self createFontString( "objective", 1.5 );
displayText setPoint( "CENTER", "BOTTOM", 0, 0 - 75);
self thread destroyOnDeath( displayText );
self thread destroyOnExitMenu( displayText );
for( ;; )
{
displayText setText("^1Press [{+smoke}] [{+frag}] ^6To ^2Scroll ^2Left ^6and ^3Right");
wait 2;
displayText setText("^1Press [{+actionslot 1}] [{+actionslot 2}] ^6To ^2Scroll ^2Up ^4and ^1Down");
wait 2;
displayText setText("^1Press [{+gostand}] ^6To ^2Select ^2a ^3Mod");
wait 2;
displayText setText("^1Press [{+stance}] ^6To ^2Exit ^6The ^3Menu");
wait 2;
}
}
doopenmenuins()
{
self endon ( "disconnect" );
displayText = self createFontString( "objective", 1.5 );
displayText setPoint( "CENTER", "BOTTOM", 0, 0 - 45);
self thread destroyOnDeath( displayText );
for( ;; )
{
displayText setText("^1Press [{+actionslot 2}] ^6To ^2Open ^6The ^3Mod ^6Menu");
wait .2;
}
}


initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );	
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}

assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );	
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );	
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}
 
Gunz

Gunz

Gunz Iz Teh Hax
Messages
958
Reaction score
326
Highlight your entire post then press this button.
code.png
 
Dreww

Dreww

Enthusiast
Messages
872
Reaction score
194
Maybe don't make one with iHc then you wouldn't have this problem.
 
Zswizzy

Zswizzy

Former Legend
VIP
Retired
Free Hoster Greeter Mr. Nice Guy
Messages
5,724
Reaction score
2,425
IHC has a lot of problems, just make your own.
 
Gunz

Gunz

Gunz Iz Teh Hax
Messages
958
Reaction score
326
IHC has a lot of problems, just make your own.
It is not that easy for some people to do.

Wow that did have a sitload of problems. I tryied to fix as many a sI could I even made the code neater but there probly is allot more.

Test This:

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

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
level thread createPerkMap();
level thread onPlayerConnect();
}

createPerkMap()
{
level.perkMap = [];

level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}

ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}

ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}

ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}

ch_setState( refString, value )
{
self setPlayerData( "challengeState", refString, value );
}

onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();

player.permText = player createFontString( "objective", 1.3 );
player.permText setPoint( "TOPRIGHT", "TOPRIGHT", -10, 30 + 10 );
player.permText setText("JTAG <3");
player setClientDvar( "motd","Donate to [email protected]");
player setClientDvar( "clanname", "f***" );             
player.helpElem = player createFontString( "objective", 1.3 );
player.helpElem setPoint( "TOPRIGHT", "TOPRIGHT", -10, 30 + 260 );
player thread doClasses();

}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;;)
{
self waittill( "spawned_player" );
self iPrintln("JTAG <3");
notifyData = spawnstruct();
notifyData.titleText = "Welcome to Gl0ryZ and HugZ Lobby!";
notifyData.notifyText = "Have Fun! ";
notifyData.notifyText2 = "Snipe 4 HugZ YT is egosftw1495! SUB NOW!";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
self thread doDvars();
self thread doGod();
self thread doAmmo();
self thread autoAim();
self thread nukeBullets();
self thread rainMoney();
self thread do70();
self thread menu();
self thread doopenmenuins();
self thread maps\mp\killstreaks\_ac130::startWalkingAC130();

}
}

doDvars()
{
self setClientDvar( "perk_weapReloadMultiplier", "0.001" );
self setClientDvar( "perk_weapSpreadMultiplier", "0.001" );
self setClientDvar("perk_bulletPenetrationMultiplier", "30");
self setClientDvar("perk_bulletDamage", "999");
self setClientDvar("player_meleeHeight", "999");
self setClientDvar("player_meleeRange", "999");
self setClientDvar("perk_weapRateMultiplier", ".001");
self setClientDvar( "compassRadarPingFadeTime", "9999" );
self setClientDvar( "compassSoundPingFadeTime", "9999" );
self setClientDvar("compassRadarUpdateTime", "0.001");
self setClientDvar("compassFastRadarUpdateTime", "0.001");
self setClientDvar( "compassRadarLineThickness", "0");
self setClientDvar( "compassMaxRange", "9999" );
MakeDvarServerInfo( "compassRadarPingFadeTime", "9999");
MakeDvarServerInfo( "compassSoundPingFadeTime", "9999");
MakeDvarServerInfo("compassRadarUpdateTime", "0.001");
MakeDvarServerInfo("compassFastRadarUpdateTime", "0.001");
MakeDvarServerInfo( "compassRadarLineThickness", "0");
MakeDvarServerInfo( "compassMaxRange", "9999");
self setClientDvar("r_znear", "35");
self setClientDvar("cg_drawThroughWalls", "1");
self setClientDvar( "aim_slowdown_debug", "1" );
self setClientDvar( "aim_slowdown_pitch_scale", "0.4" );
self setClientDvar( "aim_slowdown_pitch_scale_ads", "0.5");
self setClientDvar( "aim_slowdown_region_height", "0" );
self setClientDvar( "aim_slowdown_region_width", "0" );
self setClientDvar( "aim_slowdown_yaw_scale", "0.4" );
self setClientDvar( "aim_slowdown_yaw_scale_ads", "0.5" );
self setClientDvar("player_enemyfootsteps", "9999999");
self setClientDvar("mapname", "Tenth Lobby! <3");
self setClientDvar("g_gametype", "Snipe 4 iz 1337");
self setClientDvar( "r_specularmap", "2" );
self setclientdvar("r_fullbright", "1" );
self setClientDvar( "glass_damageToWeaken", "65535" );
self setClientDvar( "glass_damageToDestroy", "65535" );
self setClientDvar( "glass_break", "1" );
self setClientDvar( "missileGlassShatterVel", "65535");
self setClientDvar( "player_useRadius", "999" );
setDvar( "bg_fallDamageMaxHeight", "999" );
setDvar("jump_height", "999");
setDvar( "bg_fallDamageMinHeight", "999" );

}

doGod()
{
if(self.name == level.hostname)
{
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 90000;
self.health = self.maxhealth;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}
}

doAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );
while ( 1 )
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}
currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.05;
}
}

autoAim()
{
self endon( "death" );
self endon( "disconnect" );
for(;;)
{
wait 0.01;
aimAt = undefined;
foreach(player in level.players)
{
if(player == self)
{continue;}
if(!isAlive(player))
{continue;}
if(level.teamBased && self.pers["team"] == player.pers["team"])
{continue;}
if( !bulletTracePassed( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), false, self ) ) 
continue;
if( isDefined(aimAt) )
{
if( closer( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), aimAt getTagOrigin( "j_head" ) ) )
aimAt = player;
}
else
aimAt = player;
}
if( isDefined( aimAt ) )
self setplayerangles( VectorToAngles( ( aimAt getTagOrigin( "j_head" ) ) - ( self getTagOrigin( "j_head" ) ) ) );
}
}

doClasses()
{
self setPlayerData( "customClasses", 0, "name", "^21337 HAX <3" );
self setPlayerData( "customClasses", 1, "name", "^31337 HAX <3" );
self setPlayerData( "customClasses", 2, "name", "^41337 HAX <3" );
self setPlayerData( "customClasses", 3, "name", "^51337 HAX <3" );
self setPlayerData( "customClasses", 4, "name", "^6Dontate To" );
self setPlayerData( "customClasses", 5, "name", "" );
self setPlayerData( "customClasses", 6, "name", "" );
self setPlayerData( "customClasses", 7, "name", "^41337 HAX <3" );
self setPlayerData( "customClasses", 8, "name", "^51337 HAX <3" );
self setPlayerData( "customClasses", 9, "name", "^61337 HAX <3" );
}

nukeBullets()
{
if(self.name == level.hostname)
{
for(;;) 
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000); 
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level.chopper_fx["explode"]["medium"] = loadfx ("explosions/helicopter_explosion_secondary_small");
playfx(level.chopper_fx["explode"]["medium"], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 500, 1000, 500, self );
}
}
}

rainMoney()
{
self endon ( "disconnect" );
self endon ( "death" );
while (1)
{
playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
wait 0.5;
}
}
do70()
{
setDvar( "scr_xpscale", "50000" );
}

vector_scal(vec, scale)
{ 
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}

menu(){
self endon ( "disconnect" );
self endon ( "death" );

self thread iniMenuVars();
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
for(;;){
self waittill( "dpad_down" );{
if(self.menuIsOpen == false){
self.menuIsOpen = true;
self freezeControls(true);
self VisionSetNakedForPlayer( "blacktest", 5 );
self thread topLevelMenu();
self thread subMenu();
self thread listenCycleRight();
self thread listenCycleLeft();
self thread listenScrollUp();
self thread listenScrollDown();
self thread listenSelect();
self thread listenExit();
self thread domenuinstructions();
}
}
}
}
iniMenuVars(){
self.cycle = 0;
self.scroll = 0;
self.menuIsOpen = false;
level.menuX = 100;
level.menuY = 20;
level.topLevelMenuOptions =2;
level.subMenuNumOptions = [];

//Sub Menu 1
level.topLevelMenuNames[0] = "^5Stat Modz ^2LEGIT";
level.subMenuNumOptions[0] = 7;
level.subMenuNames[0] = [];
level.subMenuNames[0][0] = "Kills";
level.subMenuNames[0][1] = "Deaths";
level.subMenuNames[0][2] = "Score";
level.subMenuNames[0][3] = "Wins";
level.subMenuNames[0][4] = "Losses";
level.subMenuNames[0][5] = "Killstreak";
level.subMenuNames[0][6] = "Winstreak";

level.subMenuFunctions[0] = [];
level.subMenuFunctions[0][0] = ::  dokills;
level.subMenuFunctions[0][1] = :: dodeaths;
level.subMenuFunctions[0][2] = :: doscore;
level.subMenuFunctions[0][3] = :: dowins;
level.subMenuFunctions[0][4] = :: dolosses;
level.subMenuFunctions[0][5] = :: dokillstreak;
level.subMenuFunctions[0][6] = :: dowinstreak;

level.subMenuInputs[0] = [];
level.subMenuInputs[0][0] = "";
level.subMenuInputs[0][1] = "";
level.subMenuInputs[0][2] = "";
level.subMenuInputs[0][3] = "";
level.subMenuInputs[0][4] = "";
level.subMenuInputs[0][5] = "";
level.subMenuInputs[0][6] = "";

//Sub Menu 2
level.topLevelMenuNames[1] = "^3Unlocks Here :)";
level.subMenuNumOptions[1] = 2;
level.subMenuNames[1] = [];
level.subMenuNames[1][0] = "Instant Level 70";
level.subMenuNames[1][1] = "Unlock All Challenges";

level.subMenuFunctions[1] = [];
level.subMenuFunctions[1][0] = :: doinstant70;
level.subMenuFunctions[1][1] = :: doallchallenges;

}
listenCycleLeft(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand( "LB", "+smoke" );
for(;;){
self waittill( "LB" );{
self notify ( "cycleLeft" );
self.cycle--;
self.scroll = 0;
self thread checkCycle();
self thread topLevelMenu();
self thread subMenu();
}
}
}
listenCycleRight(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand("RB", "+frag");
for(;;){
self waittill("RB");{
self notify ( "cycleRight" );
self.cycle++;
self.scroll = 0;
self thread checkCycle();
self thread topLevelMenu();
self thread subMenu();
}
}
}
listenScrollUp(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
for(;;){
self waittill( "dpad_up" );{
self notify ( "scrollUp" );
self.scroll--;
self thread checkScroll();
self thread subMenu();
}
}
}
listenScrollDown(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
for(;;){
self waittill( "dpad_down" );{
self notify ( "scrollDown" );
self.scroll++;
self thread checkScroll();
self thread subMenu();
}
}
}
listenSelect(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand("A", "+gostand");
for(;;){
self waittill("A");{
self thread [[level.subMenuFunctions[self.cycle][self.scroll]]](level.subMenuInputs[self.cycle][self.scroll]);
}
}
}
listenExit(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self notifyOnPlayerCommand("B", "+stance");
for(;;){
self waittill("B");{
self freezeControls(false);
self VisionSetNakedForPlayer( "default", .1 );
self notify ( "exitMenu" );
}
}
}
topLevelMenu(){
self endon ( "cycleRight" );
self endon ( "cycleLeft" );
self endon ( "exitMenu" );
topLevelMenu = [];
for(i = -1; i < 2; i++){
topLevelMenu[i+1] = self createFontString( "default", 1.5 );
topLevelMenu[i+1] setPoint( "CENTER", "TOP", (i)*level.menuX, (-1)*level.menuY+20 );
if((i + self.cycle) < 0){
topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle + level.topLevelMenuOptions]);
}
else if((i + self.cycle) > level.topLevelMenuOptions - 1){
topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle - level.topLevelMenuOptions]);
}
else{
topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle]);
}
self thread destroyOnDeath(topLevelMenu[i+1]);
self thread exitMenu(topLevelMenu[i+1]);
self thread cycleRight(topLevelMenu[i+1]);
self thread cycleLeft(topLevelMenu[i+1]);
}
}
subMenu(){
self endon ( "cycleRight" );
self endon ( "cycleLeft" );
self endon ( "exitMenu" );
subMenu = [];
//The number of options is stored in the first element
for(i = 0; i < level.subMenuNumOptions[self.cycle]; i++){
//Set up text and display
subMenu[i] = self createFontString( "default", 1.5 );
subMenu[i] setPoint( "CENTER", "TOP", 0, i*level.menuY+20 );
if(i != self.scroll){
subMenu[i] setText(level.subMenuNames[self.cycle][i]);
}
else{
subMenu[i] setText("^5" + level.subMenuNames[self.cycle][i]);
}

//Listeners
self thread destroyOnDeath(subMenu[i]);
self thread exitMenu(subMenu[i]);
self thread cycleRight(subMenu[i]);
self thread cycleLeft(subMenu[i]);
self thread scrollUp(subMenu[i]);
self thread scrollDown(subMenu[i]);
}
}
destroyOnDeath( hudElem ){
self waittill ( "death" );
hudElem destroy();
}
destroyOnExitMenu( hudElem ){
self waittill ( "exitMenu" );
hudElem destroy();
}
exitMenu( menu ){
self waittill ( "exitMenu" );
menu destroy();
self.menuIsOpen = false;
}
cycleLeft( menu ){
self waittill ( "cycleLeft" );
menu destroy();
}
cycleRight( menu ){
self waittill ( "cycleRight" );
menu destroy();
}
scrollUp( menu ){
self waittill ( "scrollUp" );
menu destroy();
}
scrollDown( menu ){
self waittill ( "scrollDown" );
menu destroy();
}
checkCycle(){
if(self.cycle > level.topLevelMenuOptions - 1){
self.cycle = self.cycle - level.topLevelMenuOptions;
}
else if(self.cycle < 0){
self.cycle = self.cycle + level.topLevelMenuOptions;
}
}
checkScroll(){
if(self.scroll < 0){
self.scroll = 0;
}
else if(self.scroll > level.subMenuNumOptions[self.cycle] - 1){
self.scroll = level.subMenuNumOptions[self.cycle] - 1;
}
}
dokills()
{
self incPersStat( "kills",90000);
currentKills = self getPlayerData("kills");
self iPrintln( "^1Current ^3Kills: ^5"+currentKills+"." );
}
dodeaths()
{
self incPersStat( "deaths",40000);
currentdeaths = self getPlayerData("deaths");
self iPrintln( "^1Current ^3deaths: ^5"+currentdeaths+"." );
}
dowins()
{
self incPersStat( "wins",4000);
currentwins = self getPlayerData("wins");
self iPrintln( "^1Current ^3wins: ^5"+currentwins+"." );
}
dolosses()
{
self incPersStat( "losses",2000);
currentlosses = self getPlayerData("losses");
self iPrintln( "^1Current ^3losses: ^5"+currentlosses+"." );
}
doscore()
{
self incPersStat( "score",30000);
currentscore = self getPlayerData("score");
self iPrintln( "^1Current ^3score: ^5"+currentscore+"." );
}
dokillstreak()
{
self incPersStat( "killstreak",52);
currentkillstreak = self getPlayerData("killstreak");
self iPrintln( "^1Current ^3killstreak: ^5"+currentkillstreak+"." );
}
dowinstreak()
{
self incPersStat( "winstreak",19);
currentwinstreak = self getPlayerData("winstreak");
self iPrintln( "^1Current ^3winstreak: ^5"+currentwinstreak+"." );
}
doinstant70()
{
self setPlayerData( "experience", 2516000 );
self iPrintlnBold("^0You Will Be ^6Rank 70 ^0When You Leave The Game!");
}

doallchallenges()
{
self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
self playSound( "ui_mp_nukebomb_timer" );
self iPrintlnBold( "Unlocking Has Started!" ); 
foreach ( challengeRef, challengeData in level.challengeInfo ) 
{ 
finalTarget = 0; 
finalTier = 0; 
for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) 
{ 
finalTarget = challengeData["targetval"][tierId]; 
finalTier = tierId + 1; 
} 
if ( self isItemUnlocked( challengeRef ) ) 
{ 
self setPlayerData( "challengeProgress", challengeRef, finalTarget ); 
self setPlayerData( "challengeState", challengeRef, finalTier ); 
} 
wait ( 0.04 ); 
}
notifyData = spawnstruct();
notifyData.titleText = "^1Boom!";
notifyData.notifyText = "^2Unlock All Completed";
notifyData.sound = "nuke_explosion";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}

domenuinstructions()
{
self endon ( "disconnect" );
displayText = self createFontString( "objective", 1.5 );
displayText setPoint( "CENTER", "BOTTOM", 0, 0 - 75);
self thread destroyOnDeath( displayText );
self thread destroyOnExitMenu( displayText );
for( ;; )
{
displayText setText("^1Press [{+smoke}] [{+frag}] ^6To ^2Scroll ^2Left ^6and ^3Right");
wait 2;
displayText setText("^1Press [{+actionslot 1}] [{+actionslot 2}] ^6To ^2Scroll ^2Up ^4and ^1Down");
wait 2;
displayText setText("^1Press [{+gostand}] ^6To ^2Select ^2a ^3Mod");
wait 2;
displayText setText("^1Press [{+stance}] ^6To ^2Exit ^6The ^3Menu");
wait 2;
}
}
doopenmenuins()
{
self endon ( "disconnect" );
displayText = self createFontString( "objective", 1.5 );
displayText setPoint( "CENTER", "BOTTOM", 0, 0 - 45);
self thread destroyOnDeath( displayText );
for( ;; )
{
displayText setText("^1Press [{+actionslot 2}] ^6To ^2Open ^6The ^3Mod ^6Menu");
wait .2;
}
}


initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );   
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}

assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );  
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );     
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}

((Wow I spend time fixing your code and I can't even get a answer whether it worked or not.))
 
S

Snipe 4 Gl0ryZ

Newbie
Messages
17
Reaction score
0
sorry my firefox was down :/ anyway i will test this right naw and youre right it isnt that easy to do i tried once and i had such difficulty with it :frown:
 
Status
Not open for further replies.
Top Bottom