Jump to content

Vehicule in cars.cfg


Gireada

Recommended Posts

Buna m-am gandit sa fac un tutorial cum sa pui vehicule in ShowRoom fara sa se schimbe id-urile

Atentie! Atentie! Sistemul meu e cam vechi dar e la bun. Daca aveti voi ceva in plus nu stergeti. Faceti ce va zic eu.

Incepem

1.Adaugam masinile in cars.cfg.

Vehiculele trebuie sa fie in genul asta: 411, 2386.2446, 559.4359, 7.6070, 90.0000, 1, 1,Dealership,Infernus,520000,,0,0

451, 2353.5449, 572.8694, 7.3122, 90.0000, -1, -1,Dealership,Turismo,492000,,0,0

Ce inseamna fiecare:

411, 2386.2446, 559.4359, 7.6070, 90.0000, 1, 1,Dealership,Infernus,520000,0,0,0

411 -ID Vehiculului (infernus)

2386.2446, 559.4359, 7.6070, 90.0000- Coordonatele Vehiculului

1, 1 - Culoarea Vehiculului

Dealership - Daca e de vanzare (puteti scrie nume acolo Ex:Gireda_Iulian)

Infernus - Aceasta e descrierea ce fel de vehicul este

520000 - Pretul Vehiculului

,,0 -Daca este cumparat (0-nu 1-da)

,0 - Daca vehiculul este inchis(1)/deschis(0)

(Vam atasat un Exemplu de Cars.cfg e de LV)

http://wiki.sa-mp.com/wiki/Color_ID <<<<<< Culori vehicule

http://wiki.sa-mp.com/wiki/Vehicle_Model_ID_List <<<<<<<<<< ID vehicule

Am rezolvat cu toate astea

2.Daca sau pus vehicule noi in trebuie sa face in PWN(GameMode) cateva schimbaro.

[pawn]AddStaticVehicleEx(487, 1291.5544, -787.3508, 97.5544, 0.0000, 0, 0, 30000);// LCN 232[/pawn]

Aceasta este ultima mea masina din GameMode.Are Id 232.

3.Cautam(CTRL+F)  [pawn]public IsAnOwnableCar[/pawn]

iar la linia punem astfel

[pawn]if(carid >= 233 && carid <= X)[/pawn]

(233-nr masinilor din GM+1 X-{cate vehicule ai in Cars.cfg}+{nr. vehiculelor din GM}

Exemplu:Am 100 vehicule in Cars.cfg:

if(carid >= 233 && carid <= 333)

4.Cautam(CTRL+F) [pawn]public OnPlayerConnect[/pawn]

mai jos gasim

        for(new h = 233; h < sizeof(CarInfo); h++)//unde 233 este id masinilor din GM+1

{

SetVehicleParamsForPlayer(h,playerid,0,CarInfo[h][cLock]);

}

5.Cautam(CTRL+F) [pawn]public LoadCar()[/pawn]

mai jos gasim

new idx = 233;//unde 233 este id vehiculelor din GM+1

6.Cautam(CTRL+F) [pawn]public SaveCarCoords()[/pawn]

mai jos gasim

if(idx == 233)//unde 233 este id vehiculelor din GM+1

{

file2 = fopen("cars.cfg", io_write);

}

7.Cautam(CTRL+F) [pawn]public OnGameModeInit()[/pawn]

mai jos gasim

for(new h = 233; h < sizeof(CarInfo); h++)//la fel unde 233 este nr masinilor din GM+1

{

8.Cautam(CTRL+F) [pawn]public OnPropUpdate()[/pawn]

mai jos gasim

idx = 233;//unde 233 este nr masinilor din GM+1

while (idx < sizeof(CarInfo))

9.Tot la OnPropUdate() mai jos gasim

if(idx == 233)//unde 233 este nr masinilor din GM+1

{

file2 = fopen("cars.cfg", io_write);

}

10.Ultimul Pas.

Cautam (CTRL+F) [pawn]new CarInfo[/pawn]

Si gasim:

[pawn]new CarInfo[x][cInfo];[/pawn]

X-Acesta fiind ultimul id (X-{cate vehicule ai in Cars.cfg}+{nr. vehiculelor din GM})

Daca nu ati inteles coment sau apare ceva

Atentie folositi acest Tutorial daca aveti acest sistem .Daca il folositi pe a lui IM_Bank aveti comanda de /acreatecar acolo aveti si de salvare a tuningului. si e complet diferit la 411, 2386.2446, 559.4359, 7.6070, 90.0000, 1, 1,Dealership,Infernus,520000,,0,0

Update facut azi 21.01.2013 ora 18:23

  • Upvote 1

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 weeks later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.