09.03.2016, 01:03
I fixed the warnings I moved the ")"
fixed code is:
Now I have still the same "tag mismatch" warning on these three lines.
The whole code that these are in is:
fixed code is:
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]) && vw == HouseInfo[h][hInsideWorld]) return h;
PHP код:
if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate1]) == 0)
PHP код:
else if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate2]) == 0)
PHP код:
else if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate3]) == 0)
PHP код:
if(dialogid == DIALOG_VEHICLE)
{
if(response)
{
switch(listitem)
{
case 0:
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine == 0 && Fuel[vehicleid] <= 0)
{
ShowErrorDialog(playerid, "This vehicle is out of fuel.");
return 1;
}
if(engine == 1) { engine = 0; lights = 0; }
else { engine = 1; lights = 1; }
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
}
case 1:
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(lights == 1) lights = 0; else lights = 1;
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
}
case 2:
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(bonnet == 1) bonnet = 0; else bonnet = 1;
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
}
case 3:
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(boot == 1) boot = 0; else boot = 1;
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
}
case 4:
{
if(!GetPVarInt(playerid, "GasCan"))
{
ShowErrorDialog(playerid, "You don't have a gas can.");
return 1;
}
new vehicleid = GetPlayerVehicleID(playerid);
if(Fuel[vehicleid] < 80.0) Fuel[vehicleid] += 20.0;
else Fuel[vehicleid] = 100.0;
SetPVarInt(playerid, "GasCan", 0);
SendClientMessage(playerid, COLOR_WHITE, "You have filled the fuel tank with 20% fuel.");
}
case 5:
{
new id = GetPVarInt(playerid, "DialogValue1");
if(GetPlayerVehicleAccess(playerid, id) < 2)
{
ShowErrorDialog(playerid, "You are not the owner of this vehicle.");
return 1;
}
if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate1]) == 0)
{
PlayerInfo[playerid][pPlate1] = 0;
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File, "Plate1", PlayerInfo[playerid][pPlate1]);
INI_Close(File);
}
else if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate2]) == 0)
{
PlayerInfo[playerid][pPlate2] = 0;
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File, "Plate2", PlayerInfo[playerid][pPlate2]);
INI_Close(File);
}
else if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate3]) == 0)
{
PlayerInfo[playerid][pPlate3] = 0;
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File, "Plate3", PlayerInfo[playerid][pPlate3]);
INI_Close(File);
}
new msg[128];
VehicleCreated[id] = 0;
new money = VehicleValue[id]/2;
GivePlayerMoney(playerid, money);
format(msg, sizeof(msg), "You have sold your vehicle for $%d.", money);
SendClientMessage(playerid, COLOR_WHITE, msg);
RemovePlayerFromVehicle(playerid);
DestroyVehicle(VehicleID[id]);
SaveVehicle(id);
}
case 6:
{
new vehicleid = GetPVarInt(playerid, "DialogValue1");
if(GetPlayerVehicleAccess(playerid, vehicleid) < 2)
{
ShowErrorDialog(playerid, "You are not the owner of this vehicle.");
return 1;
}
GetVehiclePos(VehicleID[vehicleid], VehiclePos[vehicleid][0], VehiclePos[vehicleid][1], VehiclePos[vehicleid][2]);
GetVehicleZAngle(VehicleID[vehicleid], VehiclePos[vehicleid][3]);
VehicleInterior[vehicleid] = GetPlayerInterior(playerid);
VehicleWorld[vehicleid] = GetPlayerVirtualWorld(playerid);
if(GetPlayerMoney(playerid) < 199) return SCM(playerid, COLOR_LIGHTRED, "You don't have enough money. ($700)");
GivePlayerMoney(playerid, -200);
SendClientMessage(playerid, COLOR_WHITE, "You have bought this parking spot for your vehicle.");
UpdateVehicle(vehicleid, 1);
PutPlayerInVehicle(playerid, VehicleID[vehicleid], 0);
SaveVehicle(vehicleid);
}
}
}
return 1;
}