23.10.2017, 18:01
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.
What am I doing wrong?
PHP код:
CMD:att(playerid,params[])
{
new string[128];
new dialog[500];
new name[MAX_PLAYER_NAME];
new file[MAX_PLAYERS];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), PATH_2, name);
INI_ParseFile(file, "GetInfoFromData", .bExtra = true, .extra = playerid);
if(Account[playerid][Vip] > 0)
{
for(new x;x<MAX_OSLOTS;x++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, x))
{
format(string, sizeof(string), ""COL_WHITE"SLOT:%d :: "COL_GREEN"[USED SLOT]\n", x);
}
else format(string, sizeof(string), ""COL_WHITE"SLOT:%d\n", x);
if(IsPlayerAttachedObjectSlotUsed(playerid, x && aInfo[playerid][x][Hidden] == 1))
{
format(string, sizeof(string), ""COL_WHITE"SLOT:%d :: "COL_GREEN"[USED SLOT]"COL_RED"[HIDDEN]\n", x);
}
strcat(dialog,string);
}
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "[Error:] You are not a vip!");
}
ShowPlayerDialog(playerid, DIALOG_ATTACH_INDEX_SELECTION, DIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Slot)", dialog, "Select", "Close(X)");
return 1;
}
