SA-MP Forums Archive
Long Text definition for 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: Long Text definition for dialog (/showthread.php?tid=417295)



Long Text definition for dialog - Stefano.R - 20.02.2013

Hi,

I'm trying to redo my /ahelp command in this way:

pawn Код:
if (strcmp("/ah", cmdtext, true) == 0)
{
    new CmdVIP [ 1024 ];
    CmdVIP = "Commands VIP:  \n";
    strcat(CmdVIP, "line 1  \n");
    strcat(CmdVIP, "line 2  \n");

    new CmdAdmin1 [ 1024 ];
    CmdAdmin1 = "Commands Admin 1:  \n";
    strcat(CmdAdmin1, "line 1  \n");
    strcat(CmdAdmin1, "line 2  \n");

    //  etc..

    if(PlayerInfo[playerid][pDonateRank] > 0 && PlayerInfo[playerid][pAdmin] == 0)
    {
        ShowPlayerDialog(playerid,5685,DIALOG_STYLE_MSGBOX,"Admin Help",CmdMdc,"Close","");
        return 1;
    }
    else if (PlayerInfo[playerid][pAdmin] == 1)
    {
        new AdminHelpDialog[1024 ];
        format(AdminHelpDialog,sizeof(AdminHelpDialog),"\n%s%s",CmdVIP,CmdAdmin1);
        ShowPlayerDialog(playerid,5685,DIALOG_STYLE_MSGBOX,"Admin Help",AdminHelpDialog,"Close","");
        return 1;
    }

    // etc..
}
and it works IG if you are VIP but not if you are admin 1 or more, it says "SERVER: Unknow Command". Then all my commands stop working, showing text "SERVER: Unknow Command"..

Thanks in advance


Re : Long Text definition for dialog - Stefano.R - 21.02.2013

Anyone? :S