SA-MP Forums Archive
Need help... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help... (/showthread.php?tid=83302)



Need help... - lakierka - 24.06.2009

Hello all.. I have RolePlay GM. When I restart my server all cars appears in it's spawn places. What should I do that cars stay in the same place like before restart? Sorry for my bad english


Re: Need help... - Correlli - 24.06.2009

You should get vehicle's position and store it in a file.
https://sampwiki.blast.hk/wiki/GetVehiclePos
Once the gamemode starts, make it so it will read from vehicle's file and set vehicle's position.
https://sampwiki.blast.hk/wiki/SetVehiclePos


Re: Need help... - lakierka - 24.06.2009

Quote:
Originally Posted by Don Correlli
Which gamemode are you using?
I think in this forum isn't that GM. Here the link http://www.failai.lt/y2i6wf2jbj77/GRP4.rar.htm


Re: Need help... - Correlli - 24.06.2009

It's not that important, i edited my post before you posted. Read it.


Re: Need help... - lakierka - 24.06.2009

So.. Below public OnGameModeExit() I should create file and get vehicle's pos and below public OnGameModeInit() I should make it read from that file? If yes, where to create that file? In scriptfiles folder?
EDIT:
I need to use include like dini?


Re: Need help... - lakierka - 24.06.2009

Sorry for double posting.. Can anyone answer to my question?


Re: Need help... - Correlli - 24.06.2009

The file will be automatically created in folder called scriptfiles.
You can use file functions -> https://sampwiki.blast.hk/wiki/File_Functions