Gangcar problem
#1

Hey guys, I need your help. Ive tried all sorts of ways to do it but for some reason it aint working

OnGameModeInit
Код:
	GangCar[Lspd][0] = AddStaticVehicleEx(497, 1565.0085, -1611.8307, 13.3828, 177.9847, -1, -1, 1000);
	GangCar[Lspd][1] = AddStaticVehicleEx(596, 1585.1501, -1671.7352, 5.8925, 272.6540, -1, -1, 1000);
	GangCar[Lspd][2] = AddStaticVehicleEx(596, 1601.8936, -1683.8369, 5.8906, 90.8981, -1, -1, 1000);
	GangCar[Lspd][3] = AddStaticVehicleEx(596, 1601.8936, -1688.0620, 5.8906, 89.2896, -1, -1, 1000);
	GangCar[Lspd][4] = AddStaticVehicleEx(596, 1601.8936, -1692.0616, 5.8906, 89.2896, -1, -1, 1000);
	GangCar[Lspd][5] = AddStaticVehicleEx(596, 1578.6306, -1710.2502, 5.8906, 1.2839, -1, -1, 1000);
	GangCar[Lspd][6] = AddStaticVehicleEx(596, 1570.3689, -1710.7992, 5.8906, 0.1350, -1, -1, 1000);
	GangCar[Lspd][7] = AddStaticVehicleEx(596, 1529.5261, -1684.0631, 5.8906, 90.4385, -1, -1, 1000);
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new CarCheck = GetPlayerVehicleID(playerid);
        if(CarCheck == GangCar[GroveStreet] )
        {
            if(gTeam[playerid] != TEAM_GROVE)
            {
                RemovePlayerFromVehicle(playerid);
                SCM(playerid, yellow, "**You need to be part of the Grove Street Families to drive this vehicle.");
                return 1;
            }
        }
		if(newstate == PLAYER_STATE_DRIVER)
		{
        if(CarCheck == GangCar[Balla])
        {
            if(gTeam[playerid] != TEAM_BALLA)
            {
                RemovePlayerFromVehicle(playerid);
                SCM(playerid, yellow, "**You need to be part of the Glenpark Balla's to drive this vehicle.");
                return 1;
            }
        }
	}
        if(newstate == PLAYER_STATE_DRIVER)
		{
        if(CarCheck == GangCar[Lspd][0 < 8] && gTeam[playerid] != TEAM_COP)
        {
            RemovePlayerFromVehicle(playerid);
            SCM(playerid, yellow, "**You need to be part of the Los Santo's Police Department to drive this vehicle.");
            return 1;
		}
	}
        return 1;
}

    return 1;
}
Focus on the if(CarCheck == GangCar[Lspd][0 < 8] && gTeam[playerid] != TEAM_COP)
part. For some reason, It only makes number 7 a gang car, And before you say remove the [Number] or the [0 < 8] next to the GangCar, I have allready tried this and it didnt work. I really need some help on making more than one gang car.
Reply
#2

Please somebody?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)