Posts: 365
Threads: 70
Joined: Jul 2014
Reputation:
0
I searched the whole sa-mp forums, didn't find a shit.
I want a tutorial (on comment), how to make vehicle system with loading and slots.
I am about 3 months trying to learn how to make it, I can't do anything, so please help me, any information you say will help.
Thanks.
if you will say "there is alot tutorials, just search." do not post!
Posts: 365
Threads: 70
Joined: Jul 2014
Reputation:
0
I don't want filterscript...
Just tell me how to make it
Posts: 1,045
Threads: 150
Joined: Oct 2013
Reputation:
0
You need to store the information of the vehicle in a saving system of some sort(Y_INI,MYSQL,SQLite, etc..)
then simply code a system which will store the owner of the vehicle, vehicle id, etc.. and for slots you simply use your saving system to limit the possibility of car ownership or use arrays. What Kinglee gave you is a good example try reading the code and understanding the basics.
Posts: 365
Threads: 70
Joined: Jul 2014
Reputation:
0
I know somthing, and I tried to do this system using Y_INI, what I made is LoadVehicles; and SaveVehicles;.
it needs enum vehicleinfo and shiz, I have a question, in raven's rp I saw "PlayerInfo[playerid][pPcarkey]" what that used for, slots? can you please explain about it?
Posts: 385
Threads: 20
Joined: May 2014
Reputation:
0
pPcarkey= ParkCarKey it used in RP GM only i think.
Posts: 1,045
Threads: 150
Joined: Oct 2013
Reputation:
0
It is used to check if the player has the "key" for the vehicle so if someone else tries to go inside the car he won't able to because he is not the owner and he doesn't have the "key" for the vehicle. if you wanna make like slots it would be something like "PlayerInfo[playerid][pVehicle1]" "PlayerInfo[playerid][pVehicle2]" "PlayerInfo[playerid][pVehicle3]" so you have three slots, so basically if one of the slots was used you can make a code which will detect it and choose the other slot.