[POMOC] Rent Vozila

Započeo Ahmed97, Jun 12, 2013, 18:54:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moja
Detaljan opis problema: Ovako, hocu da ubacim rent vozila kod aerodroma. Gledao sam neki tut ubacio sam 4 vozila. Rent radi sve, ali ID ostalih vozila su pomijesani, tako akd sjedem u neki kamion kaze Kupite auto Infernus npr. E ovako gledao sam da treba u nekim If provjerama nesto povecati ID-eve za onoliko koliko auta dodas. Onda sam izbrisao sve lijepo i ubacio 18 Rent auta sa komandom /save u modu i uzeo kordinate iz savedpositions.txt. Ta vozila sam ubacio gdje su ostala vozila sljedecim redoslijedom npr. AddStaticVehicle(516,1279.59997559,-1797.09997559,13.30000019,180.00000000,-1,-1); //Nebula         362
AddStaticVehicle(516,1273.40002441,-1797.19995117,13.30000019,180.00000000,-1,-1); //Nebula         363
AddStaticVehicle(516,1267.09997559,-1797.19995117,13.30000019,180.00000000,-1,-1); //Nebula         364
AddStaticVehicle(516,1261.09997559,-1797.09997559,13.30000019,180.00000000,-1,-1); //Nebula         365
AddStaticVehicle(527,1279.50000000,-1815.29980469,13.19999981,90.00000000,-1,-1); //Cadrona         366
AddStaticVehicle(527,1279.40002441,-1821.19995117,13.19999981,90.00000000,-1,-1); //Cadrona         367
AddStaticVehicle(527,1279.30004883,-1826.80004883,13.19999981,90.00000000,-1,-1); //Cadrona         368
AddStaticVehicle(527,1279.19995117,-1832.50000000,13.19999981,90.00000000,-1,-1); //Cadrona         369
AddStaticVehicle(410,1238.80004883,-1813.30004883,13.19999981,270.00000000,-1,-1); //Manana         370
AddStaticVehicle(410,1238.80004883,-1818.19995117,13.19999981,270.00000000,-1,-1); //Manana         371
AddStaticVehicle(410,1238.69995117,-1823.30004883,13.19999981,270.00000000,-1,-1); //Manana         372
AddStaticVehicle(436,1198.80004883,-1827.19995117,13.30000019,270.00000000,-1,-1); //Previon        373
AddStaticVehicle(436,1198.80004883,-1831.69995117,13.30000019,270.00000000,-1,-1); //Previon        374
AddStaticVehicle(436,1198.80004883,-1835.80004883,13.30000019,270.00000000,-1,-1); //Previon        375
AddStaticVehicle(527,1279.59997559,-1810.00000000,13.19999981,90.00000000,-1,-1); //Cadrona         376
AddStaticVehicle(527,1307.19995117,-874.20001221,39.40000153,0.00000000,-1,-1); //Cadrona           377
AddStaticVehicle(527,1312.19995117,-874.20001221,39.40000153,0.00000000,-1,-1); //Cadrona           378
AddStaticVehicle(527,1317.00000000,-874.20001221,39.40000153,0.00000000,-1,-1); //Cadrona           379
AddStaticVehicle(527,1322.30004883,-874.20001221,39.40000153,0.00000000,-1,-1); //Cadrona           380
AddStaticVehicle(533,1307.30004883,-863.70001221,39.40000153,270.00000000,-1,-1); //Feltzer         381
AddStaticVehicle(533,1307.40002441,-859.20001221,39.40000153,270.00000000,-1,-1); //Feltzer         382
AddStaticVehicle(533,1307.40002441,-854.29998779,39.40000153,270.00000000,-1,-1); //Feltzer         383


