13.09.2017, 12:25
I could use a hand,
Thanks in advance.
tag mismatches:
Thanks in advance.
PHP код:
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);
}
PHP код:
if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate1]) == 0)
else if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate2]) == 0)
else if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate3]) == 0)