Bug (Urgent help) [pre-release]
#1

It's showing message whenever you enter ANY vehicle, and it should only display the dialog when you enter [0] - [7] car...

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	new CarCheck = GetPlayerVehicleID(playerid);
	if(CarCheck == DSchool[0] || DSchool[1] || CarCheck == DSchool[2] || CarCheck == DSchool[3] || CarCheck == DSchool[4] || CarCheck == DSchool[5]
	|| CarCheck == DSchool[6] || CarCheck == DSchool[7])
	{
		if(PlayerInfo[playerid][pDriversLic] == 0)
		{
		    ShowPlayerDialog(playerid, DRIVERS_TEST, DIALOG_STYLE_MSGBOX, "Notice", "Would you like to take drivers test?\nIt will cost you 50$", "Yes", "No");
		    return 1;
		}
		else
		{
		    return 1;
		}
	}
	else
	{
	    return 1;
	}
}


public OnPlayerExitVehicle(playerid, vehicleid)
{
    new CarCheck = GetPlayerVehicleID(playerid);
	if(CarCheck == DSchool[0] || DSchool[1] || CarCheck == DSchool[2] || CarCheck == DSchool[3] || CarCheck == DSchool[4] || CarCheck == DSchool[5] || CarCheck == DSchool[6] || CarCheck == DSchool[7])
	{
		if(DriversTest[playerid] == 1)
		{
			DisablePlayerCheckpoint(playerid);
			SendClientMessage(playerid, COLOR_RED, "<!>You have left your vehicle and failed drivers test!");
            DriversTest[playerid] = 0;
			return 1;
		}
	}
	return 1;
}
It should work like if you enter vehicle from Dschool[0] to Dschool[7] it will display the dialog. But currently it's showing the dialog if you enter ANY vehicle.
Reply


Messages In This Thread
Bug (Urgent help) [pre-release] - by Squirrel - 24.03.2013, 21:37
Re: Bug (Urgent help) [pre-release] - by Joshman543 - 24.03.2013, 22:09
Re: Bug (Urgent help) [pre-release] - by Squirrel - 24.03.2013, 22:11
Re: Bug (Urgent help) [pre-release] - by FunnyBear - 24.03.2013, 22:13
Re: Bug (Urgent help) [pre-release] - by Squirrel - 24.03.2013, 22:18
Re: Bug (Urgent help) [pre-release] - by Joshman543 - 24.03.2013, 22:18
Re: Bug (Urgent help) [pre-release] - by FunnyBear - 24.03.2013, 22:21
Re: Bug (Urgent help) [pre-release] - by Squirrel - 24.03.2013, 22:23
Re: Bug (Urgent help) [pre-release] - by Joshman543 - 24.03.2013, 22:26
Re: Bug (Urgent help) [pre-release] - by Patrick - 24.03.2013, 22:27

Forum Jump:


Users browsing this thread: 1 Guest(s)