new Check[ 2 ][ 128 ]; sscanf( params, "s[ 128 ]s[ 128 ]", Check[ 0 ], Check[ 1 ] ); if( !strcmp( Check[ 0 ], "say" ) ) { if( !Check[ 1 ][ 0 ] ) return SendMessage( playerid, BLUE, "COMMAND: /a say <text>." ); if( strlen( Check[ 1 ] ) > 128) return SendMessage( playerid, RED, "ERROR." ); new string[ 256 ]; format( string, sizeof( string ), "Admin %s | %s", NameRPG( playerid ), Check[ 1 ] ); SendClientMessageToAll(-1, string ); return true; }
[20:09:13] sscanf warning: Invalid data length. [20:09:13] sscanf warning: Invalid character in data length.
new s[128]; if(sscanf(params, "s[128]", s)) return SendMessage( playerid, BLUE, "COMMAND: /a say <text>." ); { if( strlen( s ) > 128) return SendMessage( playerid, RED, "ERROR." ); new string[ 256 ]; format( string, sizeof( string ), "Admin %s | %s", NameRPG( playerid ), s ); SendClientMessageToAll(-1, string ); return true; }
CMD:a( playerid, params[ ] ) { if( isnull( params ) ) { new string[ 512 ]; // change if( pInfo[ playerid ][ Admin ] > 0 ) { strcat( string, "CMD LIST" ); } ShowPlayerDialog( playerid, DIALOG_EMPTY, DIALOG_STYLE_MSGBOX, ""DIALOG_TITLE" ADMIN CMDS", string, "Close", "" ); return true; } new Check[ 2 ][ 128 ]; sscanf( params, "s[ 128 ]s[ 128 ]", Check[ 0 ], Check[ 1 ] ); if( !strcmp( Check[ 0 ], "say" ) ) { if( !Check[ 1 ][ 0 ] ) return SendMessage( playerid, BLUE, "COMMAND: /a say <text>." ); if( strlen( Check[ 1 ] ) > 128) return SendMessage( playerid, RED, "ERROR." ); new string[ 256 ]; format( string, sizeof( string ), "Admin %s | %s", NameRPG( playerid ), Check[ 1 ] ); SendClientMessageToAll(-1, string ); return true; } return true; }
CMD:a(playerid, params[]) { new s[128], string[512]; if(sscanf(params, "s[128]", s)) return SendMessage( playerid, BLUE, "COMMAND: /a say <text>." ); { if( strlen(s) == 0) { if( pInfo[ playerid ][ Admin ] > 0 ) { strcat( string, "CMD LIST" ); } ShowPlayerDialog( playerid, DIALOG_EMPTY, DIALOG_STYLE_MSGBOX, ""DIALOG_TITLE" ADMIN CMDS", string, "Close", "" ); return true; } else { format( string, sizeof( string ), "Admin %s | %s", NameRPG( playerid ), s ); SendClientMessageToAll(-1, string ); return true; } } return 1; }
CMD:a(playerid, params[]) { new string[512]; if(isnull(params)) { if( pInfo[ playerid ][ Admin ] > 0 ) { strcat( string, "CMD LIST" ); } ShowPlayerDialog( playerid, DIALOG_EMPTY, DIALOG_STYLE_MSGBOX, ""DIALOG_TITLE" ADMIN CMDS", string, "Close", "" ); return true; } else { format( string, sizeof( string ), "Admin %s | %s", NameRPG( playerid ), params ); SendClientMessageToAll(-1, string ); return true; } return 1; }
"s[ 128 ]s[ 128 ]"
Код:
"s[ 128 ]s[ 128 ]" |