22.03.2013, 11:24
Hey guys Im having trouble adding pd cars and heres all the codes can you help
and error message also.
Car 26 is broken one :L

Quote:
C:\Users\Tristan\Desktop\OrcGaming V1.3\gamemodes\ZRP.pwn(19594) : error 032: array index out of bounds (variable "FacInfo") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
Quote:
// Police Vehicles FacInfo[1][fCars][0] = CreateVehicle(596,1601.9502,-1683.9442,5.5580,90.0662,0,1,1200); // Crusier1 FacInfo[1][fCars][1] = CreateVehicle(596,1601.9349,-1688.1353,5.5585,89.8182,0,1,1200); // Crusier2 FacInfo[1][fCars][2] = CreateVehicle(596,1602.0319,-1691.9169,5.5580,90.1704,0,1,1200); // Crusier3 FacInfo[1][fCars][3] = CreateVehicle(596,1602.1292,-1695.9916,5.5580,88.9515,0,1,1200); // Crusier4 FacInfo[1][fCars][4] = CreateVehicle(596,1602.1547,-1700.2701,5.5580,89.4748,0,1,1200); // Crusier5 FacInfo[1][fCars][5] = CreateVehicle(596,1602.0511,-1704.3525,5.5580,88.4754,0,1,1200); // Crusier6 FacInfo[1][fCars][6] = CreateVehicle(598,1585.2120,-1667.6892,6.1291,270.2057,0,1,1200); // SuperVisor Car 1 FacInfo[1][fCars][7] = CreateVehicle(598,1585.1547,-1671.9965,6.1323,271.1247,0,1,1200); // SuperVisor Car 2 FacInfo[1][fCars][8] = CreateVehicle(523,1530.0715,-1688.0465,5.4559,267.5331,1,0,1200); // Bike1 FacInfo[1][fCars][9] = CreateVehicle(523,1526.7520,-1688.0627,5.4582,268.2188,1,0,1200); // Bike2 FacInfo[1][fCars][10] = CreateVehicle(523,1529.9504,-1683.8184,5.4578,271.5452,1,0,1200); // Bike3 FacInfo[1][fCars][11] = CreateVehicle(523,1526.6595,-1683.8164,5.4625,271.1716,1,0,1200); // Bike4 FacInfo[1][fCars][12] = CreateVehicle(411,1545.3519,-1680.2714,5.6263,88.9375,0,1,1200); // Speed1Infernus FacInfo[1][fCars][13] = CreateVehicle(411,1545.3575,-1676.2065,5.6263,90.4601,0,1,1200); // Speed2Infernus FacInfo[1][fCars][14] = CreateVehicle(541,1545.1260,-1672.0992,5.5249,90.8087,0,1,1200); // Speed3Bullet FacInfo[1][fCars][15] = CreateVehicle(541,1545.1002,-1667.9021,5.5249,90.8901,0,1,1200); // Speed4Bullet FacInfo[1][fCars][16] = CreateVehicle(601,1545.0055,-1662.9552,5.6769,88.8576,0,0,1200); // Splashy1 FacInfo[1][fCars][17] = CreateVehicle(601,1544.9072,-1658.9329,5.6780,88.7145,0,0,1200); // Splashy2 FacInfo[1][fCars][18] = CreateVehicle(601,1545.0282,-1655.0873,5.6767,89.4033,0,0,1200); // Splashy3 FacInfo[1][fCars][19] = CreateVehicle(601,1545.0804,-1651.2063,5.6920,90.5362,0,0,1200); // Splashy4 FacInfo[1][fCars][20] = CreateVehicle(427,1538.9954,-1644.9917,6.0463,180.4178,0,1,1200); // Enforcer1 FacInfo[1][fCars][21] = CreateVehicle(427,1534.8733,-1644.9760,6.0481,179.3436,0,1,1200); // Enforcer2 FacInfo[1][fCars][22] = CreateVehicle(427,1531.0992,-1645.0317,6.0463,179.9259,0,1,1200); // Enforcer3 FacInfo[1][fCars][23] = CreateVehicle(427,1526.8904,-1645.1100,6.0463,180.7001,0,1,1200); // Enforcer4 FacInfo[1][fCars][24] = CreateVehicle(497,1550.4070,-1707.7499,28.6315,90.2970,0,1,1200); // MAV 1 FacInfo[1][fCars][25] = CreateVehicle(497,1550.4070,-1644.1296,28.6315,90.2970,0,1,1200); // MAV 2 FacInfo[1][fCars][26] = CreateVehicle(497,1550.4070,-1644.1296,28.6315,90.2970,0,1,1200); // SFPD Car for(new i=16; i < 27; i++) // Splashy & Enforcer can't be blown up { SetVehicleHealth(FacInfo[1][fCars][i], 9999999); } |
Quote:
stock IsLeoVehicle(vehicleid) { for(new i=0; i<27; i++) { if(vehicleid == FacInfo[1][fCars][i]) return 1; } return 0; } |
Quote:
stock IsCruiser(vehicleid) { for(new i=0; i<10; i++) { if(vehicleid == FacInfo[1][fCars][i]) return 1; } return 0; } |