30.05.2013, 11:33
For the love of god, please fix your identation.
Try like this:
Try like this:
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","");
return 1;
}
}
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\n%s", string, PlayerName(i));
}
}
ShowPlayerDialog(playerid,99000,DIALOG_STYLE_LIST,"Memberlist",string,"Ok","Alright");
}
}
}