30.05.2013, 10:26
I've coded this for the org memberlist in the edit of jakkus dynamic orgs.
This works at all no errors.
but the dialog doesnt comes on the screen.
and i think it is wrong coding, the last case 4:
can you correct it into the rightone i tried alot
pawn Код:
if(dialogid == 9990 && response)
{
switch(listitem)
{
case 0:
{
for (new i=1;i<OrgsCount+1;i++)
{
new string[140];
format(string,sizeof(string),"{5CB3FF}Organization: {FFFFFF}%s\n{5CB3FF}Leader: {FFFFFF}%s", GetOrgName(i), Organization[i][Leader]);
ShowPlayerDialog(playerid, 757, DIALOG_STYLE_MSGBOX, "Organization",string,"Close","");
}
}
case 1:
{
GiveOrgFeatures(playerid);
}
case 2:
{
new string[120];
format(string,sizeof(string),"You have resigned from %s", Organization[PlayerOrg[playerid]][Name]);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string,sizeof(string),"**%s has resigned from %s", PlayerName(playerid), Organization[PlayerOrg[playerid]][Name]);
SendClientMessageToAllEx(playerid, COLOR_GREY, string);
if (IsLeader(playerid))
{
new none[24];
format(none,sizeof(none),"None");
Organization[PlayerOrg[playerid]][Leader] = none;
}
ResetPlayerOrg(playerid);
SavePlayerOrgInfo(playerid);
}
case 3:
{
new string[80];
format(string,sizeof(string),"You have collected $%d", CollectedWage[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, string);
GivePlayerMoney(playerid, CollectedWage[playerid]);
CollectedWage[playerid] = 0;
SavePlayerOrgInfo(playerid);
}
case 4:
{
new string[140];
for (new i=0;i<MAX_PLAYERS;i++)
{
if (PlayerOrg[i] == PlayerOrg[playerid] && i != playerid)
{
format(string,sizeof(string),"%s", PlayerName(i));
ShowPlayerDialog(playerid,99000,DIALOG_STYLE_LIST,"Memberlist",string,"Ok","Alright");
}
}
}
}
}
but the dialog doesnt comes on the screen.
and i think it is wrong coding, the last case 4:
can you correct it into the rightone i tried alot