13.10.2011, 16:49
Here you are
Код:
if(strcmp(cmd, "/veh", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] < 5) { SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command!"); return 1; } ShowPlayerDialog(playerid, CARMENU, DIALOG_STYLE_LIST, "Vehicles","Heavy Trucks\nTrucks\n2Doors\n4Doors\nPlans\nBoats\nTrailers\nGovernment\nRC\nTransportation\nMotorCycles", "Spawn", "Cancel"); } return 1; }
Код:
if(dialogid == CARMENU) { if(response) { if(listitem == 0) // { ShowPlayerDialog(playerid, CARMENU2, DIALOG_STYLE_LIST, "Heavy Trucks","Linerunner\nDumper\nMule\nMr Whoopee\nPacker\nFlatbed\nYankee\nDozer\nBoxville\nBenson\nPetrol\nRoadtrain\nCement\nTractor\nCombine\nDuneride\nDFT 30\nHotdog\nBoxville(black)", "Spawn", "Cancel"); } if(listitem == 1) // { ShowPlayerDialog(playerid, CARMENU3, DIALOG_STYLE_LIST, "Trucks","Pony\nMoonbeam\nBobcat\nRumpo\nTop fun\nWalton\nBurriro\nFork lift\nSadler\nYosemite\nMower\nNews van\nTug\nSadler", "Spawn", "Cancel"); } if(listitem == 2) // { ShowPlayerDialog(playerid, CARMENU4, DIALOG_STYLE_LIST, "2Doors","Bravura\nManana\nEsperanto\nPrevion\nStallion\nHermes\nVirgo\nBlistac\nMajestic\nBuccaneer\nFortune\nCadrona\nFeltzer\nHustler\nTampa\nStafford\nClub\nPicador\nAlpha\nEuros", "Spawn", "Cancel"); } if(listitem == 3) // { ShowPlayerDialog(playerid, CARMENU5, DIALOG_STYLE_LIST, "4Doors","Sentinel\nStretch\nWashington\nPremier\nAdmiral\nGlendale\nOceanic\nGreenwood\nElegant\nNebula\nWilliard\nVincent\nIntruder\nPrimo\nSunrise\nMerit\nTahoma\nEmperor", "Spawn", "Cancel"); } if(listitem == 4) // { ShowPlayerDialog(playerid, CARMENU6, DIALOG_STYLE_LIST, "Plans","Levetian\nHunter\nSeasparrow\nSkimmer\nSparrow\nRustler\nMaverick\nVCN Maverick\nPolice maverick\nBeagle\nCropduster\nStuntplane\nShamal\nHydra\nCargobob\nNevada\nRaindance\nAT 400\nAndromada\nDodo", "Spawn", "Cancel"); } if(listitem == 5) { ShowPlayerDialog(playerid, CARMENU7, DIALOG_STYLE_LIST, "Boats","Predator\nSqualo\nSpeeder\nReefer\nTropic\nCoastgaurd\nDinghy\nMarquis\nJetmax\nLaunch", "Spawn", "Cancel"); } if(listitem == 6) { ShowPlayerDialog(playerid, CARMENU8, DIALOG_STYLE_LIST, "Trailers","Artic trailer 1\nArtic trailer 2\nPetrol tanker\nArtic trailer 3\nBag box A\nBag box B\nStairs\nFarm trailer\nUtility trailer", "Spawn", "Cancel"); } if(listitem == 7) { ShowPlayerDialog(playerid, CARMENU9, DIALOG_STYLE_LIST, "Government","FireTruck\nAmbulance\nEnforcer\nRhino\nBarak\nHummvee\nFBI Rancher\nPolice Bike\nSWAT Truck\nFireTruck2\nLSPD\nSFPD\nLVPD\nPolice Rancher\nSWAT Truck", "Spawn", "Cancel"); } if(listitem == 8) { ShowPlayerDialog(playerid, CARMENU10, DIALOG_STYLE_LIST, "RC","Bandit\nBaron\nRaider\nGoblin\nTiger\nCam", "Spawn", "Cancel"); } if(listitem == 9) { ShowPlayerDialog(playerid, CARMENU11, DIALOG_STYLE_LIST, "Transportation","Trashmaster\nTaxi\nBus\nCoach\nCabbie\nBaggagen\nTowtruck\nFreight\nStreak\nUtility Truck\nSweeper", "Spawn", "Cancel"); } if(listitem == 10) { ShowPlayerDialog(playerid, CARMENU12, DIALOG_STYLE_LIST, "MotorCycles","Pizza boy\nPCJ 600\nFaggio\nFreeway\nSanchez\nFCR 900\nNRG 500\nBF 400\nWayfarer", "Spawn", "Cancel"); } } } if(dialogid == CARMENU2) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(403, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(406, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(414, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(423, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(443, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(455, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(456, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(486, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(498, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 9) { CreateVehicle(499, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 10) { CreateVehicle(514, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 11) { CreateVehicle(515, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 12) { CreateVehicle(524, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 13) { CreateVehicle(531, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 14) { CreateVehicle(532, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 15) { CreateVehicle(573, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 16) { CreateVehicle(578, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 17) { CreateVehicle(588, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 18) { CreateVehicle(609, X,Y,Z, 0.0, 0, 0, 7200000); } } } if(dialogid == CARMENU3) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(413, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(418, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(422, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(440, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(459, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(478, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(482, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(530, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(543, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 9) { CreateVehicle(554, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 10) { CreateVehicle(572, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 11) { CreateVehicle(582, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 12) { CreateVehicle(583, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 13) { CreateVehicle(605, X,Y,Z, 0.0, 0, 0, 7200000); } } } if(dialogid == CARMENU4) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(401, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(410, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(419, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(436, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(439, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(474, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(491, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(496, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(517, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 9) { CreateVehicle(518, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 10) { CreateVehicle(526, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 11) { CreateVehicle(527, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 12) { CreateVehicle(533, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 13) { CreateVehicle(545, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 14) { CreateVehicle(549, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 15) { CreateVehicle(580, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 16) { CreateVehicle(589, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 17) { CreateVehicle(600, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 18) { CreateVehicle(602, X,Y,Z, 0.0, 0, 0, 7200000); } } } if(dialogid == CARMENU5) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(405, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(409, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(421, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(426, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(445, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(466, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(467, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(492, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(507, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 9) { CreateVehicle(516, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 10) { CreateVehicle(529, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 11) { CreateVehicle(540, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 12) { CreateVehicle(546, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 13) { CreateVehicle(547, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 14) { CreateVehicle(550, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 15) { CreateVehicle(551, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 16) { CreateVehicle(566, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 17) { CreateVehicle(585, X,Y,Z, 0.0, 0, 0, 7200000); } } } if(dialogid == CARMENU6) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(417, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(425, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(447, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(460, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(469, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(476, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(487, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(488, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(497, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 9) { CreateVehicle(511, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 10) { CreateVehicle(512, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 11) { CreateVehicle(513, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 12) { CreateVehicle(519, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 13) { CreateVehicle(520, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 14) { CreateVehicle(548, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 15) { CreateVehicle(553, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 16) { CreateVehicle(563, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 17) { CreateVehicle(577, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 18) { CreateVehicle(592, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 19) { CreateVehicle(593, X,Y,Z, 0.0, 0, 0, 7200000); } } } if(dialogid == CARMENU7) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(430, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(446, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(452, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(453, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(454, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(472, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(473, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(484, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(493, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 9) { CreateVehicle(595, X,Y,Z, 0.0, 0, 0, 7200000); } } } if(dialogid == CARMENU8) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(435, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(450, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(584, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(591, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(606, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(607, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(608, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(610, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(611, X,Y,Z, 0.0, 0, 0, 7200000); } } } if(dialogid == CARMENU9) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(407, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(416, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(427, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(428, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(432, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(433, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(470, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(490, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(523, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 9) { CreateVehicle(528, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 10) { CreateVehicle(544, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 11) { CreateVehicle(596, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 12) { CreateVehicle(597, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 13) { CreateVehicle(598, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 14) { CreateVehicle(599, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 15) { CreateVehicle(601, X,Y,Z, 0.0, 0, 0, 7200000); } } } if(dialogid == CARMENU10) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { RC1 = CreateVehicle(441, X,Y,Z, 0.0, 0, 0, 7200000); PutPlayerInVehicle(playerid, RC1, 1); } if(listitem == 1) // { RC2 = CreateVehicle(464, X,Y,Z, 0.0, 0, 0, 7200000); PutPlayerInVehicle(playerid, RC2, 1); } if(listitem == 2) // { RC3 = CreateVehicle(465, X,Y,Z, 0.0, 0, 0, 7200000); PutPlayerInVehicle(playerid, RC3, 1); } if(listitem == 3) // { RC4 = CreateVehicle(501, X,Y,Z, 0.0, 0, 0, 7200000); PutPlayerInVehicle(playerid, RC4, 1); } if(listitem == 4) // { RC5 = CreateVehicle(564, X,Y,Z, 0.0, 0, 0, 7200000); PutPlayerInVehicle(playerid, RC5, 1); } if(listitem == 5) { RC6 = CreateVehicle(594, X,Y,Z, 0.0, 0, 0, 7200000); PutPlayerInVehicle(playerid, RC6, 1); } } } if(dialogid == CARMENU11) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(435, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(450, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(584, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(591, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(606, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(607, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(608, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(610, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(611, X,Y,Z, 0.0, 0, 0, 7200000); } } } if(dialogid == CARMENU12) { if(response) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); if(listitem == 0) // { CreateVehicle(448, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 1) // { CreateVehicle(461, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 2) // { CreateVehicle(462, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 3) // { CreateVehicle(463, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 4) // { CreateVehicle(468, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 5) { CreateVehicle(521, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 6) { CreateVehicle(522, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 7) { CreateVehicle(581, X,Y,Z, 0.0, 0, 0, 7200000); } if(listitem == 8) { CreateVehicle(586, X,Y,Z, 0.0, 0, 0, 7200000); } } }