How to put this on dialog.
#1

What to do in order to have this info shown in dialog instead of the regular chat box.
ThIs:
pawn Код:
CMD:ssssoooobbeit(playerid, params[]) {
    if(!IsPlayerAdmin(playerid)) return 0;
    SendClientMessage(playerid, -1, "{FF3300}Players with ssssoooobbeit:{FFFFFF}");
    new string[128];
    for(new i=0; i<MAX_PLAYERS;++i) {
        if(gpInfo[i][hacker] == 1) {
            format(string, sizeof string, "{FFFFFF}Name: {FF3300}%s | {FF3300}ID: {FFFFFF}%d", gpInfo[i][pname], i);
            SendClientMessage(playerid, -1, string);
        }
    }
    return 1;
}
Thank you!

PD: ssssoooobbeit is the way the anti-spam let me say it.
Reply
#2

This should work. Didnt test it tho.


http://paste2.org/p/3412189
Reply
#3

Quote:
Originally Posted by Pawnie
Посмотреть сообщение
This should work. Didnt test it tho.


http://paste2.org/p/3412189
your one is good but there is a shorter one

Here you go
pawn Код:
CMD:ssssoooobbeit(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return 0;
    SendClientMessage(playerid, -1, "{FF3300}Players with ssssoooobbeit:{FFFFFF}");
    new string[128];
    for(new i=0; i<MAX_PLAYERS;++i)
    {
        if(gpInfo[i][hacker] == 1)
        {
            format(string, sizeof string, "{FFFFFF}Name: {FF3300}%s | {FF3300}ID: {FFFFFF}%d", gpInfo[i][pname], i);
            ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"Sobiet Users",string,"","Close");
            return 1; //to avoid problem whilst closing the dialog
        }
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by pds2012
Посмотреть сообщение
your one is good but there is a shorter one

Here you go
pawn Код:
CMD:ssssoooobbeit(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return 0;
    SendClientMessage(playerid, -1, "{FF3300}Players with ssssoooobbeit:{FFFFFF}");
    new string[128];
    for(new i=0; i<MAX_PLAYERS;++i)
    {
        if(gpInfo[i][hacker] == 1)
        {
            format(string, sizeof string, "{FFFFFF}Name: {FF3300}%s | {FF3300}ID: {FFFFFF}%d", gpInfo[i][pname], i);
            ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"Sobiet Users",string,"","Close");
            return 1; //to avoid problem whilst closing the dialog
        }
    }
    return 1;
}
Thank you bro! +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)