25.08.2016, 15:49
Nope.
Here you go:-
It's Just an example how you can do it.
Here you go:-
PHP код:
enum PlayerInfo
{
vehslot
};
new PlayerData[MAX_PLAYERS][PlayerInfo];
PHP код:
CMD:vehslot(playerid, parmas[])
{
if(PlayerData[playerid][vehslot] == 8) return SendClientMessage(playerid, -1, "You already have maximum number of vehicle slots!");
PlayerData[playerid][vehslot]++;
return 1;
}
PHP код:
CMD:vehbuy(playerid, parmas[])
{
new vID;
if(PlayerData[playerid][vehslot] == 0 ) return SendClientMessage(playerid, -1, "You have no vehicle slots!");
if(PlayerData[playerid][vehslot] == 8 ) return SendClientMessage(playerid, -1, "You can only own 8 vehicles only!");
if(sscanf(parmas, "u", vID)) return SendClientMessage(playerid, -1, "/vehslot [vehicleid]");
if(vID < 400 || vID > 611) return SendClientMessage(playerid, -1, "Invalid vehicle id!");
if(vID == 520) return SendClientMessage(playerid, -1, "You can not buy this vehicle!");
PlayerData[playerid][vehslot]++;
SendClientMessage(playerid, -1, "You successfully bought your own vehicle!");
return 1;
}