Check to see if something is in an array
#8

pawn Code:
bool:IncorrectModel(modelid)
{

    for(new i=0; i != sizeof(RandomRegularVehicle); i++)
        if(RandomRegularVehicle[i][0] == modelid)
            return true;

    return false;
}

if(!IncorrectModel(CarInfo[idx][cModel])) return SendClientMessage(playerid, COLOR_RED, "You cannot sell this type of vehicle here");
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)