[Pomoc]Vozila za bandu

Započeo ‹Fox›, Januar 03, 2011, 11:34:33 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Napravio sam da ako nisi u jednoj mafiji da nemozes voziti njihova vozila, ali neznam zasto to vrijedi samo za jedno njihovo vozilo.U sva vozila mogu uci osim NRG-a.Kad udjem u nrg izbaci me i kaze da nisam u toj mafiji...Kak da napravim da su sva vozila od te mafije zakljucana za one koji nisu u toj mafiji?
Evo kodova:
enum TeamCars
{
mafia1,
mafia2,
mafia3
}
new Cars[TeamCars];



public OnGamemodeInit()
{
Cars[mafia1] = AddStaticVehicleEx(560,-2218.41992188,306.41085815,34.92216110,180.00000000,81,81,15); //Sultan
Cars[mafia1] = AddStaticVehicleEx(560,-2223.52075195,306.28961182,34.92216110,180.00000000,81,81,15); //Sultan
Cars[mafia1] = AddStaticVehicleEx(506,-2227.47924805,305.13558960,34.90930176,180.00000000,-1,-1,15); //Super GT
Cars[mafia1] = AddStaticVehicleEx(451,-2235.22314453,293.53350830,34.88156128,0.00000000,-1,-1,15); //Turismo
Cars[mafia1] = AddStaticVehicleEx(411,-2227.25488281,293.81549072,34.91718674,0.00000000,-1,-1,15); //Infernus
Cars[mafia1] = AddStaticVehicleEx(487,-2178.56274414,300.09002686,35.38218689,90.00000000,-1,-1,15); //Maverick
Cars[mafia1] = AddStaticVehicleEx(432,-2235.10278320,300.49548340,35.21652603,270.00000000,-1,-1,15); //Rhino
Cars[mafia1] = AddStaticVehicleEx(468,-2189.26098633,305.87988281,34.88302612,180.00000000,-1,-1,15); //Sanchez
Cars[mafia1] = AddStaticVehicleEx(468,-2191.24169922,305.97412109,34.88302612,180.00000000,-1,-1,15); //Sanchez
Cars[mafia1] = AddStaticVehicleEx(522,-2193.63696289,305.99722290,34.78340530,180.00000000,-1,-1,15); //NRG-500
return 1;
}


public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate = 2)
{
        new CarCheck = GetPlayerVehicleID(playerid);
        if(CarCheck == Cars[mafia1] )
        {
            if(mafia[playerid] != 1)
            {
            if(mafialeader[playerid] != 1)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "Niste clan Ballasa pa nemozete voziti ovo vozilo!");
                return 1;
            }
            }
        }
        if(CarCheck == Cars[mafia2] )
        {
            if(mafia[playerid] != 2)
            {
             if(mafialeader[playerid] != 2)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "Niste clan terrora pa nemozete voziti ovo vozilo!");
                return 1;
                }
                return 1;
            }
        }
        if(CarCheck == Cars[mafia3] )
        {
            if(mafia[playerid] != 3)
            {
             if(mafialeader[playerid] != 3)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "Niste clan Balkan Mafie pa nemozete voziti ovo vozilo!");
                return 1;
                }
                return 1;
            }
        }
        }
return 1;
}

Snich