Something must be wrong in this code, but don't know what!
#2

Not gonna work. Basically, what you're doing now is:

pawn Код:
var[0] = 1;
var[0] = 2;
var[0] = 3;
var[0] = 4;
var[0] = 5;
Guess what the value of var[0] (which equals Cars[Soa]) will always be.
You will need a two dimensional array and a loop.

pawn Код:
new Cars[TeamCars][5];

Cars[Soa][0] = CreateVehicle();
Cars[Soa][1] = CreateVehicle();
Cars[Soa][2] = CreateVehicle();
// Etc..

// -----

CarCheck = GetPlayerVehicleID();

for(new i; i < 5; i++)
{
    if(CarCheck == Cars[Soa][i] && gTeam[playerid] != 1)
    {
        RemovePlayerFromVehicle()
        break;
    }
    // Etc...
}
Reply


Messages In This Thread
Something must be wrong in this code, but don't know what! - by fysssical - 23.11.2010, 10:36
Re: Something must be wrong in this code, but don't know what! - by Vince - 23.11.2010, 12:09

Forum Jump:


Users browsing this thread: 1 Guest(s)