07.11.2015, 17:15
Hello my dealership is based on dialog i have a problem i have more than one dealership so i want to detect the nearest dealership i am buying my car and spawn it there.
this is my buying code:
i need an example cord as i have no idea how to do it thanks
this is my buying code:
Код:
if(money < 800) return SendClientMessage(playerid, -1, "You don't have enough money");
if(money > 800)
{
GivePlayerMoney(playerid, -800);
SendClientMessage(playerid, -1, "You bought a freeway its parked in the nearest garage.");
PlayerInfo[playerid][pVehicle1] = 1;
PlayerInfo[playerid][pVehicle1Model] = 463;
PlayerInfo[playerid][pVehicle1X] = 1551.4;
PlayerInfo[playerid][pVehicle1Y] = -31;
PlayerInfo[playerid][pVehicle1Z] = 21.9;
PlayerInfo[playerid][pVehicle1C] = 279.998;
personalcar1[playerid] = CreateVehicle(463,1551.4,-31,21.9,279.998, -1, -1, 99999);
OnPlayerUpdate(playerid);
}


