01.02.2012, 10:27
(
Последний раз редактировалось nuriel8833; 01.02.2012 в 12:10.
)
You don't have a 'result' for the 'if' statement:
More simple:
pawn Код:
stock PoliceVehicle(playerid)
{
new carid = GetPlayerVehicleID(playerid);
if(carid == copcar[0] || carid == copcar[1] || carid == copcar[2] || carid == copcar[3] || carid == copcar[4] || carid == copcar[5] || carid == copcar[6] || carid == copcar[7] || carid == copcar[8]) return carid;
if(carid == copcar[9] || carid == copcar[10] || carid == copcar[11] || carid == copcar[12] || carid == copcar[13] || carid == copcar[14] || carid == copcar[15] || carid == copcar[16] || carid == copcar[17]) return carid;
if(carid == copcar[18] || carid == copcar[19] || carid == copcar[20] || carid == copcar[21] || carid == copcar[22] || carid == copcar[23] || carid == copcar[24] || carid == copcar[25] || carid == copcar[26]) return carid;
if(carid == copcar[27] || carid == copcar[28] || carid == copcar[29] || carid == copcar[30] || carid == copcar[31] || carid == copcar[32] || carid == copcar[33] || carid == copcar[34] || carid == copcar[35]) return carid;
if(carid == copcar[36] || carid == copcar[37] || carid == copcar[38] || carid == copcar[39] || carid == copcar[40] || carid == copcar[41] || carid == copcar[42] || carid == copcar[43] || carid == copcar [44]) return carid;
if(carid == copcar[45] || carid == copcar[46] || carid == copcar[47] || carid == copcar[48] || carid == copcar[49] || carid == copcar[50] || carid == copcar[51] || carid == copcar[52]) return carid;
}
pawn Код:
stock PoliceVehicle(playerid)
{
new carid = GetPlayerVehicleID(playerid);
if(carid == copcar[0] || carid == copcar[1] || carid == copcar[2] || carid == copcar[3] || carid == copcar[4] || carid == copcar[5] || carid == copcar[6] || carid == copcar[7] || carid == copcar[8] || carid == copcar[9] || carid == copcar[10] || carid == copcar[11] || carid == copcar[12] || carid == copcar[13] || carid == copcar[14] || carid == copcar[15] || carid == copcar[16] || carid == copcar[17] || carid == copcar[18] || carid == copcar[19] || carid == copcar[20] || carid == copcar[21] || carid == copcar[22] || carid == copcar[23] || carid == copcar[24] || carid == copcar[25] || carid == copcar[26] || carid == copcar[27] || carid == copcar[28] || carid == copcar[29] || carid == copcar[30] || carid == copcar[31] || carid == copcar[32] || carid == copcar[33] || carid == copcar[34] || carid == copcar[35]) || carid == copcar[36] || carid == copcar[37] || carid == copcar[38] || carid == copcar[39] || carid == copcar[40] || carid == copcar[41] || carid == copcar[42] || carid == copcar[43] || carid == copcar [44])||carid == copcar[45] || carid == copcar[46] || carid == copcar[47] || carid == copcar[48] || carid == copcar[49] || carid == copcar[50] || carid == copcar[51] || carid == copcar[52]) return carid;
}