Vehicle System Rp - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle System Rp (
/showthread.php?tid=133744)
Vehicle System Rp -
MrLeNy - 13.03.2010
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?
Re: Vehicle System Rp -
Deat_Itself - 13.03.2010
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
Re: Vehicle System Rp -
Mini` - 13.03.2010
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.
Re: Vehicle System Rp -
Deat_Itself - 13.03.2010
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
Re: Vehicle System Rp -
MrLeNy - 13.03.2010
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]
Re: Vehicle System Rp -
Deat_Itself - 13.03.2010
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 .
Re: Vehicle System Rp -
MrLeNy - 13.03.2010
and how to assign a car to the player?
Re: Vehicle System Rp -
Mini` - 13.03.2010
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.
Re: Vehicle System Rp -
MrLeNy - 13.03.2010
and from what I have to start, because now I do not know?