ShowPlayerDialog Crash Client
#1

I'm editing an attachment system for my server until it crash my game when I try to type /att, the server is not crashing only the client game.

PHP код:
CMD:att(playerid,params[])
{
    new 
string[128];
    new 
dialog[500];
    new 
name[MAX_PLAYER_NAME];
    new 
file[MAX_PLAYERS];
    
GetPlayerName(playeridnamesizeof(name));
    
format(filesizeof(file), PATH_2name);
    
INI_ParseFile(file"GetInfoFromData", .bExtra true, .extra playerid);
    if(
Account[playerid][Vip] > 0)
    {
        for(new 
x;x<MAX_OSLOTS;x++)
        {
            if(
IsPlayerAttachedObjectSlotUsed(playeridx))
            {
                
format(stringsizeof(string), ""COL_WHITE"SLOT:%d :: "COL_GREEN"[USED SLOT]\n"x);
            }
            else 
format(stringsizeof(string), ""COL_WHITE"SLOT:%d\n"x);
            if(
IsPlayerAttachedObjectSlotUsed(playerid&& aInfo[playerid][x][Hidden] == 1))
            {
                   
format(stringsizeof(string), ""COL_WHITE"SLOT:%d :: "COL_GREEN"[USED SLOT]"COL_RED"[HIDDEN]\n"x);
            }
            
strcat(dialog,string);
        }
       }
       else
       {
           
SendClientMessage(playerid0xFF0000FF"[Error:] You are not a vip!");
       }
       
ShowPlayerDialog(playeridDIALOG_ATTACH_INDEX_SELECTIONDIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Slot)"dialog"Select""Close(X)");
    return 
1;

What am I doing wrong?
Reply
#2

bump
Reply
#3

Have 2 different strings, string1 and string2, then strcat it into dialog format.
Reply
#4

Quote:
Originally Posted by JohnBlaze1971
Посмотреть сообщение
Have 2 different strings, string1 and string2, then strcat it into dialog format.
Thanks, It worked now, I forgot about that, thank you for pointing it out.
Reply
#5

If the dialog is more screen resolution, then of course there will be a crash
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)