SA-MP Forums Archive
ZCMD help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ZCMD help (/showthread.php?tid=263652)



ZCMD help [SOLVED] - GangsTa_ - 22.06.2011

pawn Код:
command(helpers, playerid, params[])
{
    #pragma unused params
    if(Player[playerid][Helper] >= 1)
    {
        new string[128];
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(Player[i][Helper] >= 1)
            {
                format(string, sizeof(string), "{37DB45}HELPER: {FFFFFF}%s", GetName(i));
                ShowPlayerDialog(playerid, 0, 9315, "Online helpers:", string, "Done", "");
            }
        }
    }
    return 1;
}
This command should show me all the online helpers into a dialog, but it shows me a dialog with an imput text and something doesn't work at all.
I made sure at OnDialogResponse there's nothing associated with this dialog ID.
Why's that?


Re: ZCMD help - =WoR=Varth - 22.06.2011

You put the wrong place between dialogid and dialogstyle.


Re: ZCMD help - GangsTa_ - 22.06.2011

Oh my godable, how can I make that shit??

Thanks btw


Re: ZCMD help - Laronic - 22.06.2011

Quote:
Originally Posted by GangsTa_
Посмотреть сообщение
Oh my godable, how can I make that shit??

Thanks btw
Emm like this
pawn Код:
ShowPlayerDialog(playerid, 0, 9315, "Online helpers:", string, "Done", "");
//change to
ShowPlayerDialog(playerid, 9315, 0, "Online helpers:", string, "Done", "");



Re: ZCMD help - Calgon - 22.06.2011

pawn Код:
command(helpers, playerid, params[])
{
    #pragma unused params
    if(Player[playerid][Helper] >= 1)
    {
        new string[256]; // This might need to be increased.
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(Player[i][Helper] >= 1)
            {
                format(string, sizeof(string), "%s\n{37DB45}HELPER: {FFFFFF}%s", string, GetName(i));
            }
        }
       
        ShowPlayerDialog(playerid, 0, 9315, "Online helpers:", string, "Done", "");
    }
    return 1;
}
I assume you wanted something that'd get all of the online helpers and then add their names in to a string and show them in that dialog?


Re: ZCMD help - GangsTa_ - 22.06.2011

Yes, and it works I guess, tested