CMD:ban(playerid, params[]){ format( iString, 258, \"===============================================\\r\\n\\ Admin: %s\\r\\n\\ Level: %d\\r\\n\\ Player: %s\\r\\n\\ Date: %d/%d/%d at %d:%d\\r\\n\\ Reason: %s\\r\\n\\ PlayerName2( playerid ), P_DATA[ playerid ][ P_Level ], PlayerName2( params[ 0 ] ), D, M, Y, H, Mi, params[ 1 ] ); FILE = fopen(SlogBan, io_append);if (FILE){fwrite(FILE, iString);fclose(FILE);}
Public OnPlayerConnect(playerid){new UID = BUD::GetNameUID( PlayerName2( playerid ) ); if ( UID != BUD::INVALID_UID ){ new File:FILE; SetPVarInt( playerid, \"BANNED\", BUD::GetIntEntry( UID, \"Banned\" ) );if ( GetPVarInt( playerid, \"BANNED\" ) == 1 ) { FormMessage( playerid, COLOR_WHITE, \"Your name is banned from this server! Go away!\",0 ); FormMessageForAll( COLOR_WHITE, \"[ \\\"%s\\\"] with ID [ \\\"%i\\\" ] has been kicked from the server! [Reason: Banned Account]\",PlayerName2( playerid ), playerid ); SetTimerEx( \"KickPlayer\", 5000, false, \"i\", playerid );}}
CMD:ban(playerid, params[]){format(iString4, sizeof(iString4), \"Admin Name:%s \\n Level:%d\\nPlayer:%s\\nReason:%s\", PlayerName2( playerid ),P_DATA[ playerid ][ P_Level ],PlayerName2( params[ 0 ] ),params[ 1 ]);FILE = fopen(SlogBan, io_append);if (FILE){fwrite(FILE, iString4);fclose(FILE);}Ban(params[0]);return 1;
public OnPlayerConnect(playerid){FILE2 = fopen(SlogBan, io_read);if (FILE2){fread(FILE2, iString4);ShowPlayerDialog( playerid, BanDialog, DIALOG_STYLE_MSGBOX, \"{FFFFFF}You\'re banned\", iString4, \"Ok\", \"\"); fclose(FILE2);}
FILE = fopen(SlogBan, io_append); if (FILE) { while(fread(FILE, string)) { format(iString, \"%s%s\", iString, string); } } fcolse(FILE);
(9165) : error 035: argument type mismatch (argument 2)
FILE = fopen(SlogBan, io_append); FILE = fopen(SlogBan, io_append); if (FILE) { while(fread(FILE, string)) { format(iString, \"%s%s\", iString, string); // Ez a hibás sor } } fclose(FILE);
format(iString,sizeof(iString), \"%s%s\", iString, string);
format(iString,sizeof(iString), \"%s%s\", iString, string); Így?