07.10.2009, 17:37
Hi guys, i need some help here (the title may not make sense so please excuse me lol).
Anyways, in lay man's terms I have created an array:
And I have made this function which is called under OnGameModeInit:
What is "supposed" to happen is basically, the variable
should be set (which is fine). But then, I need some of the arrays to be set to this:
Where I say: "DisabledCarID_GOES_HERE" I am talking about the values given in the DisabledCars[] array list. But I cannot do so. So the end result should be like this:
Please can someone help me, as I am stressing out trying to figure out how to do this. I hope u get what I mean, if not, i'll explain further - it's pretty simple what I am trying to achieve.
Thanks.
Anyways, in lay man's terms I have created an array:
pawn Код:
new DisabledCars[] = {407, 416, 425, 427, 432, 441, 447, 449, 464, 465, 476, 479, 501, 520, 537, 538, 552, 564, 569, 570, 577, 590, 591, 592, 594, 601, 606, 608, 610};
pawn Код:
LoadDefaultDisabledVehicles()
{
for(new i = 400; i < MAX_SPAWNABLE_VEHICLES+400; i++)
{
CarInfo[i-400][allow] = true;
}
for (new x = 0; x < sizeof(DisabledCars); x++) // This bit is where I am stuck - It is obviously wrong and I tested it.
{
CarInfo[x][allow] = false;
}
printf("Disabled Vehicles Loaded!");
}
pawn Код:
CarInfo[DisabledCarID_GOES_HERE][allow] = true;
pawn Код:
CarInfo[DisabledCarID_GOES_HERE][allow] = false;
pawn Код:
CarInfo[407][allow] = false;
CarInfo[416][allow] = false;
CarInfo[425][allow] = false;
CarInfo[427][allow] = false;
CarInfo[432][allow] = false;
/// etc etc (from my DisabledCars[] list).
Please can someone help me, as I am stressing out trying to figure out how to do this. I hope u get what I mean, if not, i'll explain further - it's pretty simple what I am trying to achieve.
Thanks.