new tun1;
new tun2
tun1 = CreateVehicle(...);
tun2 = CreateVehicle(...);
Addvehiclecompoment(tun1,.....);
Addvehiclecompoment(tun2,.....);
remélem érted mire célzok
igen de én nem akarok minden autónak újat rakni pickupokat is meg lehetett oldani így Pick[21], és a kocsikat azt mér nem lehet
Proobléma megoldva így sikerült megoldani (a kód a Ro-Zone v5 GM bol van):
new paint[15][1]=
{
{-10}, {-9}, {-8}, {-7}, {-6}, {-5}, {-4}, {-3}, {-2}, {-1}, {0}, {1}, {2}, {3}, {4}
};
new wangy[13];
wangy[0]=AddStaticVehicleEx(536,-1950.125,257.625,41.528,44.0,-1,-1, 20);
wangy[1]=AddStaticVehicleEx(535,-1948.378,270.764,41.528,134.0,-1,-1, 20);
wangy[2]=AddStaticVehicleEx(567,-1954.903,302.156,41.528,181.0,-1,-1, 20);
wangy[3]=AddStaticVehicleEx(412,-1953.500,257.640,35.399,44.0,-1,-1, 20);
wangy[4]=AddStaticVehicleEx(562,-1947.603,263.595,35.549,67.0,-1,-1, 20);
wangy[5]=AddStaticVehicleEx(560,-1947.645,271.941,35.549,123.0,-1,-1, 20);
wangy[6]=AddStaticVehicleEx(565,-1960.687,261.873,35.549,327.0,-1,-1, 20);
wangy[7]=AddStaticVehicleEx(434,-1955.098,299.670,35.549,101.0,-1,-1, 20);
wangy[8]=AddStaticVehicleEx(561,-1988.803,273.111,35.549,266.0,-1,-1, 20);
wangy[9]=AddStaticVehicleEx(558,-1989.347,267.574,35.549,266.0,-1,-1, 20);
wangy[10]=AddStaticVehicleEx(559,-1989.844,261.585,35.549,266.0,-1,-1, 20);
wangy[11]=AddStaticVehicleEx(562,-1990.533,254.699,35.549,266.0,-1,-1, 20);
wangy[12]=AddStaticVehicleEx(565,-1991.736,248.171,35.549,264.0,-1,-1, 20);
//for(new w;w<12;w++)return TuneVehicle2(wangy[w]);
TuneVehicle2(wangy[0]);
TuneVehicle2(wangy[1]);
TuneVehicle2(wangy[2]);
TuneVehicle2(wangy[3]);
TuneVehicle2(wangy[4]);
TuneVehicle2(wangy[5]);
TuneVehicle2(wangy[6]);
TuneVehicle2(wangy[7]);
TuneVehicle2(wangy[8]);
TuneVehicle2(wangy[9]);
TuneVehicle2(wangy[10]);
TuneVehicle2(wangy[11]);
TuneVehicle2(wangy[12]);
//grove
new sgrove[9];
sgrove[0]=AddStaticVehicleEx(567,2471.519,-1670.409,13.299,192.0,86,86,30);
sgrove[1]=AddStaticVehicleEx(567,2481.578,-1681.019,13.310,259.0,86,86,30);
sgrove[2]=AddStaticVehicleEx(567,2497.312,-1681.776,13.334,282.0,86,86,30);
sgrove[3]=AddStaticVehicleEx(567,2505.981,-1675.833,13.354,327.0,86,86,30);
sgrove[4]=AddStaticVehicleEx(567,2507.437,-1665.448,13.379,11.0,86,86,30);
sgrove[5]=AddStaticVehicleEx(567,2501.724,-1657.373,13.382,56.0,86,86,30);
sgrove[6]=AddStaticVehicleEx(567,2488.006,-1655.577,13.325,89.0,86,86,30);
sgrove[7]=AddStaticVehicleEx(567,2475.346,-1655.544,13.325,89.0,86,86,30);
sgrove[8]=AddStaticVehicleEx(535,2504.853,-1694.520,13.537,0.0,86,86,30);
AddStaticVehicleEx(522,2526.210,-1664.643,14.905,89.0,86,86,30);
AddStaticVehicleEx(522,2526.116,-1665.894,14.905,89.0,86,86,30);
AddStaticVehicleEx(522,2526.132,-1667.137,14.905,89.0,86,86,30);
AddStaticVehicleEx(522,2526.156,-1668.497,14.905,89.0,86,86,30);
TuneVehicle2(sgrove[0]);
TuneVehicle2(sgrove[1]);
TuneVehicle2(sgrove[2]);
TuneVehicle2(sgrove[3]);
TuneVehicle2(sgrove[4]);
TuneVehicle2(sgrove[5]);
TuneVehicle2(sgrove[6]);
TuneVehicle2(sgrove[7]);
TuneVehicle2(sgrove[8]);
//otto\'s cars
new otoc[10];
otoc[0]=AddStaticVehicleEx(477,-1648.987,1208.170,20.969,22.0,-1,-1,120000); // zr-450
otoc[1]=AddStaticVehicleEx(451,-1655.631,1207.146,21.169,338.0,-1,-1,120000); // turismo
otoc[2]=AddStaticVehicleEx(541,-1660.534,1205.927,21.269,0.0,-1,-1,120000); // bullet
otoc[3]=AddStaticVehicleEx(411,-1667.324,1205.282,21.369,293.0,-1,-1,120000); // infernus
otoc[4]=AddStaticVehicleEx(562,-1648.526,1205.093,13.472,259.0,-1,-1,120000); // spawnpoint (4)
otoc[5]=AddStaticVehicleEx(558,-1678.303,1211.129,13.472,214.0,-1,-1,120000); // spawnpoint (5)
otoc[6]=AddStaticVehicleEx(559,-1665.382,1223.857,13.472,248.0,-1,-1,120000); // spawnpoint (6)
otoc[7]=AddStaticVehicleEx(560,-1659.099,1214.578,13.472,327.0,-1,-1,120000); // spawnpoint (7)
otoc[8]=AddStaticVehicleEx(561,-1668.167,1207.137,7.055,327.0,-1,-1,120000); // spawnpoint (
otoc[9]=AddStaticVehicleEx(565,-1661.527,1215.114,7.055,282.0,-1,-1,120000); // spawnpoint (9)
for(new i;i<10;i++)
{
TuneVehicle2(otoc);
}
stock TuneVehicle2(vehicleid)
{
new rand = random(sizeof(paint));
new carid;
carid = vehicleid;
new modelid;
modelid = GetVehicleModel(carid);
switch(modelid)
{
case 400:
{
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1018);
AddVehicleComponent(carid, 1013);
AddVehicleComponent(carid, 1081);
AddVehicleComponent(carid, 1086);
}
case 401:
{
AddVehicleComponent(carid, 1086);
AddVehicleComponent(carid, 1139);
AddVehicleComponent(carid, 1081);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1012);
AddVehicleComponent(carid, 1013);
AddVehicleComponent(carid, 1042);
AddVehicleComponent(carid, 1043);
AddVehicleComponent(carid, 1018);
AddVehicleComponent(carid, 1006);
AddVehicleComponent(carid, 1007);
AddVehicleComponent(carid, 1017);
}
//DUMPER
case 406:
{
AddVehicleComponent(carid, 1081);
}
case 444:
{
AddVehicleComponent(carid, 1081);
AddVehicleComponent(carid, 1087);
}
//FIRETRUCK
case 407:
{
AddVehicleComponent(carid, 1081);
AddVehicleComponent(carid, 1010);
}
case 578, 579, 580, 582, 583, 584, 585, 587, 588, 589, 596, 597,
598, 599, 600, 601, 602, 603, 604, 605, 609, 568, 572, 574, 402,
403, 404, 405, 408, 409, 410, 411, 412, 413, 414, 415, 416, 418,
419, 421, 422, 423, 424, 426, 427, 428, 429, 431, 432, 433, 434,
436, 437, 438, 439, 440, 441, 442, 443, 445, 451, 455, 456,
457, 458, 459, 466, 467, 470, 474, 475, 477, 478, 479, 480, 482,
483, 485, 486, 489, 492, 494, 495, 496, 498, 499, 500, 502, 503,
504, 505, 506, 507, 508, 514, 515, 516, 517, 518, 524, 525, 526,
527, 528, 529, 530, 531, 532, 533, 540, 541, 542, 543, 566, 544,
545, 546, 547, 549, 550, 551, 552, 554, 555:
{
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1081);
}
//TAXI
case 420:
{
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1081);
AddVehicleComponent(carid, 1139);
}
//REMINGTON
case 534:
{
ChangeVehiclePaintjob(carid, paint[rand][0]);//2);
AddVehicleComponent(carid, 1180);
AddVehicleComponent(carid, 1185);
AddVehicleComponent(carid, 1100);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1127);
AddVehicleComponent(carid, 1101);
AddVehicleComponent(carid, 1122);
AddVehicleComponent(carid, 1087);
}
//SLAMVAN
case 535:
{
ChangeVehiclePaintjob(carid, paint[rand][0]);//2);
AddVehicleComponent(carid, 1109);
AddVehicleComponent(carid, 1115);
AddVehicleComponent(carid, 1117);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1114);
AddVehicleComponent(carid, 1081);
AddVehicleComponent(carid, 1119);
AddVehicleComponent(carid, 1121);
}
//BLADE
case 536:
{
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1183);
AddVehicleComponent(carid, 1181);
AddVehicleComponent(carid, 1107);
AddVehicleComponent(carid, 1104);
AddVehicleComponent(carid, 1108);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1081);
}
//MONSTERA
case 556, 557:
{
AddVehicleComponent(carid, 1010);
}
//URANUS
case 558:
{
AddVehicleComponent(carid, 1092);
AddVehicleComponent(carid, 1166);
AddVehicleComponent(carid, 1165);
AddVehicleComponent(carid, 1090);
AddVehicleComponent(carid, 1094);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1163);
AddVehicleComponent(carid, 1091);
ChangeVehiclePaintjob(carid, paint[rand][0]);//2);
}
//JESTER
case 559:
{
AddVehicleComponent(carid, 1070);
AddVehicleComponent(carid, 1066);
AddVehicleComponent(carid, 1072);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1147);
AddVehicleComponent(carid, 1068);
AddVehicleComponent(carid, 1173);
AddVehicleComponent(carid, 1161);
ChangeVehiclePaintjob(carid, paint[rand][0]);//1);
}
//SULTAN
case 560:
{
AddVehicleComponent(carid, 1028);
AddVehicleComponent(carid, 1140);
AddVehicleComponent(carid, 1170);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1139);
AddVehicleComponent(carid, 1033);
AddVehicleComponent(carid, 1031);
AddVehicleComponent(carid, 1030);
ChangeVehiclePaintjob(carid, paint[rand][0]);//1);
}
//STRATUM
case 561:
{
AddVehicleComponent(carid, 1056);
AddVehicleComponent(carid, 1156);
AddVehicleComponent(carid, 1157);
AddVehicleComponent(carid, 1062);
AddVehicleComponent(carid, 1059);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1146);
AddVehicleComponent(carid, 1061);
ChangeVehiclePaintjob(carid, paint[rand][0]);//2);
}
//ELEGY
case 562:
{
ChangeVehiclePaintjob(carid, paint[rand][0]);//1);
AddVehicleComponent(carid, 1037);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1035);
AddVehicleComponent(carid, 1039);
AddVehicleComponent(carid, 1041);
AddVehicleComponent(carid, 1086);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1147);
AddVehicleComponent(carid, 1148);
AddVehicleComponent(carid, 1172);
}
//FLASH
case 565:
{
ChangeVehiclePaintjob(carid, paint[rand][0]);//2);
AddVehicleComponent(carid, 1046);
AddVehicleComponent(carid, 1151);
AddVehicleComponent(carid, 1152);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1139);
AddVehicleComponent(carid, 1081);
AddVehicleComponent(carid, 1053);
AddVehicleComponent(carid, 1047);
AddVehicleComponent(carid, 1051);
}
//SAVANNA
case 567:
{
AddVehicleComponent(carid, 1188);
AddVehicleComponent(carid, 1186);
AddVehicleComponent(carid, 1102);
AddVehicleComponent(carid, 1133);
AddVehicleComponent(carid, 1018);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1087);
ChangeVehiclePaintjob(carid, paint[rand][0]);//2);
AddVehicleComponent(carid, 1081);
}
case 575:
{
ChangeVehiclePaintjob(carid, paint[rand][0]);//1);
AddVehicleComponent(carid, 1175);
AddVehicleComponent(carid, 1177);
AddVehicleComponent(carid, 1043);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1081);
AddVehicleComponent(carid, 1042);
AddVehicleComponent(carid, 1099);
AddVehicleComponent(carid, 1087);
}
//TORNADO
case 576:
{
ChangeVehiclePaintjob(carid, paint[rand][0]);//2);
AddVehicleComponent(carid, 1191);
AddVehicleComponent(carid, 1193);
AddVehicleComponent(carid, 1010);
AddVehicleComponent(carid, 1018);
AddVehicleComponent(carid, 1081);
AddVehicleComponent(carid, 1087);
AddVehicleComponent(carid, 1134);
AddVehicleComponent(carid, 1137);
}
case 571:
{
AddVehicleComponent(carid, 1081);
}
case 581, 509, 481, 462, 521, 463, 510, 522, 461, 448, 471, 468, 586:
{
AddVehicleComponent(carid, 1081);
}
}
return 1;
}