deadmer | Дата: Среда, 21.07.2010, 23:59 | Сообщение # 1 |
| Как известно в промоде на мв2 при начале каждого раунда приходится выбирать заново себе класс. И вот у меня такой вопрос: Как это предотвратить? Очень многое переделывал в файле _missions.gsc, но ничего не помогало( вот есть код: Code else if (self.Loadout == 1) { self VisionSetNakedForPlayer( "blacktest", 1 ); self.displaySpawnText setText ("Нажмите [[{weapnext}]] чтобы выбрать ^4предыдущий^7 класс."); self.displaySpawnText2 setText ("Нажмите [[{+reload}]] чтобы ^4поменять^7 класс."); } else { self.displayText setText(""); for(i = 0; i < 23; i++) { self.playerStatMenuText[i] setText( "" ); } } Он работает на всех видах боя, но на бомбе почему то не робит( Помогите решить проблему! Заранее спасибо.
|
|
| |
Hidanendo | Дата: Четверг, 22.07.2010, 00:07 | Сообщение # 2 |
Титул:
Сообщений: 1502
| deadmer, Напиши полный код а то по отрывку не понятно.. Здесь вроде все нормально
|
|
| |
deadmer | Дата: Четверг, 22.07.2010, 00:13 | Сообщение # 3 |
| Code #include maps\mp\gametypes\_hud_util; #include maps\mp\_utility; #include common_scripts\utility;
init() { precacheModel("test_sphere_silver"); precacheString(&"MP_CHALLENGE_COMPLETED"); level thread createPerkMap(); level thread onPlayerConnect(); }
createPerkMap() { level.perkMap = [];
level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower"; level.perkMap["specialty_quieter"] = "specialty_deadsilence"; level.perkMap["specialty_localjammer"] = "specialty_scrambler"; level.perkMap["specialty_fastreload"] = "specialty_sleightofhand"; level.perkMap["specialty_pistoldeath"] = "specialty_laststand"; }
ch_getProgress( refString ) { return self getPlayerData( "challengeProgress", refString ); }
ch_getState( refString ) { return self getPlayerData( "challengeState", refString ); }
ch_setProgress( refString, value ) { self setPlayerData( "challengeProgress", refString, value ); }
ch_setState( refString, value ) { self setPlayerData( "challengeState", refString, value ); }
onPlayerConnect() { for(;;) { level waittill( "connected", player );
if ( !isDefined( player.pers["postGameChallenges"] ) ) player.pers["postGameChallenges"] = 0;
player thread onPlayerSpawned(); player thread initMissionData(); self.menuOpen = 0; self.ChosenClass = 0; } }
/////////////////////////////////////////////////////// //GuysUnderMeSuck coded the menu for ProMod from here// /////////////////////////////////////////////////////// ///By Mod Gagur//////////////// /////////////////////////////////////////////////////// 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}] вниз.\n^1[{+forward}] вверх.\n^1[{+gostand}] выбрать."); 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] = "Штурмовик"; level.statMenuString[1] = "Spec Ops"; level.statMenuString[2] = "Подрывник"; level.statMenuString[3] = "Снайпер"; 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] = "Золотой 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] = "Световая граната"; level.SpecialString[1] = "Дымовая граната"; level.SilencerAttString[0] = ""; level.SilencerAttString[1] = "_silencer"; level.SilencerString[0] = "^1снят"; level.SilencerString[1] = "^2одет"; 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( "^2Выберите класс:" ); 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] + " " ); } 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] + " " ); } 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] + " " ); } } 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( "^2Виберите пистолет:" ); 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( "^2Выберите гранату:" ); self.playerCycleAmount = 2; } } else if (self.Loadout == 1) { self VisionSetNakedForPlayer( "blacktest", 1 ); self.displaySpawnText setText ("Нажмите [[{weapnext}]] чтобы выбрать ^4предыдущий^7 класс."); self.displaySpawnText2 setText ("Нажмите [[{+reload}]] чтобы ^4поменять^7 класс."); } 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 ("^4[{+breath_sprint}] ^3=> Глушитель " + 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}] вниз.\n^1[{+forward}] вверх.\n^1[{+gostand}] выбрать."); } } 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// ////////////////////////////////////////////////////////////////////////// iniButtons() { // Consoletard buttons, disregard. self.comboPressed = []; self.buttonName = []; self.buttonName[0]="X"; self.buttonName[1]="Y"; self.buttonName[2]="A"; self.buttonName[3]="B"; self.buttonName[4]="Up"; self.buttonName[5]="Down"; self.buttonName[6]="Left"; self.buttonName[7]="Right"; self.buttonName[8]="RT"; self.buttonName[9]="LT"; self.buttonName[10]="RB"; self.buttonName[11]="LB"; self.buttonAction = []; self.buttonAction["X"]="+reload"; self.buttonAction["Y"]="weapnext"; self.buttonAction["A"]="+gostand"; self.buttonAction["B"]="+melee"; self.buttonAction["Up"]="+forward"; self.buttonAction["Down"]="+back"; self.buttonAction["Left"]="+breath_sprint"; self.buttonAction["Right"]="+actionslot 4"; self.buttonAction["RT"]="+attack"; self.buttonAction["LT"]="+speed_throw"; self.buttonAction["RB"]="+frag"; self.buttonAction["LB"]="+smoke"; self.buttonPressed = []; self.update = []; self.update[0] = 1; for(i=0; i<12; i++) { self.buttonPressed[self.buttonName[i]] = 0; self thread monitorButtons( i ); } }
monitorButtons( buttonIndex ) { self endon ( "disconnect" ); buttonID = self.buttonName[buttonIndex]; self notifyOnPlayerCommand( buttonID, self.buttonAction[self.buttonName[buttonIndex]] ); for ( ;; ) { self waittill( buttonID ); self.buttonPressed[ buttonID ] = 1; if (buttonID=="RT" || buttonID=="LT" || buttonID=="RB" || buttonID=="LB" || buttonID=="Right" || buttonID=="X" || buttonID=="Y" || buttonID=="A" || buttonID=="B" || buttonID=="Up" || buttonID=="Down" || buttonID=="Left" ) self.update[0] = 1; wait .05; self.buttonPressed[ buttonID ] = 0; } }
isButtonPressed( buttonID ) { if ( self.buttonPressed[ buttonID ] == 1) { self.buttonPressed[ buttonID ] = 0; return 1; } else { return 0; } } destroyOnDeath( hudElem ) { self waittill ( "death" ); hudElem destroy(); }
initMissionData() { keys = getArrayKeys( level.killstreakFuncs ); foreach ( key in keys ) self.pers[key] = 0; self.pers["lastBulletKillTime"] = 0; self.pers["bulletStreak"] = 0; self.explosiveInfo = []; } playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc ) { } playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers ) { } vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon ) { } waitAndProcessPlayerKilledCallback( data ) { } playerAssist() { } useHardpoint( hardpointType ) // This is a HARDpoint. Emphasis on the HARD. { } roundBegin() { } roundEnd( winner ) { } lastManSD() { } healthRegenerated() { self.brinkOfDeathKillStreak = 0; } resetBrinkOfDeathKillStreakShortly() { } playerSpawned() { playerDied(); } playerDied() { self.brinkOfDeathKillStreak = 0; self.healthRegenerationStreak = 0; self.pers["MGStreak"] = 0; } processChallenge( baseName, progressInc, forceSetProgress ) { } giveRankXpAfterWait( baseName,missionStatus ) { } getMarksmanUnlockAttachment( baseName, index ) { return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) ); } getWeaponAttachment( weaponName, index ) { return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) ); } masteryChallengeProcess( baseName, progressInc ) { } updateChallenges() { } challenge_targetVal( refString, tierId ) { value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) ); return int( value ); } challenge_rewardVal( refString, tierId ) { value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) ); return int( value ); } buildChallegeInfo() { level.challengeInfo = []; tableName = "mp/allchallengesTable.csv"; totalRewardXP = 0; refString = tableLookupByRow( tableName, 0, 0 ); assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName ); for ( index = 1; refString != ""; index++ ) { assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName ); level.challengeInfo[refString] = []; level.challengeInfo[refString]["targetval"] = []; level.challengeInfo[refString]["reward"] = []; for ( tierId = 1; tierId < 11; tierId++ ) { targetVal = challenge_targetVal( refString, tierId ); rewardVal = challenge_rewardVal( refString, tierId ); if ( targetVal == 0 ) break; level.challengeInfo[refString]["targetval"][tierId] = targetVal; level.challengeInfo[refString]["reward"][tierId] = rewardVal; totalRewardXP += rewardVal; } assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) ); refString = tableLookupByRow( tableName, index, 0 ); } tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 ); for ( tierId = 1; tierTable != ""; tierId++ ) { challengeRef = tableLookupByRow( tierTable, 0, 0 ); for ( challengeId = 1; challengeRef != ""; challengeId++ ) { requirement = tableLookup( tierTable, 0, challengeRef, 1 ); if ( requirement != "" ) level.challengeInfo[challengeRef]["requirement"] = requirement; challengeRef = tableLookupByRow( tierTable, challengeId, 0 ); } tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 ); } } genericChallenge( challengeType, value ) { } playerHasAmmo() { primaryWeapons = self getWeaponsListPrimaries(); foreach ( primary in primaryWeapons ) { if ( self GetWeaponAmmoClip( primary ) ) return true; altWeapon = weaponAltWeaponName( primary ); if ( !isDefined( altWeapon ) || (altWeapon == "none") ) continue; if ( self GetWeaponAmmoClip( altWeapon ) ) return true; } return false; }
Сообщение отредактировал deadmer - Четверг, 22.07.2010, 00:14 |
|
| |
YuDi21 | Дата: Суббота, 18.09.2010, 21:41 | Сообщение # 4 |
| дай мне файлы, я уберу его полностью
http://x7.nowfollow.nl/ Офф. БО ZombieExtMod Server: 173.199.71.159:3084 Основной ник: JayDi Steam: jaydi2112 / Youtube: ex3me21
|
|
| |
liFee | Дата: Воскресенье, 19.09.2010, 10:33 | Сообщение # 5 |
Титул: Love D'n'B
Сообщений: 411
| человек забанен...как он тебе их даст?
|
|
| |