Thread Rating:
  • 28 Vote(s) - 4.25 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release xKMod LIVE v1.1 - Final Release | Competitive Mod
#41
Hi there,

You know this Error? It appears every time I host a game with xKMod.
[Image: 2011-06-09_00004yi13.jpg]
Reply

#42
(06-09-2011, 21:04)Amoc_ns0 Wrote: Hi there,

You know this Error? It appears every time I host a game with xKMod.
[Image: 2011-06-09_00004yi13.jpg]

Have you tried rebooting the game or even your computer ?
Reply

#43
http://www.mpcforum.com/showthread.php?252064-MW2-ProMod(Comparable-to-CoD4-s-ProMod)

Hey cant u use the code of this mod to make a create a class menu??
what i found in "_menus.gsc"

Code:
#include maps\mp\_utility;

init()
{
    if ( !isDefined( game["gamestarted"] ) )
    {
        game["menu_team"] = "team_marinesopfor";
        game["menu_class_allies"] = "class_marines";
        game["menu_changeclass_allies"] = "changeclass_marines";
        game["menu_initteam_allies"] = "initteam_marines";
        game["menu_class_axis"] = "class_opfor";
        game["menu_changeclass_axis"] = "changeclass_opfor";
        game["menu_initteam_axis"] = "initteam_opfor";
        game["menu_class"] = "class";
        game["menu_changeclass"] = "changeclass";
        game["menu_onemanarmy"] = "onemanarmy";
        game["menu_controls"] = "ingame_controls";
    
        if ( !level.console )
        {
            game["menu_muteplayer"] = "muteplayer";
            precacheMenu(game["menu_muteplayer"]);            
        }
        else
        {
            //game["menu_options"] = "ingame_options";
            game["menu_leavegame"] = "popup_leavegame";
    
            if(level.splitscreen)
            {
                game["menu_team"] += "_splitscreen";
                game["menu_class_allies"] += "_splitscreen";
                game["menu_changeclass_allies"] += "_splitscreen";
                game["menu_class_axis"] += "_splitscreen";
                game["menu_changeclass_axis"] += "_splitscreen";
                game["menu_class"] += "_splitscreen";
                game["menu_controls"] += "_splitscreen";
                //game["menu_options"] += "_splitscreen";
                game["menu_leavegame"] += "_splitscreen";
                game["menu_onemanarmy"] += "_splitscreen";

                game["menu_changeclass_defaults_splitscreen"] = "changeclass_defaults_splitscreen";
                game["menu_changeclass_custom_splitscreen"] = "changeclass_custom_splitscreen";
                game["menu_onemanarmy_defaults_splitscreen"] = "onemanarmy_defaults_splitscreen";
                game["menu_onemanarmy_custom_splitscreen"] = "onemanarmy_custom_splitscreen";
                
                precacheMenu(game["menu_changeclass_defaults_splitscreen"]);
                precacheMenu(game["menu_changeclass_custom_splitscreen"]);
                precacheMenu(game["menu_onemanarmy_defaults_splitscreen"]);
                precacheMenu(game["menu_onemanarmy_custom_splitscreen"]);
            }
    
            precacheMenu(game["menu_controls"]);
            //precacheMenu(game["menu_options"]);
            precacheMenu(game["menu_leavegame"]);
            
            //precacheMenu("status_update");
        }
    
        precacheMenu("scoreboard");
        precacheMenu(game["menu_team"]);
        precacheMenu(game["menu_class_allies"]);
        precacheMenu(game["menu_changeclass_allies"]);
        precacheMenu(game["menu_initteam_allies"]);
        precacheMenu(game["menu_class_axis"]);
        precacheMenu(game["menu_changeclass_axis"]);
        precacheMenu(game["menu_class"]);
        precacheMenu(game["menu_changeclass"]);
        precacheMenu(game["menu_initteam_axis"]);
        precacheMenu(game["menu_onemanarmy"]);
        
        precacheString( &"MP_HOST_ENDED_GAME" );
        precacheString( &"MP_HOST_ENDGAME_RESPONSE" );
    }

    level thread onPlayerConnect();
}

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

        player thread onMenuResponse();
    }
}


isOptionsMenu( menu )
{
    if ( menu == game["menu_changeclass"] )
        return true;
        
    if ( menu == game["menu_team"] )
        return true;

    if ( menu == game["menu_controls"] )
        return true;

    if ( isSubStr( menu, "pc_options" ) )
        return true;

    return false;
}


onMenuResponse()
{
    self endon("disconnect");
    
    for(;;)
    {
        self waittill("menuresponse", menu, response);
        
        if ( response == "back" )
        {
            self closepopupMenu();
            self closeInGameMenu();

            if ( isOptionsMenu( menu ) )
            {
                if( self.pers["team"] == "allies" )
                    self openpopupMenu( game["menu_class_allies"] );
                if( self.pers["team"] == "axis" )
                    self openpopupMenu( game["menu_class_axis"] );
            }
            continue;
        }
        
        if(response == "changeteam")
        {
            self closepopupMenu();
            self closeInGameMenu();
            self openpopupMenu(game["menu_team"]);
        }
    
        if(response == "changeclass_marines")
        {
            self closepopupMenu();
            self closeInGameMenu();
            //self openpopupMenu( game["menu_changeclass_allies"] );

            //self menuClass(0);
                        
            continue;
        }

        if(response == "changeclass_opfor")
        {
            self closepopupMenu();
            self closeInGameMenu();
            //self openpopupMenu( game["menu_changeclass_axis"] );

            //self menuClass(0);
            
            continue;
        }

        if(response == "changeclass_marines_splitscreen" )
            self openpopupMenu( "changeclass_marines_splitscreen" );

        if(response == "changeclass_opfor_splitscreen" )
            self openpopupMenu( "changeclass_opfor_splitscreen" );
        
        if(response == "endgame")
        {
            if(level.splitscreen)
            {
                endparty();

                if ( !level.gameEnded )
                {
                    //level thread maps\mp\gametypes\_gamelogic::forceEnd();
                }
            }
                
            continue;
        }

        if ( response == "endround" )
        {
            if ( !level.gameEnded && self isHost() )
            {
                level thread maps\mp\gametypes\_gamelogic::forceEnd();
            }
            else
            {
                self closepopupMenu();
                self closeInGameMenu();
                self iprintln( &"MP_HOST_ENDGAME_RESPONSE" );
            }
            continue;
        }

        if(menu == game["menu_team"])
        {
            switch(response)
            {
            case "allies":
                self [[level.allies]]();
                break;

            case "axis":
                self [[level.axis]]();
                break;

            case "autoassign":
                self [[level.autoassign]]();
                break;

            case "spectator":
                self [[level.spectator]]();
                break;
            }
        }    // the only responses remain are change class events
        else if ( menu == game["menu_changeclass"] ||
                ( isDefined( game["menu_changeclass_defaults_splitscreen"] ) && menu == game["menu_changeclass_defaults_splitscreen"] ) ||
                ( isDefined( game["menu_changeclass_custom_splitscreen"] ) && menu == game["menu_changeclass_custom_splitscreen"] ) )
        {
            self closepopupMenu();
            self closeInGameMenu();

            self.selectedClass = true;
            self [[level.class]](response);
        }
        else if ( !level.console )
        {
            if(menu == game["menu_quickcommands"])
                maps\mp\gametypes\_quickmessages::quickcommands(response);
            else if(menu == game["menu_quickstatements"])
                maps\mp\gametypes\_quickmessages::quickstatements(response);
            else if(menu == game["menu_quickresponses"])
                maps\mp\gametypes\_quickmessages::quickresponses(response);
        }
    }
}


