22.10.2013, 14:55
Give this a shot:
pawn Код:
CMD:editcardealership(playerid, params[])
{
for(new d = 0 ; d < MAX_CARDEALERSHIPS; d++)
{
if(IsPlayerInRangeOfPoint(playerid, CarDealershipInfo[d][cdRadius], CarDealershipInfo[d][cdEntranceX], CarDealershipInfo[d][cdEntranceY], CarDealershipInfo[d][cdEntranceZ]))
{
if(IsPlayerOwnerOfCDEx(playerid, d))
{
SetPVarInt(playerid, "editingcd", d);
SetPVarInt(playerid, "editingcdveh", -1);
SetPVarInt(playerid, "editingcdvehpos", 0);
SetPVarInt(playerid, "editingcdvehnew", 0);
new listitems[] = "1 New Vehicle\n2 My Vehicles\n3 Upgrade\n4 Till";
ShowPlayerDialog(playerid,DIALOG_CDEDIT,DIALOG_STYLE_LIST,"Choose an item to continue", listitems,"Select","Cancel");
return 1;
}
else return SendClientMessageEx(playerid, COLOR_GREY, "You do not own that Car Dealership.");
}
}
SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You must be standing inside the radius of the Car Dealership.");
return 1;
}