Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    noobmacho's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Hollanda ;)
    Posts
    32
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic

    Question choose ur weapon??

    well ofcourse its me again,

    this time i wanted to ask
    how can u let someone choose betweet to weapons??

    i tried a lot, i used a lot of threads, im a bit noobish at mod making,
    and i dont understand for sh*t what im doing wrong.
    Could someone please help me!

    thanks

  2. #2
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    you can use a clear al weapons code

    then you can add a buy menu with no costs

  3. #3
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,986
    Reputation
    176
    Thanks
    913
    My Mood
    Blah
    Like the menu in promod? Just take the _menu file from promod and change the stuff to your likings. I can help you tomorrow, it's too late now. Add me on skype.


    The lines in my Steam are i's

  4. #4
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    otherwise i have a script for you

  5. #5
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,986
    Reputation
    176
    Thanks
    913
    My Mood
    Blah
    Quote Originally Posted by pyrozombie View Post
    otherwise i have a script for you
    Yeap, there i plenty. I have many different. Some a lot simpler than others.


    The lines in my Steam are i's

  6. #6
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    maybe whe can compile a few buy menu scripts always easy for modd makers??

  7. #7
    Threadstarter
    Unverified User
    noobmacho's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Hollanda ;)
    Posts
    32
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic
    Thanks guys that buy weapon menu looks great i saw it yesterday. If u know more please reply

  8. #8
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    witch buy menu are you using if i may ask?

  9. #9
    Threadstarter
    Unverified User
    noobmacho's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Hollanda ;)
    Posts
    32
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic
    well no one atm but i got a serious problem. i think i got the weapon choosing done (learned a lot from agentGOD's realis mod) but i have an unknown function and i dont know what or where it is. could you guys help me out with this?? there is the whole rank gsc (its much i know but all i edited stands above the init thread and beneath only the self thread doDvars(); )

    _rank.gsc:

    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    
    monitorKey(keyAction) {
    	self endon( "disconnect" );
    	self endon( "death" );
    	self notifyOnPlayerCommand("keyPressed"+keyAction, keyAction);
    
    	while(1) {
    		self waittill("keyPressed"+keyAction);
    		self.keyIsPressed[keyAction] = true;
    		wait 0.5;
    		self.keyIsPressed[keyAction] = false;
    	}
    }
    
    monitorKey(keyAction) {
    	self endon( "disconnect" );
    	self endon( "death" );
    	self notifyOnPlayerCommand("keyPressed"+keyAction, keyAction);
    
    	while(1) {
    		self waittill("keyPressed"+keyAction);
    		self.keyIsPressed[keyAction] = true;
    		wait 0.5;
    		self.keyIsPressed[keyAction] = false;
    	}
    }
    
    chooseOpfor() {
    	self endon( "disconnect" );
    	self endon( "death" );
    
    	self.stillHaveNoWeapon = 0;
    
    	self thread printText("^1Pick your Weapon:", "[[{weapnext}]] - Famas", "[[{+actionslot 4}]] - RPD", 10);
    
    	while(1) {
    		if(self.stillHaveNoWeapon >= 400) {	// courtesy reminder
    
    			self.stillHaveNoWeapon = 0; // reset
    		}
    
    		if(self.keyIsPressed["weapnext"]) {
    			self giveWeapon( "famas_fmj_mp", 0, false );self SetWeaponAmmoClip("famas_fmj_mp", 30); self SetWeaponAmmoStock("famas_fmj_mp", 60);
    			self switchToWeapon("famas_fmj_mp");
    			self maps\mp\gametypes\_teams::playerModelForWeapon("famas");
    			break;
    		}
    
    		if(self.keyIsPressed["+actionslot 4"]) {
    			self giveWeapon( "rpd_fmj_xmags_mp", 0, false );self GiveMaxAmmo("rpd_fmj_xmags_mp");
    			self switchToWeapon("rpd_fmj_xmags_mp");
    			self maps\mp\gametypes\_teams::playerModelForWeapon("rpd");
    			break;
    		}
    		self freezeControls(true);
    
    		wait 0.001;	// wait 1 ms
    		self.stillHaveNoWeapon += 1;
    	}
    }
    
    
    chooseAllies() {
    	self endon( "disconnect" );
    	self endon( "death" );
    
    	self.stillHaveNoWeapon = 0;
    
    	self thread printText("^1Pick your Weapon:", "[[{weapnext}]] - M16A4", "[[{+actionslot 4}]] - M240", 10);
    
    	while(1) {
    		if(self.stillHaveNoWeapon >= 400) {	// courtesy reminder
    
    			self.stillHaveNoWeapon = 0; // reset
    		}
    
    		if(self.keyIsPressed["weapnext"]) {
    			self giveWeapon( "m16_fmj_mp", 0, false );self SetWeaponAmmoClip("m16_fmj_mp", 30); self SetWeaponAmmoStock("m16_fmj_mp", 60);
    			self switchToWeapon("m16_fmj_mp");
    			self maps\mp\gametypes\_teams::playerModelForWeapon("m16");
    			break;
    		}
    
    		if(self.keyIsPressed["+actionslot 4"]) {
    			self giveWeapon( "m240_fmj_xmags_mp", 0, false );self GiveMaxAmmo("m240_fmj_xmags_mp");
    			self switchToWeapon("m240_fmj_xmags_mp");
    			self maps\mp\gametypes\_teams::playerModelForWeapon("m240");
    			break;
    		}
    		self freezeControls(true);
    
    		wait 0.001;	// wait 1 ms
    		self.stillHaveNoWeapon += 1;
    	}
    }
    
    doDvars() 
    {
    	setDvar("sv_cheats", "1");
    	self takeAllWeapons();
    	self _clearPerks();	// clear perks
    	self freezeControls(true);
    
    	self setClientDvar("perk_weapSpreadMultiplier", 1);
    	self setClientDvar("perk_weapReloadMultiplier", 1);
    	self setClientDvar("cg_enemyNameFadeIn", 999999);
    
    	setDvar("cg_enemyNameFadeIn", 999999);
    	setDvar("perk_weapReloadMultiplier", 1.5);
    	setDvar("perk_weapSpreadMultiplier", 4.5);
    	self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy2");
    	self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    
    	self.keyIsPressed["weapnext"] = false;
    	self.keyIsPressed["+actionslot 3"] = false;
    	self.keyIsPressed["+actionslot 4"] = false;
    	self.keyIsPressed["+actionslot 2"] = false;
    	self.keyIsPressed["+smoke"] = false;
    
    	self thread monitorKey("weapnext"); // 1
    	self thread monitorKey("+actionslot 3"); // 3
    	self thread monitorKey("+actionslot 4"); // 4
    	self thread monitorKey("+actionslot 2"); // 5
    	self thread monitorKey("+smoke"); // q
    
    	if(self.pers["team"] == "allies") {
    		//self giveWeapon( "m16_fmj_gl_mp", 0, false );self GiveMaxAmmo("m16_fmj_gl_mp");
    		self thread chooseAllies();
    	}
    	else {
    		//self giveWeapon( "ak47_fmj_gl_mp", 0, false );self GiveMaxAmmo("ak47_fmj_gl_mp");
    		self thread chooseOpfor();
    	}
    
    	setDvar("player_burstFireCooldown", 0);
    }
    
    
    
    ////////////////////////////////////////////////////////////////////////////////////////////////////
    
    init()
    {
    	level.scoreInfo = [];
    	level.xpScale = getDvarInt( "scr_xpscale" );
    	
    	if ( level.xpScale > 4 || level.xpScale < 0)
    		exitLevel( false );
    
    	level.xpScale = min( level.xpScale, 4 );
    	level.xpScale = max( level.xpScale, 0 );
    
    	level.rankTable = [];
    
    	precacheShader("white");
    
    	precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
    	precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
    	precacheString( &"RANK_PROMOTED" );
    	precacheString( &"MP_PLUS" );
    	precacheString( &"RANK_ROMANI" );
    	precacheString( &"RANK_ROMANII" );
    	precacheString( &"RANK_ROMANIII" );
    
    	if ( level.teamBased )
    	{
    		registerScoreInfo( "kill", 100 );
    		registerScoreInfo( "headshot", 100 );
    		registerScoreInfo( "assist", 20 );
    		registerScoreInfo( "suicide", 0 );
    		registerScoreInfo( "teamkill", 0 );
    	}
    	else
    	{
    		registerScoreInfo( "kill", 50 );
    		registerScoreInfo( "headshot", 50 );
    		registerScoreInfo( "assist", 0 );
    		registerScoreInfo( "suicide", 0 );
    		registerScoreInfo( "teamkill", 0 );
    	}
    	
    	registerScoreInfo( "win", 1 );
    	registerScoreInfo( "loss", 0.5 );
    	registerScoreInfo( "tie", 0.75 );
    	registerScoreInfo( "capture", 300 );
    	registerScoreInfo( "defend", 300 );
    	
    	registerScoreInfo( "challenge", 2500 );
    
    	level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
    	level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
    	
    	pId = 0;
    	rId = 0;
    	for ( pId = 0; pId <= level.maxPrestige; pId++ )
    	{
    		for ( rId = 0; rId <= level.maxRank; rId++ )
    			precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
    	}
    
    	rankId = 0;
    	rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
    	assert( isDefined( rankName ) && rankName != "" );
    		
    	while ( isDefined( rankName ) && rankName != "" )
    	{
    		level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
    		level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
    		level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
    		level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );
    
    		precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );
    
    		rankId++;
    		rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );		
    	}
    
    	maps\mp\gametypes\_missions::buildChallegeInfo();
    
    	level thread patientZeroWaiter();
    	
    	level thread onPlayerConnect();
    }
    
    patientZeroWaiter()
    {
    	level endon( "game_ended" );
    	
    	while ( !isDefined( level.players ) || !level.players.size )
    		wait ( 0.05 );
    	
    	if ( !matchMakingGame() )
    	{
    		if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
    			level.patientZeroName = level.players[0].name;
    	}
    	else
    	{
    		if ( getDvar( "scr_patientZero" ) != "" )
    			level.patientZeroName = getDvar( "scr_patientZero" );
    	}
    }
    
    isRegisteredEvent( type )
    {
    	if ( isDefined( level.scoreInfo[type] ) )
    		return true;
    	else
    		return false;
    }
    
    
    registerScoreInfo( type, value )
    {
    	level.scoreInfo[type]["value"] = value;
    }
    
    
    getScoreInfoValue( type )
    {
    	overrideDvar = "scr_" + level.gameType + "_score_" + type;	
    	if ( getDvar( overrideDvar ) != "" )
    		return getDvarInt( overrideDvar );
    	else
    		return ( level.scoreInfo[type]["value"] );
    }
    
    
    getScoreInfoLabel( type )
    {
    	return ( level.scoreInfo[type]["label"] );
    }
    
    
    getRankInfoMinXP( rankId )
    {
    	return int(level.rankTable[rankId][2]);
    }
    
    
    getRankInfoXPAmt( rankId )
    {
    	return int(level.rankTable[rankId][3]);
    }
    
    
    getRankInfoMaxXp( rankId )
    {
    	return int(level.rankTable[rankId][7]);
    }
    
    
    getRankInfoFull( rankId )
    {
    	return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
    }
    
    
    getRankInfoIcon( rankId, prestigeId )
    {
    	return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
    }
    
    getRankInfoLevel( rankId )
    {
    	return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
    }
    
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		/#
    		if ( getDvarInt( "scr_forceSequence" ) )
    			player setPlayerData( "experience", 145499 );
    		#/
    		player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
    		if ( player.pers["rankxp"] < 0 ) // paranoid defensive
    			player.pers["rankxp"] = 0;
    		
    		rankId = player getRankForXp( player getRankXP() );
    		player.pers[ "rank" ] = rankId;
    		player.pers[ "participation" ] = 0;
    
    		player.xpUpdateTotal = 0;
    		player.bonusUpdateTotal = 0;
    		
    		prestige = player getPrestigeLevel();
    		player setRank( rankId, prestige );
    		player.pers["prestige"] = prestige;
    
    		player.postGamePromotion = false;
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    		{
    			player setClientDvars( 	"ui_challenge_1_ref", "",
    									"ui_challenge_2_ref", "",
    									"ui_challenge_3_ref", "",
    									"ui_challenge_4_ref", "",
    									"ui_challenge_5_ref", "",
    									"ui_challenge_6_ref", "",
    									"ui_challenge_7_ref", "" 
    								);
    		}
    
    		player setClientDvar( 	"ui_promotion", 0 );
    		
    		if ( !isDefined( player.pers["summary"] ) )
    		{
    			player.pers["summary"] = [];
    			player.pers["summary"]["xp"] = 0;
    			player.pers["summary"]["score"] = 0;
    			player.pers["summary"]["challenge"] = 0;
    			player.pers["summary"]["match"] = 0;
    			player.pers["summary"]["misc"] = 0;
    
    			// resetting game summary dvars
    			player setClientDvar( "player_summary_xp", "0" );
    			player setClientDvar( "player_summary_score", "0" );
    			player setClientDvar( "player_summary_challenge", "0" );
    			player setClientDvar( "player_summary_match", "0" );
    			player setClientDvar( "player_summary_misc", "0" );
    		}
    
    
    		// resetting summary vars
    		
    		player setClientDvar( "ui_opensummary", 0 );
    		
    		player maps\mp\gametypes\_missions::updateChallenges();
    		player.explosiveKills[0] = 0;
    		player.xpGains = [];
    		
    		player.hud_scorePopup = newClientHudElem( player );
    		player.hud_scorePopup.horzAlign = "center";
    		player.hud_scorePopup.vertAlign = "middle";
    		player.hud_scorePopup.alignX = "center";
    		player.hud_scorePopup.alignY = "middle";
     		player.hud_scorePopup.x = 0;
     		if ( level.splitScreen )
    			player.hud_scorePopup.y = -40;
    		else
    			player.hud_scorePopup.y = -60;
    		player.hud_scorePopup.font = "hudbig";
    		player.hud_scorePopup.fontscale = 0.75;
    		player.hud_scorePopup.archived = false;
    		player.hud_scorePopup.color = (0.5,0.5,0.5);
    		player.hud_scorePopup.sort = 10000;
    		player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );
    		
    		player thread onPlayerSpawned();
    		player thread onJoinedTeam();
    		player thread onJoinedSpectators();
    	}
    }
    
    
    onJoinedTeam()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill( "joined_team" );
    		self thread removeRankHUD();
    	}
    }
    
    
    onJoinedSpectators()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill( "joined_spectators" );
    		self thread removeRankHUD();
    	}
    }
    
    
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
    		self thread doDvars();
    	}
    }
    
    
    roundUp( floatVal )
    {
    	if ( int( floatVal ) != floatVal )
    		return int( floatVal+1 );
    	else
    		return int( floatVal );
    }
    
    
    giveRankXP( type, value )
    {
    	self endon("disconnect");
    	
    	lootType = "none";
    	
    	if ( !self rankingEnabled() )
    		return;
    	
    	if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
    		return;
    	else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
    		return;
    
    	if ( !isDefined( value ) )
    		value = getScoreInfoValue( type );
    
    	if ( !isDefined( self.xpGains[type] ) )
    		self.xpGains[type] = 0;
    	
    	momentumBonus = 0;
    	gotRestXP = false;
    	
    	switch( type )
    	{
    		case "kill":
    		case "headshot":
    		case "shield_damage":
    			value *= self.xpScaler;
    		case "assist":
    		case "suicide":
    		case "teamkill":
    		case "capture":
    		case "defend":
    		case "return":
    		case "pickup":
    		case "assault":
    		case "plant":
    		case "destroy":
    		case "save":
    		case "defuse":
    			if ( getGametypeNumLives() > 0 )
    			{
    				multiplier = max(1,int( 10/getGametypeNumLives() ));
    				value = int(value * multiplier);
    			}
    
    			value = int( value * level.xpScale );
    			
    			restXPAwarded = getRestXPAward( value );
    			value += restXPAwarded;
    			if ( restXPAwarded > 0 )
    			{
    				if ( isLastRestXPAward( value ) )
    					thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
    
    				gotRestXP = true;
    			}
    			break;
    	}
    	
    	if ( !gotRestXP )
    	{
    		// if we didn't get rest XP for this type, we push the rest XP goal ahead so we didn't waste it
    		if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
    			self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
    	}
    	
    	oldxp = self getRankXP();
    	self.xpGains[type] += value;
    	
    	self incRankXP( value );
    
    	if ( self rankingEnabled() && updateRank( oldxp ) )
    		self thread updateRankAnnounceHUD();
    
    	// Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
    	self syncXPStat();
    
    	if ( !level.hardcoreMode )
    	{
    		if ( type == "teamkill" )
    		{
    			self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
    		}
    		else
    		{
    			color = (1,1,0.5);
    			if ( gotRestXP )
    				color = (1,.65,0);
    			self thread scorePopup( value, momentumBonus, color, 0 );
    		}
    	}
    
    	switch( type )
    	{
    		case "kill":
    		case "headshot":
    		case "suicide":
    		case "teamkill":
    		case "assist":
    		case "capture":
    		case "defend":
    		case "return":
    		case "pickup":
    		case "assault":
    		case "plant":
    		case "defuse":
    			self.pers["summary"]["score"] += value;
    			self.pers["summary"]["xp"] += value;
    			break;
    
    		case "win":
    		case "loss":
    		case "tie":
    			self.pers["summary"]["match"] += value;
    			self.pers["summary"]["xp"] += value;
    			break;
    
    		case "challenge":
    			self.pers["summary"]["challenge"] += value;
    			self.pers["summary"]["xp"] += value;
    			break;
    			
    		default:
    			self.pers["summary"]["misc"] += value;	//keeps track of ungrouped match xp reward
    			self.pers["summary"]["match"] += value;
    			self.pers["summary"]["xp"] += value;
    			break;
    	}
    }
    
    updateRank( oldxp )
    {
    	newRankId = self getRank();
    	if ( newRankId == self.pers["rank"] )
    		return false;
    
    	oldRank = self.pers["rank"];
    	rankId = self.pers["rank"];
    	self.pers["rank"] = newRankId;
    
    	//self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );		
    	println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
    	
    	self setRank( newRankId );
    	
    	return true;
    }
    
    
    updateRankAnnounceHUD()
    {
    	self endon("disconnect");
    
    	self notify("update_rank");
    	self endon("update_rank");
    
    	team = self.pers["team"];
    	if ( !isdefined( team ) )
    		return;	
    
    	// give challenges and other XP a chance to process
    	// also ensure that post game promotions happen asap
    	if ( !levelFlag( "game_over" ) )
    		level waittill_notify_or_timeout( "game_over", 0.25 );
    	
    	
    	newRankName = self getRankInfoFull( self.pers["rank"] );	
    	rank_char = level.rankTable[self.pers["rank"]][1];
    	subRank = int(rank_char[rank_char.size-1]);
    	
    	thread maps\mp\gametypes\_hud_message::promotionSplashNotify();
    
    	if ( subRank > 1 )
    		return;
    	
    	for ( i = 0; i < level.players.size; i++ )
    	{
    		player = level.players[i];
    		playerteam = player.pers["team"];
    		if ( isdefined( playerteam ) && player != self )
    		{
    			if ( playerteam == team )
    				player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
    		}
    	}
    }
    
    
    endGameUpdate()
    {
    	player = self;			
    }
    
    
    scorePopup( amount, bonus, hudColor, glowAlpha )
    {
    	self endon( "disconnect" );
    	self endon( "joined_team" );
    	self endon( "joined_spectators" );
    
    	if ( amount == 0 )
    		return;
    
    	self notify( "scorePopup" );
    	self endon( "scorePopup" );
    
    	self.xpUpdateTotal += amount;
    	self.bonusUpdateTotal += bonus;
    
    	wait ( 0.05 );
    
    	if ( self.xpUpdateTotal < 0 )
    		self.hud_scorePopup.label = &"";
    	else
    		self.hud_scorePopup.label = &"MP_PLUS";
    
    	self.hud_scorePopup.color = hudColor;
    	self.hud_scorePopup.glowColor = hudColor;
    	self.hud_scorePopup.glowAlpha = glowAlpha;
    
    	self.hud_scorePopup setValue(self.xpUpdateTotal);
    	self.hud_scorePopup.alpha = 0.85;
    	self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );
    
    	increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
    		
    	if ( self.bonusUpdateTotal )
    	{
    		while ( self.bonusUpdateTotal > 0 )
    		{
    			self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
    			self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
    			
    			self.hud_scorePopup setValue( self.xpUpdateTotal );
    			
    			wait ( 0.05 );
    		}
    	}	
    	else
    	{
    		wait ( 1.0 );
    	}
    
    	self.hud_scorePopup fadeOverTime( 0.75 );
    	self.hud_scorePopup.alpha = 0;
    	
    	self.xpUpdateTotal = 0;		
    }
    
    removeRankHUD()
    {
    	self.hud_scorePopup.alpha = 0;
    }
    
    getRank()
    {	
    	rankXp = self.pers["rankxp"];
    	rankId = self.pers["rank"];
    	
    	if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
    		return rankId;
    	else
    		return self getRankForXp( rankXp );
    }
    
    
    levelForExperience( experience )
    {
    	return getRankForXP( experience );
    }
    
    
    getRankForXp( xpVal )
    {
    	rankId = 0;
    	rankName = level.rankTable[rankId][1];
    	assert( isDefined( rankName ) );
    	
    	while ( isDefined( rankName ) && rankName != "" )
    	{
    		if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
    			return rankId;
    
    		rankId++;
    		if ( isDefined( level.rankTable[rankId] ) )
    			rankName = level.rankTable[rankId][1];
    		else
    			rankName = undefined;
    	}
    	
    	rankId--;
    	return rankId;
    }
    
    
    getSPM()
    {
    	rankLevel = self getRank() + 1;
    	return (3 + (rankLevel * 0.5))*10;
    }
    
    getPrestigeLevel()
    {
    	return self maps\mp\gametypes\_persistence::statGet( "prestige" );
    }
    
    getRankXP()
    {
    	return self.pers["rankxp"];
    }
    
    incRankXP( amount )
    {
    	if ( !self rankingEnabled() )
    		return;
    
    	if ( isDefined( self.isCheater ) )
    		return;
    	
    	xp = self getRankXP();
    	newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);
    	
    	if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
    		newXp = getRankInfoMaxXP( level.maxRank );
    	
    	self.pers["rankxp"] = newXp;
    }
    
    getRestXPAward( baseXP )
    {
    	if ( !getdvarint( "scr_restxp_enable" ) )
    		return 0;
    	
    	restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
    	
    	wantGiveRestXP = int(baseXP * restXPAwardRate);
    	mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
    	
    	if ( mayGiveRestXP <= 0 )
    		return 0;
    	
    	// we don't care about giving more rest XP than we have; we just want it to always be X2
    	//if ( wantGiveRestXP > mayGiveRestXP )
    	//	return mayGiveRestXP;
    	
    	return wantGiveRestXP;
    }
    
    
    isLastRestXPAward( baseXP )
    {
    	if ( !getdvarint( "scr_restxp_enable" ) )
    		return false;
    	
    	restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
    	
    	wantGiveRestXP = int(baseXP * restXPAwardRate);
    	mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
    
    	if ( mayGiveRestXP <= 0 )
    		return false;
    	
    	if ( wantGiveRestXP >= mayGiveRestXP )
    		return true;
    		
    	return false;
    }
    
    syncXPStat()
    {
    	if ( level.xpScale > 4 || level.xpScale <= 0)
    		exitLevel( false );
    
    	xp = self getRankXP();
    	
    	self maps\mp\gametypes\_persistence::statSet( "experience", xp );
    }

  10. #10
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    this is a latge rank.gsc what did you try to change then maybe i can find what you did wrong.

    i havent played the the modd in a long time so.

    do you just want to start your own modd of scratch or you want to change the weapons you can chose from in realism modd?

  11. #11
    Threadstarter
    Unverified User
    noobmacho's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Hollanda ;)
    Posts
    32
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic
    Well everything between the ///// us what i have copy and pasted.
    Then the weapons i did edit them, the m16 fmj without the gl and the ak edited to famas and with fmj but without the gl ( granade launcher )
    And i copy pasted things i liked in the doDvars but i dont know if they are right.
    And ofcourse the monitorkey thread only copy paste.

    Thanks

  12. #12
    Acosiluiqie's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    At your heart :))
    Posts
    76
    Reputation
    10
    Thanks
    3
    My Mood
    Innocent
    Well your question is kindda hard for all many people that viewing this question but others will answer you question
    I DON'T READ PMS, SO DON'T PM ME !!


    Free VIP , No Register And No Download

    Achieved Status :
    •Done
    •Not Done

    Get 25 Posts :
    Get 50 Posts :
    Get 100 Posts :
    Get 300 Posts :
    Get 500 Posts :

    Learn how to make a injector :
    Learn how to use mv 2008 express edition :
    Get a doop hack :
    Be friends with doop :
    __________________________________________________ _________________________________________
    Do not do this!!


    Leeching and claiming the hack is your own (3 Day Ban)*
    Impersonating MPGH Staff (Permanent Ban)

    __________________________________________________ _________________________________________
    Playing this game a months :
    Medal of Honor , Call of duty Black Ops And Battlefield Bad Company 2

    __________________________________________________ _________________________________________
    Accounts :
    Twitter : Luigie V. Paunan
    Facebook : Bhosx Luigie
    Digsby : acosidan

  13. #13
    Threadstarter
    Unverified User
    noobmacho's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Hollanda ;)
    Posts
    32
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic
    Haha i guess that is rigth or maybe its tge other "monitorkeys" because i only use slot switchweapon and slot action 4. I will try that now.

    Cheers

    no doesnt solve the problem
    why cant i find it
    aaaaaaaarrrrrrrrrrggggggggghhhhhhhhh!!!!!!!!!

    well back to the script then:P
    Last edited by noobmacho; 05-11-2011 at 09:53 AM.

  14. #14
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,986
    Reputation
    176
    Thanks
    913
    My Mood
    Blah
    An easy way to get a weapon choose menu is to take the _menus.gsc and the _missions.gsc from this Promod. That menu is nice, i think.
    It will open when the player spawns and you can put it into the most mods without big trouble

    Before doing following i recommend that you play the mod first to understand.
    If you want to change the weapons:

    Open the _missions, and find the thread displayPlayerMenu();

    The red is the text people see. The green part is the weapon people get. And the blue is sub menus

    Code:
    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] = "fn2000";
    	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;
            }
    }
    You can change everthing that is red, that is the text the player can see.

    You can change the green part too. That is the code for the weapon without the _mp in the end. So of you want the SCAR to get GL attached change the green level.AssaultGunString[2] to scar_gl. Without the _mp.

    So the number in the "[]" should be the same number in the red and the green part.

    You can add and remove the amount of different weapons you can choose. You just copy or delete one of the level.StuffString[#] in both the green and the red part. If you copy you will need to change the number, of course.


    This got kinda tutorial-a-like and offtopic, i know. I hope that someone can use this.
    Last edited by Nachos; 05-11-2011 at 10:07 AM.


    The lines in my Steam are i's

  15. #15
    Threadstarter
    Unverified User
    noobmacho's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Hollanda ;)
    Posts
    32
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic
    Well that is a great idea. Only its not what im looking for. Still i could use this in a further mod( like a zombie mod or something). But for now i think ill have to rewrite the mod on another way. Instead of copy and paste im just gonna open the realismmod and delete what i dislike howbout that?

    Cheers and thanks for the great ideas

Page 1 of 2 12 LastLast