04.07.2014, 14:42
Код:
Text3D:GangZoneLabel[MAX_GANG_ZONES]; new GW_Name_ID[][] = { {"Glen Park", 0}, {"Upper Grove", 1}, {"Grove Street", 2}, {"Car Wash", 3}, {"LSPD Headquarters", 4}, {"LS Medical Center", 5}, {"Ferris Wheel", 6}, {"Vinewood", 7}, {"Filmstudios", 8}, {"Fuel Station", 9}, {"Tram STation", 10}, {"Burger Shot LS North", 11}, {"LS Parking Lot", 12}, {"Walk of Fame", 13}, {"LS Mall", 14}, {"LS Beach Canal", 15}, {"The Pig Pen Brothel", 16}, {"Complex of Buildings", 17}, {"Fashion Corner", 18}, {"Lighthouse", 19}, {"Vinewood Barracks", 20}, {"LS North-East Building", 21}, //could use a rename {"Tram Barracks", 22}, {"LS Airport", 23}, {"Mansion", 24}, {"Ammunation LS Canals", 25}, {"Leisure Center", 26}, {"LS Docks Canals", 27}, {"LS Southside Bridge", 28}, {"LS Cluckin' Bell Quarters", 29}, {"LS Docks", 30}, {"LS South-East Beach Quarters", 31}, {"SF Building Lot", 32}, {"Wang Cars", 33}, {"SF Warehouse Area", 34}, {"SF Baseball Quarters", 35}, {"Missionary Hill", 36}, {"Foster Valley", 37}, {"SF Airport", 38}, {"SF Industrial", 39}, {"SF Harborside", 40}, {"SF Ship", 41}, {"Hippie Quarters", 42}, {"SF West Beach Quarters", 43}, {"SF Hotel", 44}, {"SFPD Headquarters", 45}, {"SF Government", 46}, {"SF Medical Center", 47}, {"SF North-West Quarters", 48}, {"China Town", 49}, {"Snake Road", 50}, {"Pier 69", 51}, {"Otto's Autos", 52}, {"SF Skyscrapers", 53}, {"SF North Quarters", 54}, {"Gant Bridge Diner and Museum", 55}, {"Whetstone Small Farm", 56}, {"Whetstone Grand Farm", 57} }; public OnGameModeInit() { new string[80]; for(new i=0; i < MAX_GANG_ZONES; i++) { format(string, sizeof(string), "» GANG ZONE «\nID: %i\nName: %s", GW_Name_ID[i][1], GW_Name_ID[i][0]); GangZoneLabel[i] = CreateDynamic3DTextLabel(string, C_WHITE, GW_CaptureCPs[i][0], GW_CaptureCPs[i][1], GW_CaptureCPs[i][2], 100.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, -1, -1, 100.0); GangZone[i] = GangZoneCreate(GW_ZoneCoordinates[i][0], GW_ZoneCoordinates[i][1], GW_ZoneCoordinates[i][2], GW_ZoneCoordinates[i][3]); } return 1; }
I'm trying to create dynamic 3DTextLabels, and I want them to show the zone's name and ID. The name works fine, but it just won't show the correct ID. Zone1, for instance, should be ID 0, but it shows me the ID 114. I'm guessing, it has something to do with the arrys for I can absolutely not find any mistake inside of the loop...
I appreciate your help!