18.06.2017, 16:52
Quote:
Nothing in this code creates the pickup, so the next thing to look at EditFaction if that updates the location of the pickup/3dtext/etc.
|
HTML Code:
gQuery[0] = (EOS); mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `factions`"); mysql_tquery(handle, gQuery, "LoadFactions", "");
HTML Code:
function LoadFactions() { factionss = cache_num_rows(); new string[64], tmp[128], id; for(new i = 0; i < factionss; i++) { cache_get_field_content(i, "ID", tmp); id = strval(tmp); cache_get_field_content(i, "ID", tmp); FactionInfo[id][fID] = strval(tmp); cache_get_field_content(i, "Name", tmp); strmid(FactionInfo[id][fName], tmp, false, strlen(tmp), 32); cache_get_field_content(i, "SpawnX", tmp); FactionInfo[id][fSpawnX] = strval(tmp); cache_get_field_content(i, "SpawnY", tmp); FactionInfo[id][fSpawnY] = strval(tmp); cache_get_field_content(i, "SpawnZ", tmp); FactionInfo[id][fSpawnZ] = strval(tmp); cache_get_field_content(i, "ExitX", tmp); FactionInfo[id][fExitX] = strval(tmp); cache_get_field_content(i, "ExitY", tmp); FactionInfo[id][fExitY] = strval(tmp); cache_get_field_content(i, "ExitZ", tmp); FactionInfo[id][fExitZ] = strval(tmp); cache_get_field_content(i, "Interior", tmp); FactionInfo[id][fInterior] = strval(tmp); cache_get_field_content(i, "VirtualW", tmp); FactionInfo[id][fVirtualW] = strval(tmp); cache_get_field_content(i, "MinLevel", tmp); FactionInfo[id][fMinLevel] = strval(tmp); cache_get_field_content(i, "Slots", tmp); FactionInfo[id][fSlots] = strval(tmp); cache_get_field_content(i, "Application", tmp); FactionInfo[id][fApplication] = strval(tmp); cache_get_field_content(i, "News", tmp); strmid(FactionInfo[id][fNews], tmp, false, strlen(tmp), 128); FactionInfo[id][fPickupIDIesire] = CreateDynamicPickup(19132, 1, FactionInfo[id][fSpawnX], FactionInfo[id][fSpawnY], FactionInfo[id][fSpawnZ], -1, -1, -1, 30.0); FactionInfo[id][fPickupIDIntrare] = CreateDynamicPickup(19132, 1, FactionInfo[id][fExitX], FactionInfo[id][fExitY], FactionInfo[id][fExitZ], -1, -1, -1, 30.0); format(string, sizeof(string), "%s\nIesire", FactionInfo[id][fName]); FactionInfo[id][fLabelIDIesire] = CreateDynamic3DTextLabel(string, COLOR_WHITE, FactionInfo[id][fSpawnX], FactionInfo[id][fSpawnY], FactionInfo[id][fSpawnZ], 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 30.0); format(string, sizeof(string), "%s\nIntrare", FactionInfo[id][fName]); FactionInfo[id][fLabelIDIntrare] = CreateDynamic3DTextLabel(string, COLOR_WHITE, FactionInfo[id][fExitX], FactionInfo[id][fExitY], FactionInfo[id][fExitZ], 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 30.0); } printf("S-au incarcat %d factiuni.", factionss); return 1; }