22.01.2011, 17:30
Hello,
I am creating a code to spawn a vehicle if you logon.
But there's a problem which I never had before with the same script.
If I use this loop, the code after this loop won't do anything anymore.
This is the code I am using to load the vehicle:
The continue; was my second option, which didn't work.
I also removed a brace, it worked. But then the vehicle will not spawn.
I am creating a code to spawn a vehicle if you logon.
But there's a problem which I never had before with the same script.
If I use this loop, the code after this loop won't do anything anymore.
This is the code I am using to load the vehicle:
pawn Код:
for(new i; i < MAX_VEHICLES + 1; i++)
{
if(strmatch(Owner, Name))
{
COwnerData[i][CarID] = CreateVehicle(COwnerData[i][ModelID], COwnerData[i][carX], COwnerData[i][carY], COwnerData[i][carZ], COwnerData[i][carRot], COwnerData[i][pC1], COwnerData[i][sC2], 30*10000);
continue;
}
}
I also removed a brace, it worked. But then the vehicle will not spawn.