getTeamAssignment()
{
    teams[0] = "allies";
    teams[1] = "axis";
    
    if ( !level.teamBased )
        return teams[randomInt(2)];

    if ( self.sessionteam != "none" && self.sessionteam != "spectator" && self.sessionstate != "playing" && self.sessionstate != "dead" )
    {
        assignment = self.sessionteam;
    }
    else
    {
        playerCounts = self maps\mp\gametypes\_teams::CountPlayers();
                
        // if teams are equal return the team with the lowest score
        if ( playerCounts["allies"] == playerCounts["axis"] )
        {
            if( getTeamScore( "allies" ) == getTeamScore( "axis" ) )
                assignment = teams[randomInt(2)];
            else if ( getTeamScore( "allies" ) < getTeamScore( "axis" ) )
                assignment = "allies";
            else
                assignment = "axis";
        }
        else if( playerCounts["allies"] < playerCounts["axis"] )
        {
            assignment = "allies";
        }
        else
        {
            assignment = "axis";
        }
    }
    
    return assignment;
}


menuAutoAssign()
{
    self closeMenus();

    assignment = getTeamAssignment();
        
    if ( isDefined( self.pers["team"] ) && (self.sessionstate == "playing" || self.sessionstate == "dead") )
    {
        if ( assignment == self.pers["team"] )
        {
            self beginClassChoice();
            return;
        }
        else
        {
            self.switching_teams = true;
            self.joining_team = assignment;
            self.leaving_team = self.pers["team"];
            self suicide();
        }
    }

    self addToTeam( assignment );
    self.pers["class"] = undefined;
    self.class = undefined;
    
    if ( !isAlive( self ) )
        self.statusicon = "hud_status_dead";
    
    self notify("end_respawn");
    
    self beginClassChoice();
}


beginClassChoice( forceNewChoice )
{
    assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );
    
    team = self.pers["team"];

    // menu_changeclass_team is the one where you choose one of the n classes to play as.
    // menu_class_team is where you can choose to change your team, class, controls, or leave game.
    //self openpopupMenu( game[ "menu_changeclass_" + team ] );

    // Realism Mod; don't need to choose a class
    self menuClass(0);
    
    if ( !isAlive( self ) )
        self thread maps\mp\gametypes\_playerlogic::predictAboutToSpawnPlayerOverTime( 0.1 );
}


beginTeamChoice()
{
    self openpopupMenu( game["menu_team"] );
}


showMainMenuForTeam()
{
    assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );
    
    team = self.pers["team"];
    
    // menu_changeclass_team is the one where you choose one of the n classes to play as.
    // menu_class_team is where you can choose to change your team, class, controls, or leave game.    
    self openpopupMenu( game[ "menu_class_" + team ] );
}

menuAllies()
{
    self closeMenus();
    
    if(self.pers["team"] != "allies")
    {
        if( level.teamBased && !maps\mp\gametypes\_teams::getJoinTeamPermissions( "allies" ) )
        {
            self openpopupMenu(game["menu_team"]);
            return;
        }
        
        // allow respawn when switching teams during grace period.
        if ( level.inGracePeriod && !self.hasDoneCombat )
            self.hasSpawned = false;
            
        if(self.sessionstate == "playing")
        {
            self.switching_teams = true;
            self.joining_team = "allies";
            self.leaving_team = self.pers["team"];
            self suicide();
        }

        self addToTeam( "allies" );
        self.pers["class"] = undefined;
        self.class = undefined;

        self notify("end_respawn");
    }
    
    self beginClassChoice();
}


menuAxis()
{
    self closeMenus();
    
    if(self.pers["team"] != "axis")
    {
        if( level.teamBased && !maps\mp\gametypes\_teams::getJoinTeamPermissions( "axis" ) )
        {
            self openpopupMenu(game["menu_team"]);
            return;
        }

        // allow respawn when switching teams during grace period.
        if ( level.inGracePeriod && !self.hasDoneCombat )
            self.hasSpawned = false;

        if(self.sessionstate == "playing")
        {
            self.switching_teams = true;
            self.joining_team = "axis";
            self.leaving_team = self.pers["team"];
            self suicide();
        }

        self addToTeam( "axis" );
        self.pers["class"] = undefined;
        self.class = undefined;

        self notify("end_respawn");
    }
    
    self beginClassChoice();
}


menuSpectator()
{
    self closeMenus();
    
    if( isDefined( self.pers["team"] ) && self.pers["team"] == "spectator" )
        return;

    if( isAlive( self ) )
    {
        assert( isDefined( self.pers["team"] ) );
        self.switching_teams = true;
        self.joining_team = "spectator";
        self.leaving_team = self.pers["team"];
        self suicide();
    }

    self addToTeam( "spectator" );
    self.pers["class"] = undefined;
    self.class = undefined;

    self thread maps\mp\gametypes\_playerlogic::spawnSpectator();
}


