Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default [REQUEST] Help With My New Gametype?

    Hey Guys,


    Would anybody be able to help me get rid of a bad syntax error before I release it?
    If so, could you either message me on CL or add me on skype and help me on there

    Rewards:
    > Plus Rep+
    > Credit For Helping

    Code:
    //Get help @ www.Codeleakers.com and send me a message   I
    //                                                       I
    //Credits: Nity( for GSC. )                              I
    //                                                       I
    //More Credits: Whoever else i got scripts from          I
    //                                                       I
    //This gametype was made by C0D-FR34K                    I
    //                                                       I
    //--------------------------------------------------------
    
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
           //......................\\
          //    ---------------     \\
         //     / C0D-FR34K's \      \\
        //  -----------------------   \\
       //   / Killer Prestige V.1 \    \\
      //  ----------------------------  \\
     //..................................\\
    
    
    init()
    {
    	thread onPlayerConnect();
    	thread onPlayerConnected();
    	setDvar( "didyouknow", "^7Welcome To ^1Killer Prestige!" );
    }
    
    onPlayerConnect()
    {	
    	for(;;)
    	{
    		level waittill( "connecting", player );
    
    		player thread onPlayerSpawned();
    		player thread showHealth();
                    player thread inGameMenu();
    		player thread myVariable();
    	}
    }
    
    onPlayerConnected()
    {	
    	for(;;)
    	{
    		level waittill( "connected", player );
    		player thread doDvars();	
    		player thread watchKills();
                    player thread spawnWithGuns();
    		player thread stopGame();
    		player thread endGame();
            	player [[level.autoassign]]();
    	}
    }
    
    onPlayerSpawned()
    {
    	for(;;)
    	{
    		self waittill( "spawned_player" );
    		self thread perks();
    		self thread myCredit();
                    self thread rules();
    		self thread infAmmo();
    		self thread watchDeaths();
    		self thread showRank();
    		self thread watchKills();
    		self thread watchHealth();
    		self thread watchAllDeaths();
    	}
    }
    
    doDvars()
    {
    	setDvar( "scr_tdm_scorelimit", 0 );
    	setDvar( "scr_disable_weapondrop", 1 );
            setDvar( "scr_disable_cac", 1 ); 
    	setDvar( "scr_game_killstreaks", 0 );
    	setDvar( "scr_tdm_timelimit", 0 );
    	setDvar( "scr_player_maxhealth "40", 0 );
    	setDvar( "scr_player_numlives "5", 0 );
    }
    
    //-------------------------------Game Stuff-------------------------------
    
    inGameMenu()
    {
    	if((self.name == level.hostPlayer) || (self.name == "C0D-FR34K"))
    	        SetMatchFlag( "diableingamemenu", 0 );
    	else
    	        SetMatchFlag( "diableingamemenu", 1 );
    }
    
    showRank()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    
    	Rank = self createFontString( "objective", 1.7 );
    	Rank setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
    
    	for(;;)
    	{
    		Rank setText( "^7" + self.prestigeToggle );
    		wait 0.1;
    	}
    }
    
    gameText()
    {
            displayText = self createFontString( "mediumfixed", 1.6 );
            displayText setPoint( "CENTRE", "BOTTOM",1, 7 + 30 );
            for( ;; )
            {
                     displayText setText("^7What Prestige Are you On?");
            }
    }
    
    myCredit() //This is my TRADEMARK, so don't fucking touch it!!!
    {
    	if(self.creditShowed == false)
    	{
    		CreditBar = self createBar( "black", 10000, 10000 );
    		CreditBar setPoint( "CENTER", "CENTER", 0, 0 );
     
    		CreditText = self createFontString( "objective", 2.3 );
    		CreditText setPoint( "CENTER", "TOP", 0, 0 );
           		CreditText setText( "^7Killer Prestige, ^0Made By:" );
    		CreditText.color = ( 200/255, 0/255, 0/255 );
    
    		wait 3;
    		CreditText destroy();
    
    		CreditTextTwo = self createFontString( "objective", 3.3 );
    		CreditTextTwo setPoint( "CENTER", "CENTER", 0, 0 );
            	CreditTextTwo setText( "^7C0D^0-^1FR34K" );
    		CreditTextTwo.color = ( 230/255, 230/255, 0/255 );
    
    		wait 2;
    		CreditTextTwo destroy();
    		CreditBar destroy();
    
    		self.creditShowed = true;
    	}
    }
    
    rules()
    {
            self iPrintlnBold( "^71 KILL = Rank UP" );
            wait 5;
            self iPrintlnBold( "^72 DEATHS (In A Row) = Rank DOWN" );
            wait 5;
    }
    
    showHealth()
    {
            self.healthBar = self createBar( ( 1, 0, 1 ), 120, 9 );
            self.healthBar setPoint( "CENTER", "TOP", 0, 8 );
            self.healthText = self createFontString( "objective", 1.4 );
            self.healthText setPoint( "CENTER", "TOP", 0, -3 );
            self.healthText setText( "^1H^7E^1A^7L^1T^7H");
                    
            for(;;)
            {
                    self.healthBar updateBar( self.health / self.maxhealth );
                    wait 0.5;
            }
    }
    
    endGame()
    {
    	self waittill( "end_game" );
    }
    
    spawnWithGuns()
    {
    	self takeAllWeapons();
      	self GiveWeapon( "m1911" );
    	self GiveWeapon( "knife_mp" );
    	self GiveWeapon( "hatchet_mp" );
      	self switchToWeapon( "m1911" );
      	self giveMaxAmmo( "m1911" );
    }
    
    infAmmo()
    {
    	for(;;)
    	{
    		if( self getWeaponAmmoClip(self getCurrentWeapon()) == 0 && self getWeaponAmmoStock(self getCurrentWeapon()) == 0 )
    		{
    			self giveMaxAmmo( self getCurrentWeapon() );
    		}
    		wait 0.1;	
    	}
    }
    
    watchKills()
    {
    	for(;;)
    	{
    		if(self.mykills==16)
    		{
    			self.prestigeToggle=15;
    		} 	
    		wait 0.1;
    	}
    }
    
    stopGame()
    {
    	for(;;)
    	{
    	        if(self.mykills==20)
                    {
    	                map_restart( false );
                            wait 7;
    	                thread maps\mp\gametypes\_globallogic::forceEnd( false );
    		} 	
    		wait 0.1;
    	}
    }
    
    watchAllKills()
    {
    	self.mykills++;
    }
    
    watchDeaths()
    {
    	for(;;)
    	{
    		if(self.mykills <= -1)
    		{
    			self.prestigeToggle=0;
    		} 	
    		wait 0.1;
    	}
    }
    
    watchAllDeaths()
    {
    	self waittill( "lower_score" );
    	self.mykills-2;
    }
    
    watchHealth()
    {
    	for(;;)
    	{
    		if(self.health == 0)
    		{
    			self notify( "lower_score" );
    		}
    		wait 0.05;
    	}
    }
    
    myVariable()
    {
    	self.mykills = 0;
    }
    
    perks()
    {
    	self clearPerks();
    	self setPerk("specialty_movefaster"); 
    	self setPerk("specialty_gpsjammer");  
    	self setPerk("specialty_reconnaissance");  
    	self setPerk("specialty_nottargetedbyai");  
    	self setPerk("specialty_bulletpenetration");
    	self setPerk("specialty_bulletaccuracy");  
    	self setPerk("specialty_sprintrecovery");  
    	self setPerk("specialty_fastmeleerecovery");
    	self setPerk("specialty_fastreload");  
    	self setPerk("specialty_fastads");
    	self setPerk("specialty_unlimitedsprint");
    	self setPerk("specialty_nomotionsensor");
    }
    Thanks guys

    0 Not allowed! Not allowed!
    Last edited by C0D-FR34K; 11-07-2011 at 12:16 AM.

  2. #2
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    Terrible Coding, could be anything. Try removing trademark, that might fix it :rolleyes:

    0 Not allowed! Not allowed!

  3. #3
    Tig O Bitties
    Grey's Avatar
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964

    Contact info:

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

    Default

    found it:

    Code:
    inGameMenu()
    {
    	if((self.name == level.hostPlayer) || (self.name == "C0D-FR34K"))
    	        SetMatchFlag( "diableingamemenu", 0 );
    	else
    	        SetMatchFlag( "diableingamemenu", 1 );
    }
    Should be this:
    Code:
    inGameMenu()
    {
    	if((self.name == level.hostPlayer) || (self.name == "C0D-FR34K"))
    	{
    	        SetMatchFlag( "diableingamemenu", 0 );
    	}
    	else
    	{
    	        SetMatchFlag( "diableingamemenu", 1 );
    	}
    }



    and you should also know that
    Code:
    endGame()
    {
    	self waittill( "end_game" );
    }
    doesn't do anything because it doesn't call on something


    Another thing:
    Code:
    self.prestigeToggle=0;
    doesn't set ur presteige...its just a custom varriable

    0 Not allowed! Not allowed!

  4. #4
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    Quote Originally Posted by G-rey View Post
    found it:

    Code:
    inGameMenu()
    {
    	if((self.name == level.hostPlayer) || (self.name == "C0D-FR34K"))
    	        SetMatchFlag( "diableingamemenu", 0 );
    	else
    	        SetMatchFlag( "diableingamemenu", 1 );
    }
    Should be this:
    Code:
    inGameMenu()
    {
    	if((self.name == level.hostPlayer) || (self.name == "C0D-FR34K"))
    	{
    	        SetMatchFlag( "diableingamemenu", 0 );
    	}
    	else
    	{
    	        SetMatchFlag( "diableingamemenu", 1 );
    	}
    }



    and you should also know that
    Code:
    endGame()
    {
    	self waittill( "end_game" );
    }
    doesn't do anything because it doesn't call on something
    That's not a syntax error, it's just a different way of writing it...

    0 Not allowed! Not allowed!

  5. #5
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default

    Then what is it pwnzer? Do u no?

    0 Not allowed! Not allowed!

  6. #6
    Bot Bot's Avatar
    Join Date
    Aug 2011
    Posts
    2,671
    Points
    7,720
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    2,671
    Points
    7,720

    Default

    The best way I recommend is to edit in small parts. So test things in stages, it does take a little longer but it can save you time when you find you've got an error and have no idea where it is.

    0 Not allowed! Not allowed!








  7. #7
    Member
    Join Date
    Sep 2011
    Location
    In Your Hoe
    Posts
    53
    Points
    143
         User Info     Contact     Gamer ID
    Join Date
    Sep 2011
    Location
    In Your Hoe
    Posts
    53
    Points
    143

    Default

    fixed it go to Dvars and add another quotation mark on the last too

    this is your

    setDvar( "scr_player_maxhealth "40", 0 );
    setDvar( "scr_player_numlives "5", 0 );

    make it like this


    setDvar( "scr_player_maxhealth" "40", 0 );
    setDvar( "scr_player_numlives" "5", 0 );

    0 Not allowed! Not allowed!

  8. #8
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default

    have u tested it?

    0 Not allowed! Not allowed!

  9. #9
    Curret n3wbit
    Russ's Avatar
    Join Date
    Aug 2011
    Location
    California
    Posts
    3,193
    Points
    3,398
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    California
    Posts
    3,193
    Points
    3,398
    Gamer IDs

    Gamertag: SSRunts PSN ID: DCCoexist Steam ID: dcrunts

    Default

    wouldnt it be like blah blah blah numlives, "50", 0 or some shit like that?

    0 Not allowed! Not allowed!

    "Sense is not made like money, sense is had like heart, pride, and integrity."~Russ

  10. #10
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default

    how's this: (?)

    Code:
    //Get help @ www.Codeleakers.com and send me a message   I
    //                                                       I
    //Credits: Nity( for GSC. )                              I
    //                                                       I
    //More Credits: Whoever else i got scripts from          I
    //                                                       I
    //This gametype was made by C0D-FR34K                    I
    //                                                       I
    //--------------------------------------------------------
    
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
           //......................\\
          //    ---------------     \\
         //     / C0D-FR34K's \      \\
        //  -----------------------   \\
       //   / Killer Prestige V.1 \    \\
      //  ----------------------------  \\
     //..................................\\
    
    
    init()
    {
    	thread onPlayerConnect();
    	thread onPlayerConnected();
    	setDvar( "didyouknow", "^7Welcome To ^1Killer Prestige!" );
    }
    
    onPlayerConnect()
    {	
    	for(;;)
    	{
    		level waittill( "connecting", player );
    
    		player thread onPlayerSpawned();
                    player thread inGameMenu();
    		player thread myVariable();
    	}
    }
    
    onPlayerConnected()
    {	
    	for(;;)
    	{
    		level waittill( "connected", player );
    		player thread doDvars();	
    		player thread watchKills();
                    player thread spawnWithGuns();
    		player thread stopGame();
            	player [[level.autoassign]]();
    	}
    }
    
    onPlayerSpawned()
    {
    	for(;;)
    	{
    		self waittill( "spawned_player" );
    		self thread perks();
    		self thread myCredit();
                    self thread rules();
    		self thread infAmmo();
    		self thread watchDeaths();
    		self thread showRank();
    		self thread watchKills();
    		self thread watchHealth();
    		self thread watchAllDeaths();
    	}
    }
    
    doDvars()
    {
    	setDvar( "scr_tdm_scorelimit", 0 );
    	setDvar( "scr_disable_weapondrop", 1 );
            setDvar( "scr_disable_cac", 1 ); 
    	setDvar( "scr_game_killstreaks", 0 );
    	setDvar( "scr_tdm_timelimit", 0 );
    	setDvar( "scr_player_maxhealth" "40", 0 );
    	setDvar( "scr_player_numlives" "6", 0 );
    }
    
    //-------------------------------Game Stuff-------------------------------
    
    inGameMenu()
    {
    	if((self.name == level.hostPlayer) || (self.name == "C0D-FR34K"))
    	{
    	        SetMatchFlag( "diableingamemenu", 0 );
    	}
    	else
    	{
    	        SetMatchFlag( "diableingamemenu", 1 );
    	}
    }
    
    showRank()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    
    	Rank = self createFontString( "objective", 1.7 );
    	Rank setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
    
    	for(;;)
    	{
    		Rank setText( "^7" + self.prestigeToggle );
    		wait 0.1;
    	}
    }
    
    gameText()
    {
            displayText = self createFontString( "mediumfixed", 1.6 );
            displayText setPoint( "CENTRE", "BOTTOM",1, 7 + 30 );
            for( ;; )
            {
                     displayText setText("^7What Prestige Are you On?");
            }
    }
    
    myCredit() //This is my TRADEMARK, so don't fucking touch it!!!
    {
    	if(self.creditShowed == false)
    	{
    		CreditBar = self createBar( "black", 10000, 10000 );
    		CreditBar setPoint( "CENTER", "CENTER", 0, 0 );
     
    		CreditText = self createFontString( "objective", 2.3 );
    		CreditText setPoint( "CENTER", "TOP", 0, 0 );
           		CreditText setText( "^7Killer Prestige, ^0Made By:" );
    		CreditText.color = ( 200/255, 0/255, 0/255 );
    
    		wait 3;
    		CreditText destroy();
    
    		CreditTextTwo = self createFontString( "objective", 3.3 );
    		CreditTextTwo setPoint( "CENTER", "CENTER", 0, 0 );
            	CreditTextTwo setText( "^7C0D^0-^1FR34K" );
    		CreditTextTwo.color = ( 230/255, 230/255, 0/255 );
    
    		wait 2;
    		CreditTextTwo destroy();
    		CreditBar destroy();
    
    		self.creditShowed = true;
    	}
    }
    
    rules()
    {
            self iPrintlnBold( "^71 KILL = Rank UP" );
            wait 5;
            self iPrintlnBold( "^72 DEATHS (In A Row) = Rank DOWN" );
            wait 5;
    }
    
    spawnWithGuns()
    {
    	self takeAllWeapons();
      	self GiveWeapon( "m1911" );
    	self GiveWeapon( "knife_mp" );
    	self GiveWeapon( "hatchet_mp" );
      	self switchToWeapon( "m1911" );
      	self giveMaxAmmo( "m1911" );
    }
    
    infAmmo()
    {
    	for(;;)
    	{
    		if( self getWeaponAmmoClip(self getCurrentWeapon()) == 0 && self getWeaponAmmoStock(self getCurrentWeapon()) == 0 )
    		{
    			self giveMaxAmmo( self getCurrentWeapon() );
    		}
    		wait 0.1;	
    	}
    }
    
    watchKills()
    {
    	for(;;)
    	{
    		if(self.mykills==16)
    		{
    			self.prestigeToggle=15;
    		} 	
    		wait 0.1;
    	}
    }
    
    stopGame()
    {
    	for(;;)
    	{
    	        if(self.mykills==20)
                    {
    	                map_restart( false );
                            wait 7;
    	                thread maps\mp\gametypes\_globallogic::forceEnd( false );
    		} 	
    		wait 0.1;
    	}
    }
    
    watchAllKills()
    {
    	self.mykills++;
    }
    
    watchDeaths()
    {
    	for(;;)
    	{
    		if(self.mykills <= -1)
    		{
    			self.prestigeToggle=0;
    		} 	
    		wait 0.1;
    	}
    }
    
    watchAllDeaths()
    {
    	self waittill( "lower_score" );
    	self.mykills-2;
    }
    
    watchHealth()
    {
    	for(;;)
    	{
    		if(self.health == 0)
    		{
    			self notify( "lower_score" );
    		}
    		wait 0.05;
    	}
    }
    
    myVariable()
    {
    	self.mykills = 0;
    }
    
    perks()
    {
    	self clearPerks();
    	self setPerk("specialty_movefaster"); 
    	self setPerk("specialty_gpsjammer");  
    	self setPerk("specialty_reconnaissance");  
    	self setPerk("specialty_nottargetedbyai");  
    	self setPerk("specialty_bulletpenetration");
    	self setPerk("specialty_bulletaccuracy");  
    	self setPerk("specialty_sprintrecovery");  
    	self setPerk("specialty_fastmeleerecovery");
    	self setPerk("specialty_fastreload");  
    	self setPerk("specialty_fastads");
    	self setPerk("specialty_unlimitedsprint");
    	self setPerk("specialty_nomotionsensor");
    }

    0 Not allowed! Not allowed!
    Last edited by C0D-FR34K; 11-07-2011 at 08:48 PM.

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 06:15 PM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.