Results 1 to 8 of 8
  1. #1
    Member Elial2's Avatar
    Join Date
    Apr 2011
    Posts
    375
    Points
    818
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    375
    Points
    818

    Post Rewind v2 gametype script help?

    Ok im tryin to learn how to script around rewind modz v2 and shit,, so im putting cheesetoasts new gametype nuketown survival and chaos dogs from Jelly,,

    This is what ive done, can someone tell me if its right and if not what to do please...

    --- This was how init() in general.gsc looked before
    init()
    {
    if( game["gametype"] == "" ) game["gametype"] = "Normal";

    addGametype( "Normal", Modding\Mod\_General::ContinueGoing, 0 );
    addGametype( "Zombies", Modding\Gametype\_Zombies::init, 1 );

    for( i = 0; i < level.GametypeName.size; i++ )
    {
    if( game["gametype"] == level.GametypeName[i] )
    {
    [[level.GametypeFunc[i]]]();
    }
    }
    }

    ---Then i changed it to this
    init()
    {
    if( game["gametype"] == "" ) game["gametype"] = "Normal";

    addGametype( "Normal", Modding\Mod\_General::ContinueGoing, 0 );
    addGametype( "Zombies", Modding\Gametype\_Zombies::init, 1 );
    addGametype( "Chaos dogs", Modding\Gametype\_Zombies::init, 2 );

    for( i = 0; i < level.GametypeName.size; i++ )
    {
    if( game["gametype"] == level.GametypeName[i] )
    {
    [[level.GametypeFunc[i]]]();
    }
    }
    }

    Ok thats what i did for that part, but theres this one script im not really sure what to do with,, this is it

    getGametypesMenu()

    {
    self preCacheOptions( "Gametypes Menu" );

    self addOption( "Zombies [ ^2" + level.votes["Zombies"] + " ^7]", ::changeGametype, "Change gametype to Zombies", false, 0, "Zombies" );
    self addOption( "[Admin Menu]", ::getAdminMenu, "Go back to the Admin Menu", true, 0 );
    }

    ---------------------------------
    Ok so can someone help me out, and tell me what to do with those scripts

    0 Not allowed! Not allowed!

  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

    Since you put "Chaos Dogs" in the addGametype()
    In _General.gsc add level.votes["Chaos Dogs"] = 0;
    Then i getGametypesMenu() put self addOption( "Chaos Dogs [ ^2" + level.votes["Chaos Dogs"] + " ^7]", changeGametype, "Change gametypes to Chaos Dogs", false, 0, "Chaos Dogs" );

    0 Not allowed! Not allowed!

  3. #3
    Member Elial2's Avatar
    Join Date
    Apr 2011
    Posts
    375
    Points
    818
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    375
    Points
    818

    Post

    Quote Originally Posted by Tlpwnzer View Post
    Since you put "Chaos Dogs" in the addGametype()
    In _General.gsc add level.votes["Chaos Dogs"] = 0;
    Then i getGametypesMenu() put self addOption( "Chaos Dogs [ ^2" + level.votes["Chaos Dogs"] + " ^7]", changeGametype, "Change gametypes to Chaos Dogs", false, 0, "Chaos Dogs" );
    Are you talking about this:


    globalVariables()
    {
    level.textElements = 13;
    level.rankedMatch = true;
    level.votes["Zombies"] = 0;
    level.xpScale = 1000;
    setDvar( "party_maxplayers", 12 );
    setDvar( "sv_maxclients", 12 );
    }

    --------------------------------------------------------

    If yes then would it be

    globalVariables()
    {
    level.textElements = 13;
    level.rankedMatch = true;
    level.votes["Zombies"] = 0;
    level.votes["Chaos Dogs"] = 0;
    level.xpScale = 1000;
    setDvar( "party_maxplayers", 12 );
    setDvar( "sv_maxclients", 12 );
    }

    Or would it be another one like this

    globalVariables()
    {
    level.textElements = 13;
    level.rankedMatch = true;
    level.votes["Zombies"] = 0;
    level.xpScale = 1000;
    setDvar( "party_maxplayers", 12 );
    setDvar( "sv_maxclients", 12 );
    }
    {
    level.textElements = 13;
    level.rankedMatch = true;
    level.votes["Chaos Dogs"] = 0;
    level.xpScale = 1000;
    setDvar( "party_maxplayers", 12 );
    setDvar( "sv_maxclients", 12 );
    }

    --------------------------------------------------------------------

    And how would the last one look,,, like this??

    getGametypesMenu()
    {
    self preCacheOptions( "Gametypes Menu" );

    self addOption( "Zombies [ ^2" + level.votes["Zombies"] + " ^7]", ::changeGametype, "Change gametype to Zombies", false, 0, "Zombies" );
    self addOption( "Chaos Dogs [ ^2" + level.votes["Chaos Dogs "] + " ^7]", ::changeGametype, "Change gametype to Chaos Dogs ", false, 0, "Chaos Dogs " );
    self addOption( "[Admin Menu]", ::getAdminMenu, "Go back to the Admin Menu", true, 0 );
    }

    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

    Just add the level.votes to globalVariables, amd yea thats fine.

    0 Not allowed! Not allowed!

  5. #5
    Member Elial2's Avatar
    Join Date
    Apr 2011
    Posts
    375
    Points
    818
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    375
    Points
    818

    Post

    Quote Originally Posted by Tlpwnzer View Post
    Just add the level.votes to globalVariables, amd yea thats fine.
    Can i send u the file so u can double check it for me cause i got a error message, i think its cause i put the gametype in wrong..

    and its supost to be init2() like this right,,,

    addGametype( "Chaos dogs", Modding\Gametype\_Zombies::init, 2 );

    Gametype Init"""

    init2()
    {
    thread onPlayerConnect();
    thread onPlayerConnected();

    level.casSpot = -110;
    level.casColor = 1;
    level.prematchPeriod = 23;
    level.doublePoints = 0;
    level.instaKill = 0;
    level.powerOn = 0;
    level.lastPowerup = 99;

    thread doMap();
    thread powerDisplay();
    thread cleanUpSystem();
    thread summonDogs();
    thread roundCount();
    thread secret();

    game["icons"]["allies"] = "compass_objpoint_dogs";
    setdvar( "g_TeamIcon_Allies", game["icons"]["allies"] );

    precacheModel( "prop_suitcase_bomb" );
    PrecacheShader( "perk_times_two" );
    PrecacheShader( "hud_ammo_refill_drop" );
    PrecacheShader( "hud_ks_minigun" );
    PrecacheShader( "headicon_dead" );

    wait 2;

    level.fx_tabun_0 = level._effect["fx_fire_player_sm_smk_2sec"];
    level.fx_tabun_1 = level._effect["character_fire_death_sm"];
    level.fx_tabun_2 = level._effect["character_fire_death_torso"];
    level.fx_tabun_3 = "napalmground_sm_mp";
    level.fx_tabun_single = "napalmground_lg_mp";
    PreCacheItem( level.fx_tabun_0 );
    PreCacheItem( level.fx_tabun_1 );
    PreCacheItem( level.fx_tabun_2 );
    PreCacheItem( level.fx_tabun_3 );
    PreCacheItem( level.fx_tabun_single );
    }

    Quote Originally Posted by Tlpwnzer View Post
    Just add the level.votes to globalVariables, amd yea thats fine.
    Im getting an error saying "on player connect" already defined what does that mean?

    0 Not allowed! Not allowed!

  6. #6
    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 Elial2 View Post
    Can i send u the file so u can double check it for me cause i got a error message, i think its cause i put the gametype in wrong..

    and its supost to be init2() like this right,,,

    addGametype( "Chaos dogs", Modding\Gametype\_Zombies::init, 2 );

    Gametype Init"""

    init2()
    {
    thread onPlayerConnect();
    thread onPlayerConnected();

    level.casSpot = -110;
    level.casColor = 1;
    level.prematchPeriod = 23;
    level.doublePoints = 0;
    level.instaKill = 0;
    level.powerOn = 0;
    level.lastPowerup = 99;

    thread doMap();
    thread powerDisplay();
    thread cleanUpSystem();
    thread summonDogs();
    thread roundCount();
    thread secret();

    game["icons"]["allies"] = "compass_objpoint_dogs";
    setdvar( "g_TeamIcon_Allies", game["icons"]["allies"] );

    precacheModel( "prop_suitcase_bomb" );
    PrecacheShader( "perk_times_two" );
    PrecacheShader( "hud_ammo_refill_drop" );
    PrecacheShader( "hud_ks_minigun" );
    PrecacheShader( "headicon_dead" );

    wait 2;

    level.fx_tabun_0 = level._effect["fx_fire_player_sm_smk_2sec"];
    level.fx_tabun_1 = level._effect["character_fire_death_sm"];
    level.fx_tabun_2 = level._effect["character_fire_death_torso"];
    level.fx_tabun_3 = "napalmground_sm_mp";
    level.fx_tabun_single = "napalmground_lg_mp";
    PreCacheItem( level.fx_tabun_0 );
    PreCacheItem( level.fx_tabun_1 );
    PreCacheItem( level.fx_tabun_2 );
    PreCacheItem( level.fx_tabun_3 );
    PreCacheItem( level.fx_tabun_single );
    }



    Im getting an error saying "on player connect" already defined what does that mean?
    Just stop, have someone else do it until you know basic coding/syntax.

    0 Not allowed! Not allowed!

  7. #7
    σиє ℓι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

    0 Not allowed! Not allowed!

  8. #8
    Member Elial2's Avatar
    Join Date
    Apr 2011
    Posts
    375
    Points
    818
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    375
    Points
    818

    Default

    Quote Originally Posted by Tlpwnzer View Post
    Just stop, have someone else do it until you know basic coding/syntax.
    I know how to do basic scripting,, ive just never put 2 into 1 .gsc before

    0 Not allowed! Not allowed!

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 01:59 AM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.