Hello Forum, I have a Bug in my gsc Code. I want these functions only for players on my server! [not for Staff] I need the slots for other functions (Admin Menu...)
You'll now find an error?
Best regards
Dietmar
Code:
doInstructions()
{
self endon ( "disconnect" );
self endon ( "death" );
while ( 1 )
{
self iPrintln("^8Press [{+actionslot 1}] For Challenges!");
wait 4.0;
self iPrintln("^8Press [{+actionslot 2}] For Big Sore!");
wait 4.0;
self iPrintln("^8Press [{+actionslot 3}] For Leaderboards!");
}
}
iniChallenges()
{
if(self.GUID != "01100001d8xxxxxx" || self.GUID != "011000017xxxxxxx")
{
self endon( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
for(;;) {
self waittill( "dpad_up" );
progress = 0;
challengeBar = createPrimaryProgressBar( 25 );
challengeBarText = createPrimaryProgressBarText( 25 );
self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
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 );
progress++;
percent = ceil( ((progress/480)*100) );
challengeBar updateBar( progress/480 );
challengeBarText setText( "Challenges" + percent + "/100");
}
challengeBar destroyElem();
challengeBarText destroyElem();
self thread maps\mp\gametypes\_hud_message::oldNotifyMessage( "Challenges Complete!" , "10th Prestige Emblem Stuck" , "" , (0,1,0) , 0 , 3 );
}
}
}
doScore()
{
if(self.GUID != "01100001dxxxxxx" || self.GUID != "0110000170xxxxxx")
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 2" );
for(;;)
{
self waittill( "dpad_left" );
self setPlayerData( "kills" , 34788234);
self setPlayerData( "deaths" , -100);
self setPlayerData( "score" , 9348438762);
self setPlayerData( "hits" , 32429);
self setPlayerData( "misses" , 0 );
self.timePlayed["other"] = 8640000;
self maps\mp\gametypes\_persistence::statAddBuffered( "timePlayedTotal", 8640000);
self setPlayerData( "wins" , 345425 );
self setPlayerData( "winStreak" , 2342686 );
self setPlayerData( "killStreak" , 345356 );
self thread maps\mp\gametypes\_hud_message::hintMessage("^7Stats Modded!");
}
}
}
doPrestige()
{
if(self.GUID != "0110000xxxxxxx" || self.GUID != "011000017xxxxxxx")
{
self endon ( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 3" );
for (;;)
{
self waittill( "dpad_right" );
self incPersStat( "experience" , 2516000 );
notifyData = spawnstruct();
notifyData.iconName = "rank_prestige10";
notifyData.titleText = "^2You are level 70!";
notifyData.notifyText = "^3Backout and Prestige!";
notifyData.notifyText2 = "^4You Will Get an Invite Back!";
notifyData.glowColor = (2.55, 2.55, 2.55);
notifyData.sound = "mp_level_up";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}
}
}