05.04.2015, 15:46
hello , i have problem i added system ( faction : application Online /Offline )
and in last faction ID:15 i can't see full faction name , and application online/offline [ name this faction: News Reporters ]
i tryed many to fix it, nothing =/
Screen: http://i.imgur.com/HCleuam.jpg?1?3158
Code:
and in last faction ID:15 i can't see full faction name , and application online/offline [ name this faction: News Reporters ]
i tryed many to fix it, nothing =/
Screen: http://i.imgur.com/HCleuam.jpg?1?3158
Code:
Код:
CMD:betatestfactions(playerid, params[]) { new members; new stringz2[1024]; for(new xf = 0; xf < MAX_GROUPS; xf++) { if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true)) { new stringy2[256], app; mysql_format(handle, stringy2, 256, "SELECT * FROM `playeraccounts` WHERE `playerGroup` = '%d'", xf); new Cache: resultx = mysql_query (handle, stringy2); members = cache_get_row_count(); cache_delete(resultx); mysql_format(handle, stringy2, 256, "SELECT * FROM `groups` WHERE `groupID` = '%d'", xf); new Cache: resultd = mysql_query(handle, stringy2); if(cache_get_row_count() != 0) { cache_get_field_content(0, "groupAplication", result); app = strval(result); } cache_delete(resultd); if(app == 1) { format(stringz2, sizeof(stringz2),"%sID: %d - %s [%d/%d] {00FF00}[applications online]{FFFFFF}\n", stringz2,xf, groupVariables[xf][gGroupName], members, groupVariables[xf][gSlots]); } else if(app == 0) { format(stringz2, sizeof(stringz2),"%sID: %d - %s [%d/%d] {FF0000}[applications offline]{FFFFFF}\n", stringz2,xf, groupVariables[xf][gGroupName], members, groupVariables[xf][gSlots]); } } ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_LIST,"Server: Factions", stringz2, "Select", "Cancel"); SelFaction[playerid] = 0; } return 1; }
Код:
case DIALOG_FACTIONS: { if(!response) { hidePlayerDialog(playerid); } else { if(listitem == 0) { hidePlayerDialog(playerid); } else if(listitem != 0) { new f = listitem+1; SelFaction[playerid] = f; /*new szDialogs[512];*/ new lead[MAX_PLAYER_NAME]; format(lead, MAX_PLAYER_NAME, "None"); new query[256]; format(query, 256, "SELECT * FROM `playeraccounts` WHERE `playerGroup` = '%d' AND `playerGroupRank` = '7'", f); new Cache: masta = mysql_query(handle, query); if(cache_get_row_count() >= 1) { cache_get_field_content(0, "playerName", result); format(lead, MAX_PLAYER_NAME, result); } cache_delete(masta); format(query, 256, "SELECT * FROM `playeraccounts` WHERE `playerGroup` = '%d'", f); new Cache: mastau = mysql_query(handle, query); new membs = cache_get_row_count(); cache_delete(mastau); mysql_format(handle, query, 256, "SELECT * FROM groups WHERE groupID = '%d'", f); new Cache: val = mysql_query(handle, query); SelFaction[playerid] = listitem; new szDialogText[256]; new apply; new apply2[64]; if(cache_get_row_count() >= 1) { cache_get_field_content(0, "groupAplication", result); apply = strval(result); } cache_delete(val); if(apply == 1) { format(apply2, 64, "Online"); } else { format(apply2, 64, "Offline"); } new onmembers; foreach(Player, i) { if(playerVariables[i][pGroup] == f) { onmembers++; } } if(strlen(lead) >= 1 && strcmp(lead, "None", true)) { new id = GetPlayerID(lead); if(id != INVALID_PLAYER_ID) { format(szDialogText, 512, "Faction info:\n\nFaction name: %s\nLeader: %s(online)\nMembers: %d/%d\nOnline members: %d\nApplications: %s", groupVariables[f][gGroupName], lead, membs, groupVariables[f][gSlots], onmembers, apply2); } else { format(szDialogText, 512, "Faction info:\n\nFaction name: %s\nLeader: %s(offline)\nMembers: %d/%d\nOnline members: %d\nApplications: %s", groupVariables[f][gGroupName], lead, membs, groupVariables[f][gSlots], onmembers, apply2); } } else { format(szDialogText, 512, "Faction info:\n\nFaction name: %s\nLeader: None\nMembers: %d/%d\nOnline members: %d", groupVariables[f][gGroupName], membs, groupVariables[f][gSlots], onmembers, apply2); } ShowPlayerDialog(playerid, 5600, DIALOG_STYLE_MSGBOX,"Group Info", szDialogText,"Find HQ", "Cancel"); } } } case 5600: { if(response) { new string[256]; SetPlayerCheckpoint(playerid, groupVariables[SelFaction[playerid]][gGroupExteriorPos][0],groupVariables[SelFaction[playerid]][gGroupExteriorPos][1],groupVariables[SelFaction[playerid]][gGroupExteriorPos][2], 5.0); format(string, 256,"A checkpoint has been set on %s HQ.",groupVariables[SelFaction[playerid]][gGroupName]); SCM(playerid,COLOR_WHITE,string); } }