Need some help
#2

Try this:

pawn Код:
CMD:orgs(playerid, params[])
{
    #pragma unused params
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"{FFFFFF}Organizations List","{12900B}1-Grove Street Families\n{8E0090}2-Front Yard Ballas\n{40FFFF}3-Los Aztecas\n{CCFFDD}4-Russian Mafia\n{00CC6C}5-San Andreas Sheriff Department\n{FF0000}6-Hells Angels\n{9CA1FF}7-RsHaul\n{00351E}8-San Andreas Armed Forces\n{6C0000}9-Ninkyo Dantai\n{2641FE}10-San Andreas Police Department\n{000080}11-Special Weapons And Tactics\n{3366FF}12-Federal Bureau Of Investigation\n{6C49A1}13-San Andreas Navy","Ok","Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if (dialogid == 1)
    {
        if (response)
        {
            if (PlayerOrg[playerid] > 0) return SendClientMessage(playerid, COLOR_RED,"You already belong to an organization!");
            if (Requesting[playerid] > 0) return SendClQientMessage(playerid, COLOR_RED,"You are already requesting to join an organization!");
            if (!IsLeaderOnline(listitem + 1)) return SendClientMessage(playerid,COLOR_RED,"The leader of this organization is currently offline!");
            new string[120];
            format(string,sizeof(string),"%s is requesting to join the %s", PlayerName(playerid), GetOrgName(listitem + 1));
            SendClientMessageToAllEx(playerid, COLOR_GREY, string);
            format(string,sizeof(string),"Your request to %s has been sent", GetOrgName(listitem + 1));
            SendClientMessage(playerid, COLOR_YELLOW, string);
            Requesting[playerid] = listitem + 1;
            return 1;
        }
        else return SendClientMessage(playerid, COLOR_YELLOW, "List Closed");
    }
    return 0;
}
NOTE: Untested
Reply


Messages In This Thread
Need some help - by IceBilizard - 15.09.2012, 05:08
Re: Need some help - by clarencecuzz - 15.09.2012, 05:34
Re: Need some help - by CoDeZ - 15.09.2012, 05:35

Forum Jump:


Users browsing this thread: 1 Guest(s)