SA-MP Forums Archive
Car respawn near player. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Car respawn near player. (/showthread.php?tid=601635)



Car respawn near player. - Whillyrez - 24.02.2016

Hi,
I need some help with this. When someone use a command, detect players position, teleport a car to the near road and well parked, Like GTA V. Thanks.



Re: Car respawn near player. - saffierr - 24.02.2016

That's near to impossible. Because the vehicle can't detect where the road is. It totally depends on the player's position.


Re: Car respawn near player. - TheLeech - 24.02.2016

Depending on the type of server you have and the area in the size of the playable area it can be easy or complex.

you could make a zone system with parking places for the vehicles to spawn on the road in each zone, So if the player is in a certain zone then the car will spawn for that zone and in one of the random parking places if you know what I mean. Sorry if you don't understand the way I'm trying to explain, But its a way you could do it.

Might take a while, but might be worth it in the end depending on the type of server.


Respuesta: Re: Car respawn near player. - Whillyrez - 24.02.2016

Quote:
Originally Posted by TheLeech
Посмотреть сообщение
Depending on the type of server you have and the area in the size of the playable area it can be easy or complex.

you could make a zone system with parking places for the vehicles to spawn on the road in each zone, So if the player is in a certain zone then the car will spawn for that zone and in one of the random parking places if you know what I mean. Sorry if you don't understand the way I'm trying to explain, But its a way you could do it.

Might take a while, but might be worth it in the end depending on the type of server.
Thanks for your answer, that helps me .


Re: Car respawn near player. - xEF - 24.02.2016

Yes you can, but it 'll be long and unuseful.
You can detect road objects near the player and teleport the vehicle to the object radius, but its hard and long.