Commands are not shown
#1

Okay i have this /cmds command and it shows dialog of what commands I can choose. When i choose first they are shown. But any bellow is not. Here is code
PHP код:
CMD:cmds(playerid)
{
    
    if(
Info[playerid][Admin]>=1ShowPlayerDialog(playeridDIALOG_CMDSDIALOG_STYLE_LIST"BFE COMMANDS""Account\nPlayer\nVehicle\nHouse\nVip\nAdmin""Select""Cancel");
    if(
Info[playerid][Admin]< 1ShowPlayerDialog(playeridDIALOG_CMDSDIALOG_STYLE_LIST"BFE COMMANDS""Account\nPlayer\nVehicle\nHouse\nVip""Select""Cancel");
    return 
1;
}
if(
dialogid == DIALOG_CMDS)
    {
        if(
response)
        {
            if(
listitem == 0)return ShowPlayerDialog(playeridDIALOG_CMDS_ACCOUNTDIALOG_STYLE_MSGBOX""RED"BFE Account Commands"""ORANGE"/changename "GREEN"- change your name\n"ORANGE"/changepass  "GREEN"- change your account password""OK""");
            if(
listitem == 1)
            {
                new 
bigstring[6000];
                
                
strcat(bigstring""ORANGE" В•"YELLOW" /dm              "PINK"         - "CYAN"Show lists of DM areas \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /t               "PINK"         - "CYAN"Shows Thelist of teleports \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /pm              "PINK"         - "CYAN"Send a private message \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /o               "PINK"         - "CYAN"To Attach Objects to your skin \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /mymute          "PINK"         - "CYAN"View your mute clock \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /mutelist        "PINK"         - "CYAN"View list of muted players \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /settings        "PINK"         - "CYAN"View and change your account preferences \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /pms                "PINK"         - "CYAN"Toggle PMs \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /god             "PINK"         - "CYAN"Toggle god mode \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /givemoney       "PINK"         - "CYAN"Transfer your money to another player \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /goto            "PINK"         - "CYAN"Teleport to someother player \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /gos              "PINK"         - "CYAN"Toggle Goto \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /w               "PINK"         - "CYAN"Change your weapon \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /color           "PINK"         - "CYAN"Change your nick name colour \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /report          "PINK"         - "CYAN"Report an hacker/cheater to administrators \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /admins          "PINK"         - "CYAN"View online administrators \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /skin            "PINK"         - "CYAN"Change your player skin  \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /kill            "PINK"         - "CYAN"Suicide yourself \n"sizeof(bigstring));
                
strcat(bigstring""ORANGE" В•"YELLOW" /para               "PINK"         - "CYAN"Get a parachute \n"sizeof(bigstring));
                
                
ShowPlayerDialog(playeridDIALOG_CMDS_PLAYERDIALOG_STYLE_MSGBOX""RED"BFE Player Commands"bigstring"OK""");
            } 
Reply
#2

ehh that would be the collision of dialog ids.

i scripted it in a mess that days never care to optimise and clean the code..too. I will make some optimisations by today itself to that old project...
Reply
#3

That shouldn't really matter. The only difference is that the first one gives you access to listitem 5.

Try using:
PHP код:
new bigstring[1655]; 
The maximum length you can have in the max dialog text is 4096. So using a string size of 6000 is unnecessary.
https://sampwiki.blast.hk/wiki/Limits

Never really encountered this issue before, but it could possibly be because you're using an array of 6000?
Reply
#4

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Never really encountered this issue before, but it could possibly be because you're using an array of 6000?
I think that can be the problem..but i could get dialog on screen on that days...i just did random assumption and gave optimization and pretty printing less priority.. (feeling bad now...)
Reply
#5

Don't feel bad about it. If nobody made mistakes, nobody would learn anything.
Reply
#6

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
I think that can be the problem..but i could get dialog on screen on that days...i just did random assumption and gave optimization and pretty printing less priority.. (feeling bad now...)
This happens to me too when i see my old scripts i always wanted to kill my self and feel pity about it..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)