i think you had an opening bracket where there should have been a closing bracket, and a couple too many closing brackets at the end
Код:
if(strcmp(cmd, "/rentcar", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,15.0, 1738.2720,-1862.1799,13.5766))
{
if(GetPlayerMoney(playerid) <= 1000)return SendClientMessage(playerid, COLOR_GREEN, "You Need $1000 To Rent Car ");//You can change the price
if(sscanf(params, "ii", carId, slot)) return SendClientMessage(playerid, COLOR_GREEN, "Usage: /rentcar carId slot");
if(carId < 400 || carId > 611) return SendClientMessage(playerid, COLOR_GREEN, "Invalid car Id, (400 - 611)");
if(slot < 1 || slot > 3) return SendClientMessage(playerid, COLOR_GREEN, "Invalid slot Id, (1 - 3)");
if(slot != 1))
}
if(GetPVarInt(playerid, "rent1") == 10)return SendClientMessage(playerid, COLOR_YELLOW, "This Slot Is In Use");
GetPlayerPos(playerid, x, y, z);
rentcar1[playerid] = CreateVehicle(carId, x, y, z, 0,-1, -1, -1);
PutPlayerInVehicle(playerid, rentcar1[playerid],0);
timer1 = SetTimer("car1", time, true);
DeletePVar(playerid,"unrent1");
GivePlayerMoney(playerid,-price);
SetPVarInt(playerid , "rent1", 10);
{
if(slot ==2))
{
if(GetPVarInt(playerid, "rent2") == 11)return SendClientMessage(playerid, COLOR_YELLOW, "This Slot Is In Use");
GetPlayerPos(playerid, x, y, z);
rentcar2[playerid] = CreateVehicle(carId, x, y, z, 0,-1, -1, -1);
PutPlayerInVehicle(playerid, rentcar2[playerid],0);
timer2 = SetTimer("car2", time, true);
DeletePVar(playerid,"unrent2");
GivePlayerMoney(playerid,-price);
SetPVarInt(playerid , "rent2", 11);
}
if(slot != 3))
{
if(GetPVarInt(playerid, "rent3") == 12)return SendClientMessage(playerid, COLOR_YELLOW, "This Slot Is In Use");
GetPlayerPos(playerid, x, y, z);
rentcar3[playerid] = CreateVehicle(carId, x, y, z, 0,-1, -1, -1);
PutPlayerInVehicle(playerid, rentcar3[playerid],0);
timer3 = SetTimer("car3", time, true);
DeletePVar(playerid,"unrent3");
GivePlayerMoney(playerid,-price);
SetPVarInt(playerid , "rent3", 12);
}
if(IsPlayerInRangeOfPoint(playerid,15.0, 1703.1957,-1470.1140,13.5469))
{
if(GetPlayerMoney(playerid) <= 1000)return SendClientMessage(playerid, COLOR_GREEN, "You Need $1000 To Rent Car ");//You can change the price
if(sscanf(params, "ii", carId, slot)) return SendClientMessage(playerid, COLOR_GREEN, "Usage: /rentcar carId slot");
if(carId < 400 || carId > 611) return SendClientMessage(playerid, COLOR_GREEN, "Invalid car Id, (400 - 611)");
if(slot < 1 || slot > 3) return SendClientMessage(playerid, COLOR_GREEN, "Invalid slot Id, (1 - 3)");
if(slot != 1))
}
if(GetPVarInt(playerid, "rent1") == 10)return SendClientMessage(playerid, COLOR_YELLOW, "This Slot Is In Use");
GetPlayerPos(playerid, x, y, z);
rentcar1[playerid] = CreateVehicle(carId, x, y, z, 0,-1, -1, -1);
PutPlayerInVehicle(playerid, rentcar1[playerid],0);
timer1 = SetTimer("car1", time, true);
DeletePVar(playerid,"unrent1");
GivePlayerMoney(playerid,-price);
SetPVarInt(playerid , "rent1", 10);
{
if(slot ==2))
{
if(GetPVarInt(playerid, "rent2") == 11)return SendClientMessage(playerid, COLOR_YELLOW, "This Slot Is In Use");
GetPlayerPos(playerid, x, y, z);
rentcar2[playerid] = CreateVehicle(carId, x, y, z, 0,-1, -1, -1);
PutPlayerInVehicle(playerid, rentcar2[playerid],0);
timer2 = SetTimer("car2", time, true);
DeletePVar(playerid,"unrent2");
GivePlayerMoney(playerid,-price);
SetPVarInt(playerid , "rent2", 11);
}
if(slot != 3))
{
if(GetPVarInt(playerid, "rent3") == 12)return SendClientMessage(playerid, COLOR_YELLOW, "This Slot Is In Use");
GetPlayerPos(playerid, x, y, z);
rentcar3[playerid] = CreateVehicle(carId, x, y, z, 0,-1, -1, -1);
PutPlayerInVehicle(playerid, rentcar3[playerid],0);
timer3 = SetTimer("car3", time, true);
DeletePVar(playerid,"unrent3");
GivePlayerMoney(playerid,-price);
SetPVarInt(playerid , "rent3", 12);
}
}
}
return 1;
}
Also, improve your indentation with the tab key.