E tu ja sad hocu da ubacim jos auta kod aerodroma jer je to neki drugi rent i dodao sam i ovako ubacio:
AddStaticVehicle(516,1279.59997559,-1797.09997559,13.30000019,180.00000000,-1,-1); //Nebula         362
AddStaticVehicle(516,1273.40002441,-1797.19995117,13.30000019,180.00000000,-1,-1); //Nebula         363
AddStaticVehicle(516,1267.09997559,-1797.19995117,13.30000019,180.00000000,-1,-1); //Nebula         364
AddStaticVehicle(516,1261.09997559,-1797.09997559,13.30000019,180.00000000,-1,-1); //Nebula         365
AddStaticVehicle(527,1279.50000000,-1815.29980469,13.19999981,90.00000000,-1,-1); //Cadrona         366
AddStaticVehicle(527,1279.40002441,-1821.19995117,13.19999981,90.00000000,-1,-1); //Cadrona         367
AddStaticVehicle(527,1279.30004883,-1826.80004883,13.19999981,90.00000000,-1,-1); //Cadrona         368
AddStaticVehicle(527,1279.19995117,-1832.50000000,13.19999981,90.00000000,-1,-1); //Cadrona         369
AddStaticVehicle(410,1238.80004883,-1813.30004883,13.19999981,270.00000000,-1,-1); //Manana         370
AddStaticVehicle(410,1238.80004883,-1818.19995117,13.19999981,270.00000000,-1,-1); //Manana         371
AddStaticVehicle(410,1238.69995117,-1823.30004883,13.19999981,270.00000000,-1,-1); //Manana         372
AddStaticVehicle(436,1198.80004883,-1827.19995117,13.30000019,270.00000000,-1,-1); //Previon        373
AddStaticVehicle(436,1198.80004883,-1831.69995117,13.30000019,270.00000000,-1,-1); //Previon        374
AddStaticVehicle(436,1198.80004883,-1835.80004883,13.30000019,270.00000000,-1,-1); //Previon        375
AddStaticVehicle(527,1279.59997559,-1810.00000000,13.19999981,90.00000000,-1,-1); //Cadrona         376
AddStaticVehicle(527,1307.19995117,-874.20001221,39.40000153,0.00000000,-1,-1); //Cadrona           377
AddStaticVehicle(527,1312.19995117,-874.20001221,39.40000153,0.00000000,-1,-1); //Cadrona           378
AddStaticVehicle(527,1317.00000000,-874.20001221,39.40000153,0.00000000,-1,-1); //Cadrona           379
AddStaticVehicle(527,1322.30004883,-874.20001221,39.40000153,0.00000000,-1,-1); //Cadrona           380
AddStaticVehicle(533,1307.30004883,-863.70001221,39.40000153,270.00000000,-1,-1); //Feltzer         381
AddStaticVehicle(533,1307.40002441,-859.20001221,39.40000153,270.00000000,-1,-1); //Feltzer         382
AddStaticVehicle(533,1307.40002441,-854.29998779,39.40000153,270.00000000,-1,-1); //Feltzer         383
AddStaticVehicle(426,1552.7462,-2360.6868,13.2980,358.7165,6,6); // Premier 384
AddStaticVehicle(426,1549.4803,-2360.6260,13.2975,358.3189,6,6); // 385
AddStaticVehicle(426,1546.2939,-2360.6133,13.2983,358.4757,6,6); // 386
AddStaticVehicle(426,1543.1567,-2360.6038,13.2979,2.9028,6,6); // 387
AddStaticVehicle(426,1560.1423,-2338.3799,13.2901,90.1786,7,7); // 388
AddStaticVehicle(426,1560.3130,-2335.0552,13.2900,90.6674,7,7); // 389
AddStaticVehicle(426,1560.0979,-2331.6951,13.2907,89.9342,7,7); // 390
AddStaticVehicle(426,1560.5272,-2328.6836,13.2917,92.6966,7,7); // 391
AddStaticVehicle(426,1560.1313,-2325.2798,13.2913,90.3969,7,7); // 392
AddStaticVehicle(426,1560.2975,-2321.9844,13.2915,89.3262,7,7); // 393
AddStaticVehicle(426,1560.2426,-2318.6514,13.2915,88.9612,7,7); // 394
AddStaticVehicle(426,1560.2307,-2315.7786,13.2915,88.1596,7,7); // 395
AddStaticVehicle(426,1560.0223,-2312.2532,13.2909,90.3497,7,7); // 396
AddStaticVehicle(426,1560.0719,-2308.8252,13.2878,89.0401,7,7); // 397
AddStaticVehicle(426,1552.8630,-2360.9153,13.2979,358.6779,7,7); // 398
AddStaticVehicle(426,1549.5502,-2360.6846,13.2974,359.2927,7,7); // 399
AddStaticVehicle(426,1546.1655,-2361.0991,13.2979,0.2390,7,7); // 400
AddStaticVehicle(426,1542.9071,-2360.7302,13.2977,358.8096,7,7); // 401
AddStaticVehicle(426,1539.4429,-2360.7002,13.2982,359.3318,7,7); // 402
AddStaticVehicle(426,1536.3783,-2361.1638,13.2981,0.1606,7,7); // 403
AddStaticVehicle(426,1529.9060,-2360.8987,13.2982,0.1091,7,7); // 404
AddStaticVehicle(426,1526.4077,-2360.8071,13.2974,359.9457,7,7); // 405


