Jump to content
  • 0

Tutorial: Cum adaug masini in server.


Guest MFI

Question

Am facut acest tutorial pt cei care nu stiu cum sa spawneze masini apoi sa le salveze si ele sa nu dispara la urmatorul restart al serverului.

E simplu, nici eu nu stiam inainte.

Deci:

1. Intri in server.

2. Iti alegi masina care o vrei, sau o spawnezi cu /veh sau /vehicle depinde ce comanda aveti.

3. O bagi in ce loc vrei tu sa ramina.

4. Dai /save

5. Apoi iti apare:

6. Veh Possition Save.

7. Si tot asa cu mai multe masini.

8. Iesi din server.

9. Intri unde ai instalat GTA SA.

10. Cauti " Saved possition.txt ".

11. Va fi in format de document " txt ".

12. Intri in el.

13. Si scolo sint " AddStaticVehicle ".

14. Le selectezi apoi le dai " copy ".

15. Intri in GM.

16. Cauti " OnGameModeInit ".

17. Mai jos vor mai fi " AddStaticVehicle ".

18. Dai pina jos unde se termina " AddStati..... "

19. Si dam " paste ".

20. Apoi dam " compile ".

21. Si gata.

22. Succes total.  :D

Nu uitati: Trebuie sa fiti intr-o masina cind dati /save ...

Am facut acest tutorial pt ca am vreo 2 in lista care ma tot intreaba.

Si mii cam greu sa le explic.

Asa ca am facut acest tutorial.

Sper sa va ajute.

Pt cei care nu au, iata comanda (/veh) ...

if(strcmp(cmd, "/veh", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if (PlayerInfo[playerid][pAdmin] < 4)

{

    SendClientMessage(playerid, 0xA8A8FFFF, "  Ne pare rau , dar tu nu ai accesul la comanda aceasta !");

    return 1;

}

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "Type / Scrie: /veh [carid] [color1] [color2]");

return 1;

}

new car;

car = strval(tmp);

if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "  Vehicle Number can't be below 400 or above 611 !"); return 1; }

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "Type / Scrie: /veh [carid] [color1] [color2]");

return 1;

}

new color1;

color1 = strval(tmp);

if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, "  Culoarea trebe sa fie intre 0 si 126 !"); return 1; }

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "Type / Scrie: /veh [carid] [color1] [color2]");

return 1;

}

new color2;

color2 = strval(tmp);

if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, "  Color Number can't be below 0 or above 126 !"); return 1; }

new Float:X,Float:Y,Float:Z;

GetPlayerPos(playerid, X,Y,Z);

new carid = CreateVehicle(car, X,Y +3,Z, 0.0, color1, color2, 60000);

CreatedCars[CreatedCar] = carid;

CreatedCar ++;

format(string, sizeof(string), "Ai spawnat masina cu id %d ", carid);

SendClientMessage(playerid, COLOR_GREY, string);

}

return 1;

}

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
Guest Underflash

Ladmin folosesc si eu ... am ladmin 4 dar comanda de spawnat masini si de salvat tot n-o stiu :)) eu ma refer sa spawnez masina dupa id de ex : /comanda id (vehiculului)

Link to comment
Share on other sites

  • 0

Ladmin folosesc si eu ... am ladmin 4 dar comanda de spawnat masini si de salvat tot n-o stiu :)) eu ma refer sa spawnez masina dupa id de ex : /comanda id (vehiculului)

Nu te-ai uitat in comenzile care le zice.

Comanda: /car ID [color1] [color2]

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.