Posts: 54
Threads: 8
Joined: Nov 2010
Reputation:
0
17.10.2016, 11:41
(
Последний раз редактировалось catal4n; 17.10.2016 в 14:21.
)
Alright the problem is. You can have 3 slots of vehicles, but from the dealership you can buy only 2, but here is the problem. If you got already 2 cars and go to delership and use /buycar it changes the slot 2 of vehicle owned with the new one that you used last and so on. I want to set it afer you bought 2 cars already and try using /buycar to say: You cant buy anymore or something like that, the idea is to make the dealership wont let you buy card after you got already 2.
Posts: 311
Threads: 27
Joined: May 2016
Reputation:
0
Can you show us the code?
Posts: 54
Threads: 8
Joined: Nov 2010
Reputation:
0
CMD:buycar(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsPlayerInRangeOfPoint(playerid, 2, 545.6661,-1292.2437,17.2422)) return SendClientMessage(playerid, COLOR_GREY, "You are not near the vehicles dealership.");
if(PlayerInfo[playerid][pVIP] >= 2)
{
if(PlayerInfo[playerid][vModel] && PlayerInfo[playerid][vVModel] && PlayerInfo[playerid][vBModel])
{
format(string, sizeof(string), "You already own vehicles ID %d and %d.", PlayerInfo[playerid][pVeh], PlayerInfo[playerid][pVVeh]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
else ShowDialog(playerid, 10);
return 1;
}
if(PlayerInfo[playerid][vModel])
{
format(string, sizeof(string), "You already own vehicle ID %d.", PlayerInfo[playerid][pVeh]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
ShowDialog(playerid, 10);
return 1;
}
Posts: 54
Threads: 8
Joined: Nov 2010
Reputation:
0
Up. Please i really need a solution for this. Anyone?
Posts: 32
Threads: 5
Joined: Dec 2013
Reputation:
0
Please give us the codes with this parametres: "ShowDialog(playerid, 10);". Show your Dialogid 10
Posts: 54
Threads: 8
Joined: Nov 2010
Reputation:
0
The codes with parameters for ShowDialog(playerid, 10) are the only 2 from the "buycar" command.
}
else if(dialogid == 10) // Dealership main
{
if(response)
{
switch(listitem)
{
case 0: ShowDialog(playerid, 11); // Bikes
case 1: ShowDialog(playerid, 12); // Normal Vehicles
case 2: ShowDialog(playerid, 21); // Lowriders
case 3: ShowDialog(playerid, 13); // Off-Road Vehicles
case 4: ShowDialog(playerid, 14); // Sport Vehicles
}
}
}
else if(dialogid == 11) // Bikes