Vehicle System Rp
#1

Hello. I would like to make a system of vehicles, but so that players could buy a maximum of 3 vehicles, and to be nice to save everything. Could someone explain how to make it work well?
Reply
#2

you need to store that in variables.


pawn Код:
new vehiclelevel[MAX_PLAYERS]; //global variable
pawn Код:
vehiclelevel[playerid] = 0; //onplayerconnect
if you have that command which gives vehicle owner rights to a player .
add these lines to it
pawn Код:
if(vehiclelevel[playerid] == 0) vehiclevel[playerid] = 1, SendClientMessage(playerid, color, "you owned 1st vehicle");
else
if(vehiclelevel[playerid] == 1) vehiclelevel[playerid] = 2, SendClientMessage(playerid, color, "you owned 2nd vehicle.");
else
if(vehiclelevel[playerid] == 2) vehiclelevel[playerid] = 3, SendClientMessage(playerid, color, "you owned 3rd vehicle");
else
if(vehiclelevel[playerid] == 3) return SendClientMessage(playerid, color, "You cant own any more vehicles as you already owned 3 vehicles.");
pawn Код:
vehiclelevel[playerid] = 0; //onplayerdisconnect
Reply
#3

That's ugly... My suggestion is to look at a server that already has it, I observe the way it loads/saves player vehicles... Once you have the loading and saving down, then the rest is easy.
Reply
#4

Quote:
Originally Posted by Mini`
That's ugly... My suggestion is to look at a server that already has it, I observe the way it loads/saves player vehicles... Once you have the loading and saving down, then the rest is easy.
well posting here means he needs help . If he doesnt needs help then he wouldnt post here!
He knows better that he can Search aswell
Reply
#5

I mean how to make a 1 player to be able to buy 3 cars and that everything is to save, and run the command for each car that is /v lock/spawn/unspawn [id player's car]
Reply
#6

Quote:
Originally Posted by MrLeNy
I mean how to make a 1 player to be able to buy 3 cars and that everything is to save, and run the command for each car that is /v lock/spawn/unspawn [id player's car]
If you are talking about saving then you have to use dini or dudb etc.It will take a bit much time .
Reply
#7

and how to assign a car to the player?
Reply
#8

To assign a player to own a car... A simple way to do it is saving it in the Player's account file... If you don't like that way, you could look at some filterscripts that save them in a vehicle file.
Reply
#9

and from what I have to start, because now I do not know?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)