Jump to content

Cerere Tutorial


Recommended Posts

Pentru inceput adaugi aceasta matrice undeva pe la inceput in gamemode-ul tau.


[pawn]new Float:RandomCarSpawn[][3] =


Aceasta matrice creeaza locatiile de spawn pentru masina. Poti sa le modifici sa le stergi sau sa adaugi. Trebuie sa fie dupa acest format [pawn]{PosX, PosY, PosZ}[/pawn]


Acum la on OnGameModeInit sau in comanda ta adaugi [pawn]new rand = random(sizeof(RandomCarSpawn));


[pawn]new rand = random(sizeof(RandomCarSpawn));[/pawn] Ia un numar la intamplare de la 0 la n (n este numarul de elemente din matrice).


[pawn]CreateVehicle(411,RandomCarSpawn[rand][0], RandomCarSpawn[rand][1], RandomCarSpawn[rand][2], 0, 0, 0, 0);[/pawn] Creeaza masina cu coordonatele de pe pozitia care a fost aleasa aleatoriu anterior de variabila rand.


Link to comment
Share on other sites

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.