[HELP] Custom /buycar command

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.

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.

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

~Bump. I still couldn't figure it out. Anyone up for helping?:S


Forum Jump:

Users browsing this thread: 1 Guest(s)