Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public LoadFactions()
- {
- new result[100],label[128],index = 0;
- mysql_query(SQL,"SELECT * FROM `factions` ORDER BY `factions`.`ID` ASC");
- mysql_store_result();
- while(mysql_retrieve_row())
- {
- index++;
- serverfactions++;
- new i = index;
- mysql_get_field("ID", result); DynamicFactions[i][fID] = strval(result);
- mysql_get_field("Name", result); strmid(DynamicFactions[i][fName], result, 0, 100, 100);
- mysql_get_field("IntX", result); DynamicFactions[i][fcX] = floatstr(result);
- mysql_get_field("IntY", result); DynamicFactions[i][fcY] = floatstr(result);
- mysql_get_field("IntZ", result); DynamicFactions[i][fcZ] = floatstr(result);
- mysql_get_field("X", result); DynamicFactions[i][extX] = floatstr(result);
- mysql_get_field("Y", result); DynamicFactions[i][extY] = floatstr(result);
- mysql_get_field("Z", result); DynamicFactions[i][extZ] = floatstr(result);
- mysql_get_field("VW", result); DynamicFactions[i][fVW] = strval(result);
- mysql_get_field("Interior", result); DynamicFactions[i][fInterior] = strval(result);
- mysql_get_field("Mats", result); DynamicFactions[i][fMats] = strval(result);
- mysql_get_field("Drugs", result); DynamicFactions[i][fDrugs] = strval(result);
- mysql_get_field("Bank", result); DynamicFactions[i][fBank] = strval(result);
- mysql_get_field("Anunt", result); strmid(DynamicFactions[i][fAnn], result, 0, 100, 100);
- mysql_get_field("Name1", result); strmid(fRankNames[i][0], result, 0, 100, 100);
- mysql_get_field("Name2", result); strmid(fRankNames[i][1], result, 0, 100, 100);
- mysql_get_field("Name3", result); strmid(fRankNames[i][2], result, 0, 100, 100);
- mysql_get_field("Name4", result); strmid(fRankNames[i][3], result, 0, 100, 100);
- mysql_get_field("Name5", result); strmid(fRankNames[i][4], result, 0, 100, 100);
- mysql_get_field("Name6", result); strmid(fRankNames[i][5], result, 0, 100, 100);
- mysql_get_field("Name7", result); strmid(fRankNames[i][6], result, 0, 100, 100);
- mysql_get_field("App", result); DynamicFactions[i][fApp] = strval(result);
- mysql_get_field("Type", result); DynamicFactions[i][fType] = strval(result);
- new x = i;
- cache_get_field_content(i, "Rank1", result); FactionInfo[x][fRank1] = strval(result);
- cache_get_field_content(i, "Rank2", result); FactionInfo[x][fRank2] = strval(result);
- cache_get_field_content(i, "Rank3", result); FactionInfo[x][fRank3] = strval(result);
- cache_get_field_content(i, "Rank4", result); FactionInfo[x][fRank4] = strval(result);
- cache_get_field_content(i, "Rank5", result); FactionInfo[x][fRank5] = strval(result);
- cache_get_field_content(i, "Rank6", result); FactionInfo[x][fRank6] = strval(result);
- if(x != 7) {
- format(label, sizeof(label), "%s HQ\nApasa pe Enter pentru a intra", DynamicFactions[i][fName]);
- Create3DTextLabel(label,0xFFFFFF99,DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],20.0, 0, 1);
- CreatePickup(1239, 23, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ]);
- }
- }
- mysql_free_result();
- printf("[MySQL Factions]: %d", serverfactions);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement