SA-MP Forums Archive
A little help - 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: A little help (/showthread.php?tid=576918)



A little help - Rabea - 07.06.2015

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!


Re: A little help - Dangjai - 07.06.2015

I will search for you now don't be sad you will get it


Re: A little help - Rabea - 07.06.2015

Ohh mate
Don't think I am lazy to search or somthing...
I already searching and trying to make this system months, I almost lost the hope!


Re: A little help - Dangjai - 07.06.2015

Check this one https://sampforum.blast.hk/showthread.php?tid=356524 its ok if you can't find we can find one for you


Re: A little help - Rabea - 07.06.2015

I don't want filterscript...
Just tell me how to make it


Re: A little help - DarkLored - 07.06.2015

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.


Re: A little help - Rabea - 07.06.2015

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?


Re: A little help - Dangjai - 07.06.2015

Check this one it will help you.
https://sampforum.blast.hk/showthread.php?tid=193491


Re: A little help - Dangjai - 07.06.2015

pPcarkey= ParkCarKey it used in RP GM only i think.


Re: A little help - DarkLored - 07.06.2015

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.