24.03.2013, 22:18
Instead of this
Try this
pawn Код:
if(CarCheck == DSchool[0] || DSchool[1] || CarCheck == DSchool[2] || CarCheck == DSchool[3] || CarCheck == DSchool[4] || CarCheck == DSchool[5]
|| CarCheck == DSchool[6] || CarCheck == DSchool[7])
pawn Код:
stock IsDschoolV(vehicleid)
{
for(new i=0; i<15; idx++)
{
if(vehicleid == DSchool[idx]) return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsDschoolV(vehicleid)
{
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)
{
if(IsDschoolV(vehicleid)
{
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;
}
}

