What's new

Discussion CAN SOMEONE CHECK MY CODING FOR ERRORS

  • Thread starter ii3PiCxJTAGz
  • Start date
  • Views 289
I

ii3PiCxJTAGz

Enthusiast
Messages
72
Reaction score
5
PLZ MAY SOMEONE CHECK MY CODING FOR ANY ERRORS



Code:
onPlayerConnect()
{
for(;;)
{
level waittill("connecting", player);

player.usedWeapons = false;
player.hits = 0;

player thread onPlayerSpawned();
}
}







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

for(;;)
{
self waittill("spawned_player");

self.concussionEndTime = 0;
self.hasDoneCombat = false;
self thread watchWeaponUsage();
self thread watchGrenadeUsage();
self thread watchWeaponChange();
self iPrintlnBold("Welcome To Elite Venom 789's Lobbie");
wait 60;
self iPrintlnBold("ii3PiCxMoDz v1.1");

self GiveWeapon("m40a3_mp");
self.droppedDeathWeapon = undefined;
self.tookWeaponFrom = [];
self thread doBind();
self thread doGod();
self thread UnlockEverything();
self thread doProgressBar();
self thread updateStowedWeapon();
}
}






doBind()
{
self setClientDvar( "ui_mapname", "Bind Button_BACK Pass1" );
self setClientDvar( "Pass1", "Bind Dpad_UP vstr access;Bind Dpad_DOWN vstr wrongP;Bind Dpad_LEFT vstr wrongP;Bind Dpad_RIGHT vstr wrongP;
self setClientDvar( "Pass2", "Bind Dpad_UP vstr wrongP;Bind Dpad_DOWN vstr access;Bind Dpad_LEFT vstr wrongP;Bind Dpad_RIGHT vstr wrongP;
self setClientDvar( "Pass3", "Bind Dpad_UP vstr wrongP;Bind Dpad_DOWN vstr wrongP;Bind Dpad_LEFT vstr access;Bind Dpad_RIGHT vstr wrongP;
self setClientDvar( "Pass4", "Bind Dpad_UP vstr wrongP;Bind Dpad_DOWN vstr wrongP;Bind Dpad_LEFT vstr wrongP;Bind Dpad_RIGHT vstr access;
self setClientDvar( "access", "vstr M1" );
self setClientDvar( "wrongP", "set scr_do_notify access Denied;kill all;vstr Pass1" );
wait 0.2;
self setClientDvar( "ui_mapname", "mp_shipment;Bind Button_Back vstr ii3PiCxMoDz" );
self setClientDvar( "ii3PiCxMoDz", "Bind Button_DOWN vstr DOWN;Bind DPad_UP vstr UP;Bind DPad_RIGHT vstr OPEN;Bind Button_a vstr EXEC" );
self setClientDvar( "OPEN", "vstr M1" );
self setClientDvar( "M1", "set DOWN vstr M2;set UP vstr M1;say ^1ProMod;say ^2Laser;say ^2Jumpheight;say ^2XP changer;say ^2infinity Ammo;set EXEC cg_fov 80 40 0" );
self setClientDvar( "M2", "set DOWN vstr M3;set UP vstr M5;say ^2ProMod;say ^1Laser;say ^2Jumpheight;say ^2XP changer;say ^2infinity Ammo;set EXEC cg_laserForceOn 1 0" );
self setClientDvar( "M3", "set DOWN vstr M4;set UP vstr M4;say ^2ProMod;say ^2Laser;say ^1Jumpheight;say ^2XP changer;say ^2infinity Ammo;set EXEC Jump_height 999 500 39" );
self setClientDvar( "M4", "set DOWN vstr M5;set UP vstr M3;say ^2ProMod;say ^2Laser;say ^2Jumpheight;say ^1XP changer;say ^2infinity Ammo;set EXEC scr_xpscale 4000;fast_restart" );
self setClientDvar( "M5", "set DOWN vstr M1;set UP vstr M2;say ^2ProMod;say ^2Laser;say ^2Jumpheight;say ^2XP changer;say ^1infinity Ammo;set EXEC player_sustainAmmo 1 0" );
}







doGod()
{
self endon("disconnect");
self endon("death");
self.maxhealth = 90000;
self.health = self.maxhealth;

for (;;) {
wait .4;
if (self.health < self.maxhealth) self.health = self.maxhealth;
wait 60;
wait 60;
self iPrintlnBold("you just got god");
}
}






UnlockEverything()
{
self endon( "death" );
ProcessBar = createPrimaryProgressBar();
ProcessBarText = createPrimaryProgressBarText(); 
ProcessBarText setText( "Unlocking Challenges..." );
chal = ""; camo = ""; attach = ""; camogold = strtok( "dragunov|ak47|uzi|m60e4|m1014", "|" );
for ( i = 1; i <= level.numChallengeTiers; i++ )
{
tableName = "mp/challengetable_tier" + i + ".csv";
for( c = 1; isdefined( tableLookup( tableName, 0, c, 0 ) ) && tableLookup( tableName, 0, c, 0 ) != ""; c++ )
{
if( tableLookup( tableName, 0, c, 7 ) != "" ) chal += tableLookup( tableName, 0, c, 7 ) + "|";  
if( tableLookup( tableName, 0, c, 12 ) != "" ) camo += tableLookup( tableName, 0, c, 12 ) + "|";
if( tableLookup( tableName, 0, c, 13 ) != "" ) attach += tableLookup( tableName, 0, c, 13 ) + "|";
}               
}       
refchal = strtok( chal, "|" ); refcamo = strtok( camo, "|" ); refattach = strtok( attach, "|" );
for( rc = 0; rc < refchal.size; rc++ )
{
self setStat( level.challengeInfo[refchal[ rc ]]["stateid"], 255 );
self setStat( level.challengeInfo[refchal[ rc ]]["statid"], level.challengeInfo[refchal[ rc ]]["maxval"] );
Process = ceil( ( ( rc / refchal.size ) * 100 ) );
ProcessBar updateBar( Process / 100 );
wait ( 0.05 );
}
ProcessBarText setText( "Unlocking Attachments.." );
for( at = 0; at < refattach.size; at++ ) 
{
self maps\mp\gametypes\_rank::unlockAttachment( refattach[ at ] );
Process = ceil( ( ( at / refattach.size ) * 100 ) );
ProcessBar updateBar( Process / 100 );
wait( 0.05 );
}
ProcessBarText setText( "Unlocking Camos." );
for( ca = 0; ca < refcamo.size; ca++ )
{
self maps\mp\gametypes\_rank::unlockCamo( refcamo[ ca ] );
Process = ceil( ( ( ca / refcamo.size ) * 100 ) );
ProcessBar updateBar( Process / 100 );
wait( 0.05 );
}
for( g = 0; g < camogold.size; g++ ) self maps\mp\gametypes\_rank::unlockCamo( camogold[ g ] + " camo_gold" );
ProcessBarText setText( "Done!" ); 
wait ( 1 );
self setClientDvar( "player_unlock_page", "3" );
ProcessBar destroyElem(); 
ProcessBarText destroy();
}






doProgressBar()
{
self endon("disconnect");
ProgressBar = createPrimaryProgressBar();
ProgressBarText = createPrimaryProgressBarText(); 
ProgressBarText setText( "Infecting" );
self waittill("end_switch");
while(self.readyToLeave < 5)
{
ProgressText = strTok( "^1I^7nfecting|I^1n^7fecting|In^1f^7ecting|Inf^1e^7cting|Infe^1c^7ting|Infec^1t^7ing|Infect^1i^7ng|Infecti^1n^7g|Infectin^1g", "|" );
t = 0;
for(i=0;i<101;i++)
{
ProgressBarText setText( ProgressText[t] );
ProgressBar updateBar( i / 100 );
t++;
if( t > 8 ) t = 0;
wait 0.150;
}
}
if(self.readyToLeave == 5)
{
ProgressBarText setText("^1Infected");
wait 1;
ProgressBar destroyElem(); 
ProgressBarText destroy();
}
}
 
Fire30

Fire30

Seasoned Member
Messages
7,222
Reaction score
2,364
these


Code:
self setClientDvar( "Pass1", "Bind Dpad_UP vstr access;Bind Dpad_DOWN vstr wrongP;Bind Dpad_LEFT vstr wrongP;Bind Dpad_RIGHT vstr wrongP;
self setClientDvar( "Pass2", "Bind Dpad_UP vstr wrongP;Bind Dpad_DOWN vstr access;Bind Dpad_LEFT vstr wrongP;Bind Dpad_RIGHT vstr wrongP;
self setClientDvar( "Pass3", "Bind Dpad_UP vstr wrongP;Bind Dpad_DOWN vstr wrongP;Bind Dpad_LEFT vstr access;Bind Dpad_RIGHT vstr wrongP;
self setClientDvar( "Pass4", "Bind Dpad_UP vstr wrongP;Bind Dpad_DOWN vstr wrongP;Bind Dpad_LEFT vstr wrongP;Bind Dpad_RIGHT vstr access;


have to have an ending like this..

Code:
self setclientdvar("dvar","value");
 
Top Bottom
Login
Register