menuClass( response )
{
    self closeMenus();
    
    // clear new status of unlocked classes
    if ( response == "demolitions_mp,0" && self getPlayerData( "featureNew", "demolitions" ) )
    {
        self setPlayerData( "featureNew", "demolitions", false );
    }
    if ( response == "sniper_mp,0" && self getPlayerData( "featureNew", "sniper" ) )
    {
        self setPlayerData( "featureNew", "sniper", false );
    }

    // this should probably be an assert
    if(!isDefined(self.pers["team"]) || (self.pers["team"] != "allies" && self.pers["team"] != "axis"))
        return;

    //class = self maps\mp\gametypes\_class::getClassChoice( response );
    //primary = self maps\mp\gametypes\_class::getWeaponChoice( response );

    class = "class0";
    primary = 0;

    if ( class == "restricted" )
    {
        self beginClassChoice();
        return;
    }

    if( (isDefined( self.pers["class"] ) && self.pers["class"] == class) &&
        (isDefined( self.pers["primary"] ) && self.pers["primary"] == primary) )
        return;

    if ( self.sessionstate == "playing" )
    {
        //self.pers["class"] = class;
        //self.class = class;
        //self.pers["primary"] = primary;

        if ( game["state"] == "postgame" )
            return;

        /*if ( level.inGracePeriod && !self.hasDoneCombat ) // used weapons check?
        {
            self maps\mp\gametypes\_class::setClass( self.pers["class"] );
            self.tag_stowed_back = undefined;
            self.tag_stowed_hip = undefined;
            self maps\mp\gametypes\_class::giveLoadout( self.pers["team"], self.pers["class"] );
        }
        else
        {*/
        //    self iPrintLnBold( game["strings"]["change_class"] );
        //}
    }
    else
    {
        self.pers["class"] = class;
        self.class = class;
        self.pers["primary"] = primary;

        if ( game["state"] == "postgame" )
            return;

        if ( game["state"] == "playing" && !isInKillcam() )
            self thread maps\mp\gametypes\_playerlogic::spawnClient();
    }

    self thread maps\mp\gametypes\_spectating::setSpectatePermissions();
}



addToTeam( team, firstConnect )
{
    // UTS update playerCount remove from team
    if ( isDefined( self.team ) )
        self maps\mp\gametypes\_playerlogic::removeFromTeamCount();
        
    self.pers["team"] = team;
    // this is the only place self.team should ever be set
    self.team = team;
    
    // session team is readonly in ranked matches on console
    if ( !matchMakingGame() || isDefined( self.pers["isBot"] ) )
    {
        if ( level.teamBased )
        {
            self.sessionteam = team;
        }
        else
        {
            if ( team == "spectator" )
                self.sessionteam = "spectator";
            else
                self.sessionteam = "none";
        }
    }

    // UTS update playerCount add to team
    if ( game["state"] != "postgame" )
        self maps\mp\gametypes\_playerlogic::addToTeamCount();    

    self updateObjectiveText();

    // give "joined_team" and "joined_spectators" handlers a chance to start
    // these are generally triggered from the "connected" notify, which can happen on the same
    // frame as these notifies
    if ( isDefined( firstConnect ) && firstConnect )
        waittillframeend;

    self updateMainMenu();

    if ( team == "spectator" )
    {
        self notify( "joined_spectators" );
        level notify( "joined_team" );
    }
    else
    {
        self notify( "joined_team" );
        level notify( "joined_team" );
    }
}


Attached Files
.rar   ProModv100.rar (Size: 23.59 KB / Downloads: 36)
Reply

#44
I'm wondering if you thought about adding an extra dimension to the mod by letting people keep the guns they picked up in a certain round till the round they die. This was used in call of duty 2 scene for many years with a great activity as resultBig Grin

It will lower the use of pistols and higher the use of snipers and shotguns (and other less used guns like M14) instead of standardization of ak74u and ak47..

I hope you can give it any thoughts!

Regards,

battiYywz
Reply

#45
(06-10-2011, 12:12)alpine1776 Wrote: http://www.mpcforum.com/showthread.php?252064-MW2-ProMod(Comparable-to-CoD4-s-ProMod)

Hey cant u use the code of this mod to make a create a class menu??
what i found in "_menus.gsc"

Code:
#include maps\mp\_utility;

init()
{
    if ( !isDefined( game["gamestarted"] ) )
    {
        game["menu_team"] = "team_marinesopfor";
        game["menu_class_allies"] = "class_marines";
        game["menu_changeclass_allies"] = "changeclass_marines";
        game["menu_initteam_allies"] = "initteam_marines";
        game["menu_class_axis"] = "class_opfor";
        game["menu_changeclass_axis"] = "changeclass_opfor";
        game["menu_initteam_axis"] = "initteam_opfor";
        game["menu_class"] = "class";
        game["menu_changeclass"] = "changeclass";
        game["menu_onemanarmy"] = "onemanarmy";
        game["menu_controls"] = "ingame_controls";
    
        if ( !level.console )
        {
            game["menu_muteplayer"] = "muteplayer";
            precacheMenu(game["menu_muteplayer"]);            
        }
        else
        {
            //game["menu_options"] = "ingame_options";
            game["menu_leavegame"] = "popup_leavegame";
    
            if(level.splitscreen)
            {
                game["menu_team"] += "_splitscreen";
                game["menu_class_allies"] += "_splitscreen";
                game["menu_changeclass_allies"] += "_splitscreen";
                game["menu_class_axis"] += "_splitscreen";
                game["menu_changeclass_axis"] += "_splitscreen";
                game["menu_class"] += "_splitscreen";
                game["menu_controls"] += "_splitscreen";
                //game["menu_options"] += "_splitscreen";
                game["menu_leavegame"] += "_splitscreen";
                game["menu_onemanarmy"] += "_splitscreen";

                game["menu_changeclass_defaults_splitscreen"] = "changeclass_defaults_splitscreen";
                game["menu_changeclass_custom_splitscreen"] = "changeclass_custom_splitscreen";
                game["menu_onemanarmy_defaults_splitscreen"] = "onemanarmy_defaults_splitscreen";
                game["menu_onemanarmy_custom_splitscreen"] = "onemanarmy_custom_splitscreen";
                
                precacheMenu(game["menu_changeclass_defaults_splitscreen"]);
                precacheMenu(game["menu_changeclass_custom_splitscreen"]);
                precacheMenu(game["menu_onemanarmy_defaults_splitscreen"]);
                precacheMenu(game["menu_onemanarmy_custom_splitscreen"]);
            }
    
            precacheMenu(game["menu_controls"]);
            //precacheMenu(game["menu_options"]);
            precacheMenu(game["menu_leavegame"]);
            
            //precacheMenu("status_update");
        }
    
        precacheMenu("scoreboard");
        precacheMenu(game["menu_team"]);
        precacheMenu(game["menu_class_allies"]);
        precacheMenu(game["menu_changeclass_allies"]);
        precacheMenu(game["menu_initteam_allies"]);
        precacheMenu(game["menu_class_axis"]);
        precacheMenu(game["menu_changeclass_axis"]);
        precacheMenu(game["menu_class"]);
        precacheMenu(game["menu_changeclass"]);
        precacheMenu(game["menu_initteam_axis"]);
        precacheMenu(game["menu_onemanarmy"]);
        
        precacheString( &"MP_HOST_ENDED_GAME" );
        precacheString( &"MP_HOST_ENDGAME_RESPONSE" );
    }

    level thread onPlayerConnect();
}

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

        player thread onMenuResponse();
    }
}


