Taking money when tuning vehicle
#7

You just have to store it. Just like you do with your account system. Which I'm pretty sure you have if you're a Roleplay server.

At my server, I had a folder called players, where I stored every player's stats inside a .int file named after the player.

e.g. Peter_Johnson.ini Albert_Einstein.ini...

So if you would like to save the car parts, First you'd have to make a car ownership script, which basically enables players to buy their cars and spawn them whenever they want, or (if you choose to) spawn them on gamemodeinit.

If this already would be scripted, you would have a file or a database including every information point on the car. E.g.
Код:
Model=522
Owner=Peter_Johnson
Color1=2
Color2=222
SpawnX=0.000
SpawnY=0.000
SpawnZ=0.000
SpawnA=0.000

and so on...
Here you have to add E.g.

Код:
Mod1=
Mod2=
Mod3=
Mod4=

and so on.
Then whenever a player mods his car, save it to the database/file and restore it on next vehicle spawn.

Hope you learned something. Tell me if you need anymore help.
Reply


Messages In This Thread
Taking money when tuning vehicle - by Ceez - 24.06.2013, 15:23
Re: Taking money when tuning vehicle - by Josh_Main - 24.06.2013, 15:57
Re: Taking money when tuning vehicle - by Ceez - 24.06.2013, 18:02
Re: Taking money when tuning vehicle - by Niko_boy - 24.06.2013, 18:23
Re: Taking money when tuning vehicle - by Ceez - 24.06.2013, 18:48
Re: Taking money when tuning vehicle - by Ceez - 25.06.2013, 13:10
Re: Taking money when tuning vehicle - by introzen - 25.06.2013, 13:35
Re: Taking money when tuning vehicle - by Ceez - 25.06.2013, 22:41
Re: Taking money when tuning vehicle - by Maxips2 - 25.06.2013, 22:49

Forum Jump:


Users browsing this thread: 1 Guest(s)