Command crashes the server
#1

Hello there hope you're having a nice day,
so I made this command that displays a dialog with Used/un-Used Player object slots, but whenever I try to execute it, the server crashes

I made the command in 2 versions, but they both cause the crash to occur,

Version 1

PHP код:
CMD:viptoys(playerid){
    
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVIPCOLOR_RED"[ERROR]: You are not a VIP, you cannot use this command!");
    new 
_content[300], _state[16];
    for(new 
ii<MAX_PLAYER_ATTACHED_OBJECTSi++){
        
format(_contentsizeof(_content), "%s%s\t%s" ,_contentgPlayerBone[i], _state);
        
_state IsPlayerAttachedObjectSlotUsed(playeridi) ? (""VIPCOL_RED"[USED]") : (""VIPCOL_GREEN"[EMPTY]");
    }
    
ShowPlayerDialog(playeridDIALOG_TOYSINDEXDIALOG_STYLE_LIST"VIP Attachments"_content"Select""Cancel");
    return 
1;

Version 2

PHP код:
CMD:viptoys(playerid){
    
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVIPCOLOR_RED"[ERROR]: You are not a VIP, you cannot use this command!");
    new 
_content[300];
    for(new 
ii<MAX_PLAYER_ATTACHED_OBJECTSi++){
        
format(_contentsizeof(_content), "%s%s\t%s" ,_contentgPlayerBone[i], IsPlayerAttachedObjectSlotUsed(playeridi) ? (""VIPCOL_RED"[USED]") : (""VIPCOL_GREEN"[EMPTY]"));
    }
    
ShowPlayerDialog(playeridDIALOG_TOYSINDEXDIALOG_STYLE_LIST"VIP Attachments"_content"Select""Cancel");
    return 
1;

NOTE : NVM, fixed, I just added a /n
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)