13.03.2010, 17:58
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?
new vehiclelevel[MAX_PLAYERS]; //global variable
vehiclelevel[playerid] = 0; //onplayerconnect
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.");
vehiclelevel[playerid] = 0; //onplayerdisconnect
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.
|
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]
|