I gore u If provjeri za RENT VOZILA stoji ovako:

if(GetPlayerVehicleID(playerid) >= 362 && GetPlayerVehicleID(playerid) <= 383)// ID RENT AUTA

I onda po tutu neke ID treba pomjeriti nesto ja sam uradio ovako:
if(GetPlayerVehicleID(playerid) >= 362 && GetPlayerVehicleID(playerid) <= 405)// ID RENT AUTA

Ovo 405 jer sam dodo jos toliko vozila. Onda tamo kazu da nesto treba pomjerati ostale ID vozila kod provjera za onoliko koliko sam ja dodao vozila a to je 18. Ja imam jos ovih provjera kod renta motora renta bicikala itd ali sta cu pomjerati ? Jel se to odnosi npr ako je sljedeca If provjera postavljena ovako:
if(GetPlayerVehicleID(playerid) >= 406 && GetPlayerVehicleID(playerid) <= 420)// ID RENT AUTA

Da ova oba broja povecam za 18 pa bi bilo 406 + 18 i 420 + 18 pa bi bilo:

if(GetPlayerVehicleID(playerid) >= 424 && GetPlayerVehicleID(playerid) <= 438)// ID NECEG DRUGOG ODNOSNO OSTALIH VOZILA

Mislim da sam objasnio hitno mi je potrebna pomoc, molim moderatore da ne sklanjaju temu pocetnik sam i to ocajan :D Ako jos nesto nije jasno pitajte ispod da jos detaljnije objasnim

radi preko arraya rent vozila evo pogledaj si tutorijal

http://balkan-samp.com/forum/index.php?topic=66191.msg462653#msg462653

Ivica, hvala na linku ali evo pokusacu ne kuzim se u array a evo vec sam rekao vec imam izradjen rent sistem i rent vozila su na drugim lokacijama ja hocu samo da dodam par rent vozila kod aerodroma i da ih stavim na rent u postojecem rent sistemu to jest rent kodu. Samo da pitam sad kad bi radio array jel bi mi mogao ostati ovaj gore rent sistem sto vec imam a ujedno da dodam i array sistem da oba funkcioniraju ?

bolje sva rent vozila stavi u array to je jednostavno i dobro i nece ti oduzet previse vremena to se brzo slozi.

E ja cu sigurno nesto pomijesat mozes mi malo samo detaljnije reci npr sad sta ce se desiti kad izbrisem citav ovaj rent sistem ? Kako onda gdje podsta da radim :D

radis di su i sva vozila pod ongamemodeinit uzeo sam tvoje jedno vozilo rent kao primjer kako da krenes



rent[0] = AddStaticVehicle(516,1279.59997559,-1797.09997559,13.30000019,180.00000000,-1,-1); //Nebula         362


dakle samo tako kreni radit od nule pa rent[1] = itd....

Da al vidi u onom TuT-u za Array sistem sto si mi dao sta kad ja napravim to opet nemam kako da zavrsim rent sistem ?


Imas li FB pa da se lijepo dog, bojim se da obrisem ovo sve kao sto mi stoji addstaticvehicle(kordinati i to)
Jer je po tome uradjeno sve mogu ti dat i dio skripte ali nekako to moram rijesiti