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

Instead of 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])
Try this

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;
}
}
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)