27.07.2015, 15:33
PHP код:
.pwn(573) : warning 219: local variable "b" shadows a variable at a preceding level
pwn(586) : warning 219: local variable "b" shadows a variable at a preceding level
.pwn(621) : warning 219: local variable "b" shadows a variable at a preceding level
PHP код:
stock iswheelmodel(modelid) {
new wheelmodels[17] = {1025,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1096,1097,1098};
for(new I = 0, b = sizeof(wheelmodels); I != b; ++I) {
if (modelid == wheelmodels[I])
return true;
}
return false;
}
stock IllegalCarNitroIde(carmodel) {
new illegalvehs[29] = { 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509, 481, 510, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 590, 569, 537, 538, 570, 449 };
for(new I = 0, b = sizeof(illegalvehs); I != b; ++I) {
if (carmodel == illegalvehs[I])
return true;
}
return false;
}
// assumes player is in a car - make sure it is.
stock illegal_nos_vehicle(PlayerID) {
new carid = GetPlayerVehicleID(PlayerID);
new playercarmodel = GetVehicleModel(carid);
return IllegalCarNitroIde(playercarmodel);
}
stock islegalcarmod(vehicleide, componentid) {
new modok = false;
// stereo, hydraulics & nos (1x 2x 3x) are special.
if ( (iswheelmodel(componentid)) || (componentid == 1086) || (componentid == 1087) || ((componentid >= 1008) && (componentid <= 1010))) {
new nosblocker = IllegalCarNitroIde(vehicleide);
if (!nosblocker)
modok = true;
} else {
// check if the specified model CAN use this particular mod.
for(new I = 0, b = sizeof(legalmods); I != b; ++I) {
if (legalmods[I][0] == vehicleide) { // first is car IDE
for(new J = 1; J < 22; J++) { // start with 1
if (legalmods[I][J] == componentid)
modok = true;
}
}
}
}
return modok;
}
Код:
for(new I = 0, b = sizeof(wheelmodels); I != b; ++I) {
for(new I = 0, b = sizeof(illegalvehs); I != b; ++I) {
for(new I = 0, b = sizeof(legalmods); I != b; ++I) {

