Car buying and ownership
#1

Im not asking for someone to write me out a code im just asking for a little bit of help.


I do not want a filterscript.


Im just simply looking for someone to point me towards the write way and give me some tips how to code a car buying system and a parking system.


So when they buy it only they can lock or unlock it and park it.


When they park it and they log out or it blows up it respawns to the place they parked it.


Thank You


Please Help Me Please
Reply
#2

You need to have some knowledge in some file manager, so you can save the vehicle information such as owner, coordinates, color, etc.

With this information you can do whatever wants.
Reply
#3

Well,you should know that first of all the most important thing to save is the Owner,as it's useful for the /park and /lock command.Then you must save the X,Y,Z coordinates of the vehicle,but that goes into the /park command code.In order to do it you must check if the player who uses /park is the owner of the car,so you would avoid bugs .Then,you also must save vehicle's color,on /park code command.There's a custom function made by someone,GetVehicleColor,here's the link:https://sampforum.blast.hk/showthread.php?tid=235398.You could alternatevely save the colors when player resprays vehicle.Now,you may also save vehicle's health,because,let's say if the respawning reason is NOT the fact that the player destroyed the car,then it must respawn with the health it had before.And the llast,you can save the Z angle also[THIS freakin bullshit angle it's giving me headaches,I have problems with my Veh OwnerShip ,lemme know if you do something .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)