HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- Money Problems (https://hlfx.ru/forum/showthread.php?threadid=2997)
Отправлено MisterDeath 13-09-2011 в 14:28:
Money Problems
Good guys the thing is that thanks to you and have been able to make a couple of things, but is this problem, you'RE an option selected was supposed to be to open the sub menu but the menu to select for example "meele" select the option one of the menu... how to avoid this, as the settlement ???
sorry bad english
C++ Source Code:
1 | if(pPlayer->m_iMenu = 1) |
6 | pPlayer->ShowMenu(0x1F, 10, 0, "Meele: \n\n\n 1.Crowbar [$150] \n\n 2.Knife [$250] \n\n 3.Big Hammer [$750] \n\n 4.Lightsaber [$10000] \n\n\n 0.Exit"); |
10 | pPlayer->ShowMenu(0x1F, 10, 0, "Pistols: \n\n\n 1.Glock 9mm [$400] \n\n 2.Magnum .357 [$800] \n\n 3.Desert Eagle [$1300] \n\n\n 0.Exit"); |
14 | pPlayer->ShowMenu(0x1F, 10, 0, "Sub-Machine-Guns: \n\n\n 1.Steyr TMP [$1000] \n\n 2.MP5 + Grenade Launcher [$2500] \n\n\n 0.Exit"); |
18 | pPlayer->ShowMenu(0x1F, 10, 0, "Shotguns: \n\n\n 1.SPAS-12 [$1500] \n\n 2.XM-1014 [$3000]\n\n 3.USAS-12 [$5000] \n\n\n 0.Exit"); |
22 | pPlayer->ShowMenu(0x1F, 10, 0, "Assault Rifles: \n\n\n 1.M4A1 [$2000] \n\n 2.AK-47 [$3500] \n\n\n 0.Exit"); |
26 | pPlayer->ShowMenu(0x1F, 10, 0, "Snipers: \n\n\n 1.Crossbow [$2200] \n\n 2.AWP [$4000] \n\n 3.Barett [$7500] \n\n\n 0.Exit"); |
30 | pPlayer->ShowMenu(0x1F, 10, 0, "Heavy Weapons: \n\n\n 1.Rocket Launcher [$4000] \n\n 2.M249 [$6000] \n\n 3.Minigun [$12500] \n\n\n 0.Exit"); |
34 | pPlayer->ShowMenu(0x1F, 10, 0, "Explosives: \n\n\n 1.Hand Grenade [$500] \n\n 2.Trip Mine [$900] \n\n 3.Satchel Charge [$1600] \n\n 4.Cluster Bomb [$2500] \n\n\n 0.Exit"); |
38 | pPlayer->ShowMenu(0x1F, 10, 0, "Energy Weapons: \n\n\n 1.Gauss Gun [$10000] \n\n 2.Egon Gun [$15000] \n\n 3.Displacer [$20000] \n\n\n 0.Exit"); |
45 | if(pPlayer->m_iMenu == 2) |
50 | if(pPlayer->m_iMoneyAmount >= 150) |
51 | pPlayer->GiveNamedItem( "weapon_crowbar" ); |
52 | pPlayer->m_iMoneyAmount -= 150; |
55 | if(pPlayer->m_iMoneyAmount >= 250) |
56 | pPlayer->GiveNamedItem( "weapon_knife" ); |
57 | pPlayer->m_iMoneyAmount -= 250; |
60 | if(pPlayer->m_iMoneyAmount >= 750) |
61 | pPlayer->GiveNamedItem( "weapon_hammer" ); |
62 | pPlayer->m_iMoneyAmount -= 750; |
65 | if(pPlayer->m_iMoneyAmount >= 10000) |
66 | pPlayer->GiveNamedItem( "weapon_lightsaber" ); |
67 | pPlayer->m_iMoneyAmount -= 10000; |
__________________
hl 4 ever