Dialog issue, strcat
#1

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(playerid, COLOR_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(playerid, 70, DIALOG_STYLE_MSGBOX, "Administrative Assistant Commands", string, "OK", "Level 2");
            return 
1;
        }
        return 
1;
    } 
This command only shows a dialog screen like this Any ideas?
Reply
#2

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(playerid, COLOR_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(playerid, 70, DIALOG_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");
Reply
#3

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

pawn Код:
string

to:

aatext
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)