To dialog_mgsbox
#1

Anyone know how to make this to dialog message box? I really like dialog styles!

pawn Код:
COMMAND:jailed(playerid,params[])
{
    #pragma unused params
    if(PlayerInfo[playerid][AdminLevel] >= LEVEL_jailed)
    {
        new bool:First2 = false;
        new Count, i;
        new string[128];
        new adminname[MAX_PLAYER_NAME];
        for(i = 0; i < MAX_PLAYERS; i++)
        if(IsPlayerConnected(i) && PlayerInfo[i][Jailed])
        Count++;
        if(Count == 0)
        return SendClientMessage(playerid, WHITE, "{FF0000}>> No players are Jailed");

        for(i = 0; i < MAX_PLAYERS; i++)
        if(IsPlayerConnected(i) && PlayerInfo[i][Jailed])
        {
            GetPlayerName(i, adminname, sizeof(adminname));
            if(!First2)
            {
                format(string, sizeof(string), "Jailed Players: (%d)%s", i,adminname); First2 = true;
            }
            else format(string,sizeof(string),"%s, (%d)%s ",string,i,adminname);
            SendClientMessage(playerid,YELLOW,string);
        }
    }
    else
    {
        SendClientMessage(playerid, WHITE, NO_PERM);
    }
    return 1;
}

pawn Код:
COMMAND:muted(playerid,params[])
{
    #pragma unused params
    if(PlayerInfo[playerid][AdminLevel] >= LEVEL_muted)
    {
        new bool:First2 = false, Count, adminname[MAX_PLAYER_NAME], string[128], i;
        for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[i][Muted]) Count++;
        if(Count == 0) return SendClientMessage(playerid, WHITE, "{FF0000}>> No players are Muted");

        for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[i][Muted])
        {
            GetPlayerName(i, adminname, sizeof(adminname));
            if(!First2)
            {
                format(string, sizeof(string), "Muted Players: (%d)%s", i,adminname);
                First2 = true;
            } else format(string,sizeof(string),"%s, (%d)%s ",string,i,adminname);
            SendClientMessage(playerid,YELLOW,string);
        }
    }
    else
    {
        SendClientMessage(playerid, WHITE, NO_PERM);
    }
    return 1;
}
pawn Код:
COMMAND:frozen(playerid,params[])
{
    #pragma unused params
    if(PlayerInfo[playerid][AdminLevel] >= LEVEL_frozen)
    {
        new bool:First2 = false;
        new Count,string[128], i;
        new adminname[MAX_PLAYER_NAME];

        for(i = 0; i < MAX_PLAYERS; i++)
        if(IsPlayerConnected(i) && PlayerInfo[i][Frozen])
        Count++;
        if(Count == 0)
        return SendClientMessage(playerid, WHITE, "{FF0000}No players are Frozen");

        for(i = 0; i < MAX_PLAYERS; i++)
        if(IsPlayerConnected(i) && PlayerInfo[i][Frozen])
        {
            GetPlayerName(i, adminname, sizeof(adminname));
            if(!First2)
            {
                format(string, sizeof(string), "Frozen Players: (%d)%s", i,adminname);
                First2 = true;
            }
            else format(string,sizeof(string),"%s, (%d)%s ",string,i,adminname);
            SendClientMessage(playerid,YELLOW,string);
        }
    }
    else
    {
        SendClientMessage(playerid, WHITE, NO_PERM);
    }
    return 1;
}
Reply
#2

Change "SendClientMessage..."wich ShowPlayerDialog(playerid,dialogid,style,title,con tens,button 1,button 2);

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)