SA-MP Forums Archive
Dialog issue, strcat - 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: Dialog issue, strcat (/showthread.php?tid=573253)



Dialog issue, strcat - VictorCreed - 05.05.2015

Hello folks, first I have to say I'm a beginner in scripting and if this is a simple issue, don't criticize me

PHP код:
if(strcmp(cmd"/ahelp"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pAdmin] < 1)
            {
                
SendClientMessage(playeridCOLOR_GREY"You are not authorized to use that command.");
                return 
1;
            }
            new 
aatext[952];
            
strcat(aatext"/reports    /spec    /suspectlist    /endspec    /respawnthiscar(/rtc)    \n");
            
strcat(aatext"/carreset    /respawnrentvehs    /trace    /registered    /checkweapons    \n");
            
strcat(aatext"/aduty    /givetime    /acceptreport    /trashreport    /afk    /moves    /showrules    \n");
            
strcat(aatext"/agivepassport    /apm    /setint    /setvw    /richlist    \n");
            
strcat(aatext"/removepending    /pending    /warn    /unwarn    /teles    /announces");
            
ShowPlayerDialog(playerid70DIALOG_STYLE_MSGBOX"Administrative Assistant Commands"string"OK""Level 2");
            return 
1;
        }
        return 
1;
    } 
This command only shows a dialog screen like this Any ideas?


Re: Dialog issue, strcat - JaydenJason - 05.05.2015

Quote:
Originally Posted by VictorCreed
Посмотреть сообщение
Hello folks, first I have to say I'm a beginner in scripting and if this is a simple issue, don't criticize me

PHP код:
if(strcmp(cmd"/ahelp"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pAdmin] < 1)
            {
                
SendClientMessage(playeridCOLOR_GREY"You are not authorized to use that command.");
                return 
1;
            }
            new 
aatext[952];
            
strcat(aatext"/reports    /spec    /suspectlist    /endspec    /respawnthiscar(/rtc)    \n");
            
strcat(aatext"/carreset    /respawnrentvehs    /trace    /registered    /checkweapons    \n");
            
strcat(aatext"/aduty    /givetime    /acceptreport    /trashreport    /afk    /moves    /showrules    \n");
            
strcat(aatext"/agivepassport    /apm    /setint    /setvw    /richlist    \n");
            
strcat(aatext"/removepending    /pending    /warn    /unwarn    /teles    /announces");
            
ShowPlayerDialog(playerid70DIALOG_STYLE_MSGBOX"Administrative Assistant Commands"string"OK""Level 2");
            return 
1;
        }
        return 
1;
    } 
This command only shows a dialog screen like this Any ideas?
ShowPlayerDialog(playerid, 70, DIALOG_STYLE_MSGBOX, "Administrative Assistant Commands", aatext, "OK", "Level 2");


Re: Dialog issue, strcat - SickAttack - 06.05.2015

You aren't displaying the content of the right variable.

pawn Код:
string

to:

aatext