SA-MP Forums Archive
How to put this on dialog. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to put this on dialog. (/showthread.php?tid=426686)



How to put this on dialog. - RiChArD_A - 29.03.2013

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.


Re: How to put this on dialog. - Pawnie - 29.03.2013

This should work. Didnt test it tho.


http://paste2.org/p/3412189


Re: How to put this on dialog. - Patrick - 29.03.2013

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;
}



Respuesta: Re: How to put this on dialog. - RiChArD_A - 29.03.2013

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