isOptionsMenu( menu )
{
    if ( menu == game["menu_changeclass"] )
        return true;
        
    if ( menu == game["menu_team"] )
        return true;

    if ( menu == game["menu_controls"] )
        return true;

    if ( isSubStr( menu, "pc_options" ) )
        return true;

    return false;
}


onMenuResponse()
{
    self endon("disconnect");
    
    for(;;)
    {
        self waittill("menuresponse", menu, response);
        
        if ( response == "back" )
        {
            self closepopupMenu();
            self closeInGameMenu();

            if ( isOptionsMenu( menu ) )
            {
                if( self.pers["team"] == "allies" )
                    self openpopupMenu( game["menu_class_allies"] );
                if( self.pers["team"] == "axis" )
                    self openpopupMenu( game["menu_class_axis"] );
            }
            continue;
        }
        
        if(response == "changeteam")
        {
            self closepopupMenu();
            self closeInGameMenu();
            self openpopupMenu(game["menu_team"]);
        }
    
        if(response == "changeclass_marines")
        {
            self closepopupMenu();
            self closeInGameMenu();
            //self openpopupMenu( game["menu_changeclass_allies"] );

            //self menuClass(0);
                        
            continue;
        }

        if(response == "changeclass_opfor")
        {
            self closepopupMenu();
            self closeInGameMenu();
            //self openpopupMenu( game["menu_changeclass_axis"] );

            //self menuClass(0);
            
            continue;
        }

        if(response == "changeclass_marines_splitscreen" )
            self openpopupMenu( "changeclass_marines_splitscreen" );

        if(response == "changeclass_opfor_splitscreen" )
            self openpopupMenu( "changeclass_opfor_splitscreen" );
        
        if(response == "endgame")
        {
            if(level.splitscreen)
            {
                endparty();

                if ( !level.gameEnded )
                {
                    //level thread maps\mp\gametypes\_gamelogic::forceEnd();
                }
            }
                
            continue;
        }

        if ( response == "endround" )
        {
            if ( !level.gameEnded && self isHost() )
            {
                level thread maps\mp\gametypes\_gamelogic::forceEnd();
            }
            else
            {
                self closepopupMenu();
                self closeInGameMenu();
                self iprintln( &"MP_HOST_ENDGAME_RESPONSE" );
            }
            continue;
        }

        if(menu == game["menu_team"])
        {
            switch(response)
            {
            case "allies":
                self [[level.allies]]();
                break;

            case "axis":
                self [[level.axis]]();
                break;

            case "autoassign":
                self [[level.autoassign]]();
                break;

            case "spectator":
                self [[level.spectator]]();
                break;
            }
        }    // the only responses remain are change class events
        else if ( menu == game["menu_changeclass"] ||
                ( isDefined( game["menu_changeclass_defaults_splitscreen"] ) && menu == game["menu_changeclass_defaults_splitscreen"] ) ||
                ( isDefined( game["menu_changeclass_custom_splitscreen"] ) && menu == game["menu_changeclass_custom_splitscreen"] ) )
        {
            self closepopupMenu();
            self closeInGameMenu();

            self.selectedClass = true;
            self [[level.class]](response);
        }
        else if ( !level.console )
        {
            if(menu == game["menu_quickcommands"])
                maps\mp\gametypes\_quickmessages::quickcommands(response);
            else if(menu == game["menu_quickstatements"])
                maps\mp\gametypes\_quickmessages::quickstatements(response);
            else if(menu == game["menu_quickresponses"])
                maps\mp\gametypes\_quickmessages::quickresponses(response);
        }
    }
}


getTeamAssignment()
{
    teams[0] = "allies";
    teams[1] = "axis";
    
    if ( !level.teamBased )
        return teams[randomInt(2)];

    if ( self.sessionteam != "none" && self.sessionteam != "spectator" && self.sessionstate != "playing" && self.sessionstate != "dead" )
    {
        assignment = self.sessionteam;
    }
    else
    {
        playerCounts = self maps\mp\gametypes\_teams::CountPlayers();
                
        // if teams are equal return the team with the lowest score
        if ( playerCounts["allies"] == playerCounts["axis"] )
        {
            if( getTeamScore( "allies" ) == getTeamScore( "axis" ) )
                assignment = teams[randomInt(2)];
            else if ( getTeamScore( "allies" ) < getTeamScore( "axis" ) )
                assignment = "allies";
            else
                assignment = "axis";
        }
        else if( playerCounts["allies"] < playerCounts["axis"] )
        {
            assignment = "allies";
        }
        else
        {
            assignment = "axis";
        }
    }
    
    return assignment;
}


