if(strcmp(cmdtext, \"/ban\", true) == 0) {if(PlayerInfo[playerid][AdminLevel] < 3) return SendLevelError(playerid, 3);if(!sscanf(cmdtext, \"ds[100]\", player1, result)) return SendUsageError(playerid, \"/ban [id] [reason]\");if(!IsPlayerConnected(player1)) return SendCommandError(playerid, 0);format(string, 256, \"You Are Banned\\n\\nBy Admin, %s\\nReason: %s\\n\\nNext time follow the Rules\\n\\nBye!\", PlayerName(playerid), result);ShowPlayerDialog(player1, 200, DIALOG_STYLE_MSGBOX, \"You have been Banned\", string, \"Ok\", \"\");SendCommandMessage(playerid, player1, \"Ban\", result);Ban(player1);return 1;}
CMD:ban(playerid, params[]){if(PlayerInfo[playerid][AdminLevel] < 3) { new pID, message[128]; if(sscanf(params, \"is[128]\", pID, message)){ SendClientMessage(playerid, VILAGOSKEK, \"Használat: /ban [iD] [indok]\"); }else if(!IsPlayerConnected(pID) || IsPlayerNPC(pID)){ SendClientMessage(playerid, PIROS, \"Érvénytelen azonosító!\");}else{new string[128]; format(string, 256, \"You Are Banned\\n\\nBy Admin, %s\\nReason: %s\\n\\nNext time follow the Rules\\n\\nBye!\", PlayerName(playerid), result); SendCommandMessage(playerid, player1, \"Ban\", result); SendClientMessageToAll(PIROS, string); BanEx(pID, message); ShowPlayerDialog(player1, 200, DIALOG_STYLE_MSGBOX, \"You have been Banned\", string, \"Ok\", \"\"); }}else {SendLevelError(playerid, 3); } return 1;}
a kód használ sscanf-t illetve ZCMD-t ! [/quote]köszi, zárok xDBUMP mert nyitok Az eredmény ugyanaz..Egyéb 5let?
if(!sscanf(cmdtext, \"ds[100]\", player1, result)) return SendUsageError(playerid, \"/ban [id] [reason]\");
if ( sscanf ( cmdtext, \"ds[ 100 ]\", player1, result ) ) return SendUsageError ( playerid, \"/ban [id] [reason]\" );
SERVER: Unknown Command.[/quote]
if ( sscanf ( cmdtext[1], \"ds[ 100 ]\", player1, result ) ) return SendUsageError ( playerid, \"/ban [id] [reason]\" );