[HELP] Problem ShowDialog
#1

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:
Код:
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);
		    }
		}
Reply
#2

becoz your string size is still small ? try to increase size a bit more
Reply
#3

Quote:
Originally Posted by JeaSon
Посмотреть сообщение
becoz your string size is still small ? try to increase size a bit more
OMG Forget, Thanks, Bro =)

Edit : I have another Problem, when i click in ID : 1 of faction one LSPD , not show me Dialog , and when i click in other is work norm ,show me Dialog, screen : http://i.imgur.com/djEvmzg.png?1?7195
Reply
#4

Bump!
Reply
#5

Quote:
Originally Posted by KingPersona
Посмотреть сообщение
Bump!
Read the forum rules!
Reply
#6

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Read the forum rules!
oh i forget, and if i broked rules , send me message , don't reply me here , if u want reply ( reply , and with ur help -_- ).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)