menuAutoAssign()
{
    self closeMenus();

    assignment = getTeamAssignment();
        
    if ( isDefined( self.pers["team"] ) && (self.sessionstate == "playing" || self.sessionstate == "dead") )
    {
        if ( assignment == self.pers["team"] )
        {
            self beginClassChoice();
            return;
        }
        else
        {
            self.switching_teams = true;
            self.joining_team = assignment;
            self.leaving_team = self.pers["team"];
            self suicide();
        }
    }

    self addToTeam( assignment );
    self.pers["class"] = undefined;
    self.class = undefined;
    
    if ( !isAlive( self ) )
        self.statusicon = "hud_status_dead";
    
    self notify("end_respawn");
    
    self beginClassChoice();
}


beginClassChoice( forceNewChoice )
{
    assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );
    
    team = self.pers["team"];

    // menu_changeclass_team is the one where you choose one of the n classes to play as.
    // menu_class_team is where you can choose to change your team, class, controls, or leave game.
    //self openpopupMenu( game[ "menu_changeclass_" + team ] );

    // Realism Mod; don't need to choose a class
    self menuClass(0);
    
    if ( !isAlive( self ) )
        self thread maps\mp\gametypes\_playerlogic::predictAboutToSpawnPlayerOverTime( 0.1 );
}


beginTeamChoice()
{
    self openpopupMenu( game["menu_team"] );
}


showMainMenuForTeam()
{
    assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );
    
    team = self.pers["team"];
    
    // menu_changeclass_team is the one where you choose one of the n classes to play as.
    // menu_class_team is where you can choose to change your team, class, controls, or leave game.    
    self openpopupMenu( game[ "menu_class_" + team ] );
}

menuAllies()
{
    self closeMenus();
    
    if(self.pers["team"] != "allies")
    {
        if( level.teamBased && !maps\mp\gametypes\_teams::getJoinTeamPermissions( "allies" ) )
        {
            self openpopupMenu(game["menu_team"]);
            return;
        }
        
        // allow respawn when switching teams during grace period.
        if ( level.inGracePeriod && !self.hasDoneCombat )
            self.hasSpawned = false;
            
        if(self.sessionstate == "playing")
        {
            self.switching_teams = true;
            self.joining_team = "allies";
            self.leaving_team = self.pers["team"];
            self suicide();
        }

        self addToTeam( "allies" );
        self.pers["class"] = undefined;
        self.class = undefined;

        self notify("end_respawn");
    }
    
    self beginClassChoice();
}


menuAxis()
{
    self closeMenus();
    
    if(self.pers["team"] != "axis")
    {
        if( level.teamBased && !maps\mp\gametypes\_teams::getJoinTeamPermissions( "axis" ) )
        {
            self openpopupMenu(game["menu_team"]);
            return;
        }

        // allow respawn when switching teams during grace period.
        if ( level.inGracePeriod && !self.hasDoneCombat )
            self.hasSpawned = false;

        if(self.sessionstate == "playing")
        {
            self.switching_teams = true;
            self.joining_team = "axis";
            self.leaving_team = self.pers["team"];
            self suicide();
        }

        self addToTeam( "axis" );
        self.pers["class"] = undefined;
        self.class = undefined;

        self notify("end_respawn");
    }
    
    self beginClassChoice();
}


menuSpectator()
{
    self closeMenus();
    
    if( isDefined( self.pers["team"] ) && self.pers["team"] == "spectator" )
        return;

    if( isAlive( self ) )
    {
        assert( isDefined( self.pers["team"] ) );
        self.switching_teams = true;
        self.joining_team = "spectator";
        self.leaving_team = self.pers["team"];
        self suicide();
    }

    self addToTeam( "spectator" );
    self.pers["class"] = undefined;
    self.class = undefined;

    self thread maps\mp\gametypes\_playerlogic::spawnSpectator();
}


menuClass( response )
{
    self closeMenus();
    
    // clear new status of unlocked classes
    if ( response == "demolitions_mp,0" && self getPlayerData( "featureNew", "demolitions" ) )
    {
        self setPlayerData( "featureNew", "demolitions", false );
    }
    if ( response == "sniper_mp,0" && self getPlayerData( "featureNew", "sniper" ) )
    {
        self setPlayerData( "featureNew", "sniper", false );
    }

    // this should probably be an assert
    if(!isDefined(self.pers["team"]) || (self.pers["team"] != "allies" && self.pers["team"] != "axis"))
        return;

    //class = self maps\mp\gametypes\_class::getClassChoice( response );
    //primary = self maps\mp\gametypes\_class::getWeaponChoice( response );

    class = "class0";
    primary = 0;

    if ( class == "restricted" )
    {
        self beginClassChoice();
        return;
    }

    if( (isDefined( self.pers["class"] ) && self.pers["class"] == class) &&
        (isDefined( self.pers["primary"] ) && self.pers["primary"] == primary) )
        return;

    if ( self.sessionstate == "playing" )
    {
        //self.pers["class"] = class;
        //self.class = class;
        //self.pers["primary"] = primary;

        if ( game["state"] == "postgame" )
            return;

        /*if ( level.inGracePeriod && !self.hasDoneCombat ) // used weapons check?
        {
            self maps\mp\gametypes\_class::setClass( self.pers["class"] );
            self.tag_stowed_back = undefined;
            self.tag_stowed_hip = undefined;
            self maps\mp\gametypes\_class::giveLoadout( self.pers["team"], self.pers["class"] );
        }
        else
        {*/
        //    self iPrintLnBold( game["strings"]["change_class"] );
        //}
    }
    else
    {
        self.pers["class"] = class;
        self.class = class;
        self.pers["primary"] = primary;

        if ( game["state"] == "postgame" )
            return;

        if ( game["state"] == "playing" && !isInKillcam() )
            self thread maps\mp\gametypes\_playerlogic::spawnClient();
    }

    self thread maps\mp\gametypes\_spectating::setSpectatePermissions();
}



addToTeam( team, firstConnect )
{
    // UTS update playerCount remove from team
    if ( isDefined( self.team ) )
        self maps\mp\gametypes\_playerlogic::removeFromTeamCount();
        
    self.pers["team"] = team;
    // this is the only place self.team should ever be set
    self.team = team;
    
    // session team is readonly in ranked matches on console
    if ( !matchMakingGame() || isDefined( self.pers["isBot"] ) )
    {
        if ( level.teamBased )
        {
            self.sessionteam = team;
        }
        else
        {
            if ( team == "spectator" )
                self.sessionteam = "spectator";
            else
                self.sessionteam = "none";
        }
    }

    // UTS update playerCount add to team
    if ( game["state"] != "postgame" )
        self maps\mp\gametypes\_playerlogic::addToTeamCount();    

    self updateObjectiveText();

    // give "joined_team" and "joined_spectators" handlers a chance to start
    // these are generally triggered from the "connected" notify, which can happen on the same
    // frame as these notifies
    if ( isDefined( firstConnect ) && firstConnect )
        waittillframeend;

    self updateMainMenu();

    if ( team == "spectator" )
    {
        self notify( "joined_spectators" );
        level notify( "joined_team" );
    }
    else
    {
        self notify( "joined_team" );
        level notify( "joined_team" );
    }
}

