03.08.2010, 03:58
(
Последний раз редактировалось CoaPsyFactor; 03.08.2010 в 04:52.
)
hi there, so this is the problem, when i want to buy vehicle it print everything ok, everything but price don't
here is the code
and if this would help, this is buyable vehicles
here is the code
pawn Код:
if(strcmp(vtmp, "buyvehicle", true) == 0){
if(PlayerInfo[playerid][pVehicle1] > 0 && PlayerInfo[playerid][pVehicle2] > 0 && PlayerInfo[playerid][pVehicle3] > 0){
InfoBoxForPlayer(playerid, "You already have mex number of vehicles.~n~You can not buy another one.~n~Type exit to hide this message");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,5.0,-1967.774291,293.854766,34.986248)){
vehiclebuyid = strtok(cmdtext, idx);
if(strlen(vehiclebuyid) == 0){
new show = sizeof(buyablevehicles);
new show2 = show / 3;
for(new v; v<show2; v++){
vi = v * 3;
format(vtext, sizeof(vtext), "ID: %d - Name: %s, Price: %d$ | ID: %d - Name: %s, Price: %d$ | ID: %d - Name: %s, Price: %d$", buyablevehicles[vi][0], buyablevehicles[vi][1], buyablevehicles[vi][2], buyablevehicles[vi+1][0], buyablevehicles[vi+1][1], buyablevehicles[vi+1][2], buyablevehicles[vi+2][0], buyablevehicles[vi+2][1], buyablevehicles[vi+2][2]);
SendClientMessage(playerid, COLOR_YELLOW,vtext);
}
return 1;
}
}
}
pawn Код:
new buyablevehicles[][32] = {
{400, "Landstalker", 15000},
{401, "Bravura", 10000},
{402, "Buffalo", 70000},
{404, "Perenniel", 8000},
{405, "Sentinel", 30000},
{410, "Manana", 8000},
{411, "Infernus", 80000},
{412, "Voodoo", 25000},
{413, "Pony", 25000},
{415, "Cheetah", 1000000},
{418, "Moonbeam", 25000},
{419, "Esperanto", 30000},
{421, "Washington", 35000},
{422, "Bobcat", 20000},
{424, "BFInjection", 50000},
{426, "Premier", 55000},
{429, "Banshee", 500000},
{436, "Previon", 20000},
{439, "Stallion", 15000},
{440, "Rumpo", 25000},
{445, "Admiral", 30000},
{451, "Turismo", 2000000},
{458, "Solair", 30000},
{461, "PCJ-600", 40000},
{462, "Faggio", 11000},
{463, "Freeway", 25000},
{466, "Glendale", 13000},
{467, "Oceanic", 10000},
{468, "Sanchez", 32000},
{470, "Patriot", 150000},
{471, "Quad", 20000},
{474, "Hermes", 40000},
{475, "Sabre", 45000},
{477, "ZR-350", 1000000},
{478, "Walton", 10000},
{479, "Regina", 38000},
{480, "Comet", 1500000},
{482, "Burrito", 30000},
{489, "Rancher", 50000},
{491, "Virgo", 50000},
{492, "Greenwood", 65000},
{496, "BlistaCompact", 40000},
{500, "Mesa", 52000},
{506, "SuperGT", 1000000},
{507, "Elegant", 65000},
{516, "Nebula", 25000},
{517, "Majestic", 30000},
{518, "Buccaneer", 30000},
{521, "FCR-900", 60000},
{522, "NRG-500", 75000},
{526, "Fortune", 40000},
{527, "Cadrona", 30000},
{526, "Willard", 25000},
{531, "Tractor", 3000},
{533, "Feltzer", 50000},
{534, "Remington", 65000},
{535, "Slamvan", 75000},
{536, "Blade", 60000},
{540, "Vincent", 45000},
{541, "Bullet", 1000000},
{542, "Clover", 18000},
{543, "Sadler", 8000},
{546, "Intruder", 20000},
{547, "Primo", 25000},
{549, "Tampa", 18000},
{550, "Sunrise", 21000},
{551, "Merit", 20000},
{554, "Yosemite", 45000},
{555, "Windsor", 500000},
{558, "Uranus", 650000},
{559, "Jester", 250000},
{560, "Sultan", 150000},
{561, "Stratum", 70000},
{562, "Elegy", 500000},
{565, "Flash", 300000},
{566, "Tahoma", 42000},
{567, "Savanna", 65000},
{603, "Phoenix", 500000},
{602, "Alpha", 300000},
{600, "Picador", 15000},
{589, "Club", 70000},
{587, "Euros", 80000},
{586, "Wayfarer", 24560},
{585, "Emperor", 32000},
{581, "BF-400", 47000},
{580, "Stafford", 150000},
{579, "Huntley", 80000},
{576, "Tornado", 45000},
{575, "Broadway", 500000}
};