[HELP] Custom /buycar command - 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: [HELP] Custom /buycar command (
/showthread.php?tid=317402)
[HELP] Custom /buycar command -
NewGuy001 - 11.02.2012
I've tried to do this a lot, but I couldn't figure out how to do it.
First of all, I've mapped a showroom for cars in LS, added some cars there in the gamemode (Like 10 cars).
What I want to do is have players go there, get into a car and type /buycar to buy the car. However, I do not want them to get the car from the showroom ( I don't want to have to put in new cars there manually).
What I want it to do is to create a new car in front of the showroom (I got the coords) exactly like the car they were in when they typed /buycar. Then it should teleport the player near or inside that new car, which will now be his.
Do you guys think that is possible? I'm using a modified LA:RP script right now. If anybody can help me with it, just post in this thread.
Re: [HELP] Custom /buycar command -
[HK]Ryder[AN] - 11.02.2012
This can be done. I am on phone so I cant give code but the way is that when the player types /buycar you check which car you are in.then create a vehicle of that model outside showroom. Then use PutPlayerInVehicle and he will sit there. Then add code to make that car his.
Re: [HELP] Custom /buycar command -
NewGuy001 - 11.02.2012
I knew what the steps where. What I can't figure out how to do is get the vehicle information (model, color) and create a new car with the same model.
I also have the cars.cfg file, so it probably has to create a new entry?
Maybe you could tell me just that piece of the code which saves the info and creates the new car..
Thanks xD
Re: [HELP] Custom /buycar command -
NewGuy001 - 11.02.2012
~Bump. I still couldn't figure it out. Anyone up for helping?:S
Re: [HELP] Custom /buycar command -
NewGuy001 - 11.02.2012
[Bump]