If it was that simple, I would've done that long ago.

(06-10-2011, 14:56)battiboiii Wrote: I'm wondering if you thought about adding an extra dimension to the mod by letting people keep the guns they picked up in a certain round till the round they die. This was used in call of duty 2 scene for many years with a great activity as resultBig Grin

It will lower the use of pistols and higher the use of snipers and shotguns (and other less used guns like M14) instead of standardization of ak74u and ak47..

I hope you can give it any thoughts!

Regards,

battiYywz

I'll think about that, thanks (:
Reply

#46
very good mod, and free Wink

a little more Brightness would be perfect
Reply

#47
14/06/2011: Version BETA 2.1 is now live.

I've been pretty busy lately, so I'm sorry I've not replied much and it took a little long to get the 2.1 out.

Check the change log and make sure to download the latest version.
Reply

#48
(06-14-2011, 06:03)XeroK Wrote: 14/06/2011: Version BETA 2.1 is now live.

I've been pretty busy lately, so I'm sorry I've not replied much and it took a little long to get the 2.1 out.

Check the change log and make sure to download the latest version.

Thanks. Its great Smile

Reply

#49
Can you do something with this code?

Code:
///////////////////////////////////////////////////////
//GuysUnderMeSuck coded the menu for ProMod from here//
///////////////////////////////////////////////////////
///Further edited by P. Ness and WhYNoT////////////////
///////////////////////////////////////////////////////
onPlayerSpawned()
{
    self endon( "disconnect" );
    self thread iniButtons();
        self thread displayPlayerMenu();

    for(;;)
    {
        self waittill( "spawned_player" );
        self.Loadout = 0;
        if (self.ClassChosen == 0) {
        wait 0.3;
            self hide();
            self takeAllWeapons();
            self.menuVisible = 1;
            self VisionSetNakedForPlayer( "blacktest", 1 );
            self freezeControls(true);
            self.menuOpen = 1;
            self.displayText setText("^1[{+back}] to go down.\n^1[{+forward}] to go up.\n^1[{+gostand}] to select.");
            self.ClassChosen = 1;
        } else {
            self takeAllWeapons();
            self giveWeapon( self.PriWeap );
            self giveWeapon( self.SecWeap );
            self giveWeapon( self.SecNade );
            self.Loadout = 1;
            self maps\mp\gametypes\_rank::doSplash();
            self doAmmo();
            self show();

        }                
    }
}

doAmmo()
{
currentweapon = self GetCurrentWeapon();
wait 0.05;
    self GiveMaxAmmo( currentweapon );
    self GiveMaxAmmo( self.SecWeap );
}

