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; }
Text3D:GangZoneLabel[MAX_GANG_ZONES];
enum e_GW
{
GW_Name[100],
GW_ID
}
new GW_Name_ID[][e_GW] =
{
{"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][GW_Name], GW_Name_ID[i][GW_ID]);
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;
}
for(new i = 0; i < sizeof(GW_Name_ID); ++i)
{
printf("ID: %i Name: %s", i, GW_Name_ID[i]);
}
new GW_Name[][] =
{
!"Glen Park",
!"Upper Grove",
!"Grove Street",
!"Car Wash",
!"LSPD Headquarters",
!"LS Medical Center",
!"Ferris Wheel",
!"Vinewood",
!"Filmstudios",
!"Fuel Station",
!"Tram STation",
!"Burger Shot LS North",
!"LS Parking Lot",
!"Walk of Fame",
!"LS Mall",
!"LS Beach Canal",
!"The Pig Pen Brothel",
!"Complex of Buildings",
!"Fashion Corner",
!"Lighthouse",
!"Vinewood Barracks",
!"LS North-East Building", //could use a rename
!"Tram Barracks",
!"LS Airport",
!"Mansion",
!"Ammunation LS Canals",
!"Leisure Center",
!"LS Docks Canals",
!"LS Southside Bridge",
!"LS Cluckin' Bell Quarters",
!"LS Docks",
!"LS South-East Beach Quarters",
!"SF Building Lot",
!"Wang Cars",
!"SF Warehouse Area",
!"SF Baseball Quarters",
!"Missionary Hill",
!"Foster Valley",
!"SF Airport",
!"SF Industrial",
!"SF Harborside",
!"SF Ship",
!"Hippie Quarters",
!"SF West Beach Quarters",
!"SF Hotel",
!"SFPD Headquarters",
!"SF Government",
!"SF Medical Center",
!"SF North-West Quarters",
!"China Town",
!"Snake Road",
!"Pier 69",
!"Otto's Autos",
!"SF Skyscrapers",
!"SF North Quarters",
!"Gant Bridge Diner and Museum",
!"Whetstone Small Farm",
!"Whetstone Grand Farm"
};
GetZoneName(zoneid)
{
new str[35];
str = "Unknown";
if(0 <= zoneid < sizeof(GW_Name))
strunpack(str,GW_Name);
return str;
}
public OnGameModeInit()
{
new string[80];
for(new i=0; i < MAX_GANG_ZONES; i++)
{
format(string, sizeof(string), "» GANG ZONE «\nID: %i\nName: %s", i, GetZoneName(i));
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;
}
pawn Код:
|
pawn Код:
|
Wow. strunpack. Never heard of that, you know any tutorials?
Btw, if I use that, how do I get zoneID from zoneName? |