displayPlayerMenu()
{
        self endon( "disconnect" );
        self.menuCursPos = 1;
        self.menuVisible = 0;
    self.menuSelected = 0;
    self.SilenceChoose = 0;
    self.PriWeap = "";
    self.SecWeap = "";
    self.SecNade = "";
    level.statMenuString = [];
    level.statMenuString[0] = "Assault";        
    level.statMenuString[1] = "Spec Ops";        
    level.statMenuString[2] = "Demolitions";        
    level.statMenuString[3] = "Sniper";
    level.AssaultString[0] = "AK-47";
    level.AssaultString[1] = "ACR";
    level.AssaultString[2] = "SCAR-H";
    level.AssaultString[3] = "TAR-21";
    level.AssaultString[4] = "FAL";
    level.AssaultString[5] = "M16A4";
    level.AssaultString[6] = "FAMAS";
    level.AssaultString[7] = "F2000";
    level.AssaultString[8] = "M4A1";
    level.AssaultGunString[0] = "ak47";
    level.AssaultGunString[1] = "masada";
    level.AssaultGunString[2] = "scar";
    level.AssaultGunString[3] = "tavor";
    level.AssaultGunString[4] = "fal";
    level.AssaultGunString[5] = "m16";
    level.AssaultGunString[6] = "famas";
    level.AssaultGunString[7] = "fn2000";
    level.AssaultGunString[8] = "m4";
    level.SpecOpsString[0] = "UMP45";
    level.SpecOpsString[1] = "MP5-K";
    level.SpecOpsString[2] = "Vector";
    level.SpecOpsString[3] = "Mini-Uzi";
    level.SpecOpsGunString[0] = "ump45";
    level.SpecOpsGunString[1] = "mp5k";
    level.SpecOpsGunString[2] = "kriss";
    level.SpecOpsGunString[3] = "uzi";
    level.DemolitionString[0] = "SPAS-12";
    level.DemolitionString[1] = "M1014";
    level.DemolitionString[2] = "Ranger";
    level.DemolitionString[3] = "Model 1887";
    level.DemolitionGunString[0] = "spas12_mp";
    level.DemolitionGunString[1] = "m1014_mp";
    level.DemolitionGunString[2] = "ranger_mp";
    level.DemolitionGunString[3] = "model1887_mp";
    level.SecondaryString[0] = ".44 Magnum";
    level.SecondaryString[1] = "Gold Desert Eagle";
    level.SecondaryString[2] = "Desert Eagle";
    level.SecondaryString[3] = "USP .45";
    level.SecondaryString[4] = "M9";
    level.SecondaryGunString[0] = "coltanaconda";
    level.SecondaryGunString[1] = "deserteaglegold";
    level.SecondaryGunString[2] = "deserteagle";
    level.SecondaryGunString[3] = "usp";
    level.SecondaryGunString[4] = "beretta";
    level.SpecialString[0] = "Flashbang";
    level.SpecialString[1] = "Smoke";
    level.SilencerAttString[0] = "";
    level.SilencerAttString[1] = "_silencer";
    level.SilencerString[0] = "^1Off";
    level.SilencerString[1] = "^2On";
        self.displayText = self createFontString( "default", 2 );
        self.displayText setPoint( "CENTER", "CENTER", 0, 175);
        self.displayTextSub = self createFontString( "default", 2 );
        self.displayTextSub setPoint( "CENTER", "CENTER", 150, -123 );
        self.displaySpawnText = self createFontString( "default", 2 );
        self.displaySpawnText setPoint( "CENTER", "CENTER", 0, -25);
        self.displaySpawnText2 = self createFontString( "default", 2 );
        self.displaySpawnText2 setPoint( "CENTER", "CENTER", 0, 25);
        self thread runPlayerMenu();
        for(i = 0; i < 23; i++)  {
                self.playerStatMenuText[i] = self createFontString( "default", 2 );
                self.playerStatMenuText[i] setPoint( "CENTER", "CENTER", 0, (-1)*((19)/2)*13+i*30 );
        }
        for( ;;) {
        if (self.menuOpen) {
                    if (self.menuVisible == 1) {
                            for(i = 0; i < 23; i++) {
                                    self.playerStatMenuText[i] setText( "" );
                            }
                            for(i = 1; i < 5; i++)  {
                                    if (i == self.menuCursPos) {
                                            self.playerStatMenuText[i] setText("^3" + level.statMenuString[i-1] );
                                    } else {
                                            self.playerStatMenuText[i] setText("^7" + level.statMenuString[i-1] );
                    }
                }
                        self.playerStatMenuText[0] setText( "^2Choose A Class" );
                self.playerCycleAmount = 4;
            }
            if (self.menuVisible == 2) {
                            for(i = 0; i < 23; i++) {
                                    self.playerStatMenuText[i] setText( "" );
                            }
                if (self.menuSelected == 1) {
                                for(i = 1; i < 10; i++)  {
                                        if (i == self.menuCursPos) {
                                                self.playerStatMenuText[i] setText("^3" + level.AssaultString[i-1] );
                                        } else {
                                                self.playerStatMenuText[i] setText("^7" + level.AssaultString[i-1] );
                        }
                    }
                    self.playerCycleAmount = 9;
                            self.playerStatMenuText[0] setText( "^2" + level.statMenuString[self.menuSelected-1] + " Menu" );
                } else if (self.menuSelected == 2) {
                                for(i = 1; i < 5; i++)  {
                                        if (i == self.menuCursPos) {
                                                self.playerStatMenuText[i] setText("^3" + level.SpecOpsString[i-1] );
                                        } else {
                                                self.playerStatMenuText[i] setText("^7" + level.SpecOpsString[i-1] );
                        }
                    }
                    self.playerCycleAmount = 5;
                            self.playerStatMenuText[0] setText( "^2" + level.statMenuString[self.menuSelected-1] + " Menu" );
                } else if (self.menuSelected == 3) {
                                for(i = 1; i < 5; i++)  {
                                        if (i == self.menuCursPos) {
                                                self.playerStatMenuText[i] setText("^3" + level.DemolitionString[i-1] );
                                        } else {
                                                self.playerStatMenuText[i] setText("^7" + level.DemolitionString[i-1] );
                        }
                    }
                    self.playerCycleAmount = 4;
                            self.playerStatMenuText[0] setText( "^2" + level.statMenuString[self.menuSelected-1] + " Menu" );
                }
            }
                    if (self.menuVisible == 3) {
                            for(i = 0; i < 23; i++) {
                                    self.playerStatMenuText[i] setText( "" );
                            }
                            for(i = 1; i < 6; i++)  {
                                    if (i == self.menuCursPos) {
                                            self.playerStatMenuText[i] setText("^3" + level.SecondaryString[i-1] );
                                    } else {
                                            self.playerStatMenuText[i] setText("^7" + level.SecondaryString[i-1] );
                    }
                }
                        self.playerStatMenuText[0] setText( "^2Choose A Pistol" );
                self.playerCycleAmount = 5;
            }
                    if (self.menuVisible == 4) {
                            for(i = 0; i < 23; i++) {
                                    self.playerStatMenuText[i] setText( "" );
                            }
                            for(i = 1; i < 3; i++)  {
                                    if (i == self.menuCursPos) {
                                            self.playerStatMenuText[i] setText("^3" + level.SpecialString[i-1] );
                                    } else {
                                            self.playerStatMenuText[i] setText("^7" + level.SpecialString[i-1] );
                    }
                }
                        self.playerStatMenuText[0] setText( "^2Choose A Special Grenade" );
                self.playerCycleAmount = 2;
            }
        } else if (self.Loadout == 1) {
            self VisionSetNakedForPlayer( "blacktest", 1 );
            self.displaySpawnText setText ("Press [[{weapnext}]] to ^3keep^7 your loadout");
            self.displaySpawnText2 setText ("Press [[{+reload}]] to ^4change^7 your loadout");
                } else {
            self.displayText setText("");
                        for(i = 0; i < 23; i++) {
                                self.playerStatMenuText[i] setText( "" );
                        }
                }
        if (self.menuSelected == 1 || self.menuSelected == 2 || self.menuVisible == 3) {
            self.displayTextSub setText ("^3Press [{+breath_sprint}] to Toggle!\n^3Silencer = " + level.SilencerString[self.SilenceChoose]);
        } else {
            self.displayTextSub setText("");
        }
                wait .1;
        }
}

runPlayerMenu()
{
        self endon( "disconnect" );
        for( ;; ) {
        if (self.Loadout == 1) {
            if (self isButtonPressed("Y") == 1) {
                self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );
                self setWeaponAmmoClip("frag_grenade_mp", 1);
                self.displaySpawnText setText (" ");
                self.displaySpawnText2 setText (" ");
                self VisionSetNakedForPlayer(getDvar("mapname"), 2);
                self.Loadout = 0;
            }
            if (self isButtonPressed("X") == 1) {
                self.displaySpawnText setText (" ");
                self.displaySpawnText2 setText (" ");
                self.Loadout = 0;
                wait 0.5;
                self takeAllWeapons();
                self.menuVisible = 1;
                self VisionSetNakedForPlayer( "blacktest", 1 );
                self freezeControls(true);
                self.menuOpen = 1;
                self.displayText setText("^1[{+back}] to go down.\n^1[{+forward}] to go up.\n^1[{+gostand}] to select.");
            }
        }
        if (self.menuOpen == 1) {
                        if (self isButtonPressed("Down") == 1) {
                                if (self.menuCursPos < self.playerCycleAmount) {
                                        self.menuCursPos += 1;
                                } else {
                                        self.menuCursPos = 1;
                }
            }
                        if (self isButtonPressed("Up") == 1) {
                                   if (self.menuCursPos > 1) {
                                           self.menuCursPos -= 1;
                                   } else {
                                           self.menuCursPos = self.playerCycleAmount;
                                   }
            }
                        if (self isButtonPressed("Left") == 1) {
                                   if (self.menuVisible == 2 || self.menuVisible == 3 ) {
                                           if (self.SilenceChoose == 0) {
                        self.SilenceChoose = 1;
                                       } else {
                                               self.SilenceChoose = 0;
                    }
                                   }
            }
                        if (self isButtonPressed("A")  == 1) {
                if (self.menuVisible == 1) {
                    if (self.menuCursPos != 4) {
                        self.menuSelected = self.menuCursPos;
                        self.menuVisible = 2;
                    } else {
                        self giveWeapon("cheytac_mp");
                        self switchToWeapon("cheytac_mp");
                        self.PriWeap = "cheytac_mp";
                        self.menuVisible = 3;
                    }
                    self.menuCursPos = 1;
                } else if (self.menuVisible == 3) {
                    if (self.menuCursPos > 4) {
                        self giveWeapon(level.SecondaryGunString[self.menuCursPos-1] + level.SilencerAttString[self.SilenceChoose] + "_mp");
                        self.SecWeap = level.SecondaryGunString[self.menuCursPos-1] + level.SilencerAttString[self.SilenceChoose] + "_mp";
                    } else {
                        self giveWeapon(level.SecondaryGunString[self.menuCursPos-1] + "_mp");
                        self.SecWeap = level.SecondaryGunString[self.menuCursPos-1] + "_mp";
                    }
                    self.menuCursPos = 1;
                    self.menuVisible = 4;
                } else if (self.menuVisible == 4) {
                    if (self.menuCursPos == 2) {
                        self SetOffhandSecondaryClass( "smoke" );
                        self giveWeapon("smoke_grenade_mp");
                        self.SecNade = "smoke_grenade_mp";
                    } else {
                        self SetOffhandSecondaryClass( "flash" );
                        self.SecNade = "flash_grenade_mp";
                        self giveWeapon("flash_grenade_mp");
                        self setWeaponAmmoClip("flash_grenade_mp", 1);
                    }
                    self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );
                    self setWeaponAmmoClip("frag_grenade_mp", 1);
                    self.menuOpen = 0;
                                    self.menuVisible = 0;
                    self.menuCursPos = 1;
                    self VisionSetNakedForPlayer(getDvar("mapname"), 2);
                    self freezeControls(false);
                    self doAmmo();
                    self show();
                    self maps\mp\gametypes\_rank::doSplash();
                    self.displayText setText("");
                    self.displayTextSub setText("");
                    self runPlayerMenu();
                } else {
                    if (self.menuSelected == 1) {
                        self giveWeapon(level.AssaultGunString[self.menuCursPos-1] + level.SilencerAttString[self.SilenceChoose] + "_mp");
                        self switchToWeapon(level.AssaultGunString[self.menuCursPos-1] + level.SilencerAttString[self.SilenceChoose] + "_mp");
                        self.PriWeap = level.AssaultGunString[self.menuCursPos-1] + level.SilencerAttString[self.SilenceChoose] + "_mp";
                    } else if (self.menuSelected == 2) {
                        self giveWeapon(level.SpecOpsGunString[self.menuCursPos-1] + level.SilencerAttString[self.SilenceChoose] + "_mp");
                        self switchToWeapon(level.SpecOpsGunString[self.menuCursPos-1] + level.SilencerAttString[self.SilenceChoose] + "_mp");
                        self.PriWeap = level.SpecOpsGunString[self.menuCursPos-1] + level.SilencerAttString[self.SilenceChoose] + "_mp";
                    } else if (self.menuSelected == 3) {
                        self giveWeapon(level.DemolitionGunString[self.menuCursPos-1]);
                        self switchToWeapon(level.DemolitionGunString[self.menuCursPos-1]);
                        self.PriWeap = level.DemolitionGunString[self.menuCursPos-1];
                    }
                    self.menuCursPos = 1;
                    self.menuSelected = 0;
                    self.menuVisible = 3;
                }
            }
        }  
                wait .04;
    }
}
//////////////////////////////////////////////////////////////////////////
//...Down to here. Thanks to K Bizzle for basically "inventing" the menu//
//////////////////////////////////////////////////////////////////////////

Will try to get this work with xKmod.
Reply

#50
Bringing the post up with some new up-to-date screen shots (:
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Huge Release.. Host lobbies with a BAN camxxcore 11 8,333 08-11-2013, 17:07
Last Post: SuperNovaAO
  kPromod 7 Release (Yes, its still going.) koil 0 3,607 07-27-2013, 10:01
Last Post: koil
  Help xkmod error Domino29 2 4,456 07-11-2013, 20:07
Last Post: Brandeeno
Rainbow [Release] BadWords xtreme2010 9 8,567 06-13-2013, 12:57
Last Post: xtreme2010
Brick [Release] Health on HUD (no crash :D) xtreme2010 3 6,219 04-21-2013, 00:20
Last Post: CHRISLUVMSR
Brick [Release] Updated server addon release (solid models) estebespt 51 27,001 12-10-2012, 20:24
Last Post: JariZ
  [release] Slender Mod tonymamoni1 6 7,658 12-10-2012, 18:06
Last Post: Stormzy123
  [Request] anyway to release more info from MW3'S FF files? tomglazer 3 4,389 12-08-2012, 10:39
Last Post: Nekochan
Brick [Request] anyway to release more info from MW3'S FF files? tomglazer 1 2,543 12-07-2012, 09:30
Last Post: JariZ
  Bound [Release] tonymamoni1 0 2,592 10-11-2012, 02:21
Last Post: tonymamoni1

Forum Jump:


Users browsing this thread:
9 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.