COMMAND:kick(playerid, params[]){new PlayerToKick, Reason[128], ReasonMsg[128], Name[24];// Send the command to all admins so they can see itSendAdminText(playerid, \"/kick\", params);// Check if the player has logged inif (APlayerData[playerid][LoggedIn] == true){// Check if the player\'s admin-level is at least 1if (APlayerData[playerid][PlayerLevel] >= 1){ if (sscanf(params, \"us[128]\", PlayerToKick, Reason)) SendClientMessage(playerid, 0xFF0000AA, \"Hasznalta: \\\"/kick <PlayerToKick> <Reason>\\\"\"); else if (IsPlayerConnected(PlayerToKick)) // If the player is a valid playerid (he\'s connected) { // Get the name of the player who warned the player GetPlayerName(playerid, Name, sizeof(Name)); // Send the warned player a message who kicked him and why he\'s been kicked format(ReasonMsg, 128, \"Te kickelve lettél by %s %s\", AdminLevelName[APlayerData[playerid][PlayerLevel]], Name); SendClientMessage(PlayerToKick, 0xFF0000FF, ReasonMsg); format(ReasonMsg, 128, \"Reason: %s\", Reason); SendClientMessage(PlayerToKick, 0xFF0000FF, ReasonMsg); // Kick the player Kick(PlayerToKick); } else SendClientMessage(playerid, 0xFF0000FF, \"Nincs játékos\");}else return 0;}else return 0;// Let the server know that this was a valid commandreturn 1;}
COMMAND:ban(playerid, params[]){// Setup local variablesnew PlayerToBan, Days, Hours, Reason[128], TotalBanTime, Msg[128], Name[24], AdminName[24];// Send the command to all admins so they can see itSendAdminText(playerid, \"/ban\", params);// Check if the player has logged inif (APlayerData[playerid][LoggedIn] == true){// Check if the player\'s admin-level is at least 3if (APlayerData[playerid][PlayerLevel] >= 3){ if (sscanf(params, \"uiis[128]\", PlayerToBan, Days, Hours, Reason)) SendClientMessage(playerid, 0xFF0000AA, \"Használd: \\\"/ban <PlayerToBan> <nap> <óra> <Ok>\\\"\"); else { if (IsPlayerConnected(PlayerToBan)) { // Get the names of the player and the admin who executed the ban GetPlayerName(playerid, AdminName, sizeof(AdminName)); GetPlayerName(PlayerToBan, Name, sizeof(Name)); // Increase the number of bans APlayerData[PlayerToBan][bans]++; // Calculate the total bantime (when the player can login again) TotalBanTime = (Days * 86400) + (Hours * 3600) + gettime(); // Check if this is the player\'s 5th ban if (APlayerData[PlayerToBan][bans] == 5) APlayerData[PlayerToBan][banTime] = 2147483640; // Make the ban permanent (as high as it can go) else APlayerData[PlayerToBan][banTime] = TotalBanTime; // Store this value for the player // Inform the player about his ban if (APlayerData[PlayerToBan][bans] == 5) { format(Msg, 128, \"Te bannolva lettél by %s, mivel 5x bannolva lettõl\", AdminName); SendClientMessage(PlayerToBan, 0x808080FF, Msg); } else { format(Msg, 128, \"Bannolt: %s idõre %i nap és %i óra\", AdminName, Days, Hours); SendClientMessage(PlayerToBan, 0xFFFF00FF, Msg); format(Msg, 128, \"Reason: %s\", Reason); SendClientMessage(PlayerToBan, 0xFFFF00FF, Msg); format(Msg, 128, \"You\'ve been banned %i times now, 5th time is permament\", APlayerData[PlayerToBan][bans]); SendClientMessage(PlayerToBan, 0xFFFF00FF, Msg); } // Kick the player (his data will be saved) Kick(PlayerToBan); // Inform everybody else which player was banned and for how long format(Msg, 128, \"%s %s Bannolt %s Idõre %i nap %i óra\", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name, Days, Hours); SendClientMessageToAll(0x808080FF, Msg); } }}else return 0;}else return 0;return 1;}
COMMAND:ipban(playerid, params[]){// Setup local variablesnew PlayerToBan, Reason[128], Msg[128], Name[24], AdminName[24];// Send the command to all admins so they can see itSendAdminText(playerid, \"/ipban\", params);// Check if the player has logged inif (APlayerData[playerid][LoggedIn] == true){// Check if the player\'s admin-level is at least 3if (APlayerData[playerid][PlayerLevel] >= 3){ if (sscanf(params, \"us[128]\", PlayerToBan, Reason)) SendClientMessage(playerid, 0xFF0000AA, \"Használd: \\\"/ipban <PlayerToBan> <Reason>\\\"\"); else { if (IsPlayerConnected(PlayerToBan)) { // Get the names of the player and the admin who executed the ban GetPlayerName(playerid, AdminName, sizeof(AdminName)); GetPlayerName(PlayerToBan, Name, sizeof(Name)); // Inform the player about his ban format(Msg, 128, \"{FF0000}A te IP címed bannolva lett by {FFFF00}%s\", AdminName); SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg); format(Msg, 128, \"{FF0000}Reason: {FFFF00}%s\", Reason); SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg); // Ban the player with a reason BanEx(PlayerToBan, Reason); // Inform everybody else which player was ip-banned format(Msg, 128, \"{808080}%s %s has ip-banned {FFFF00}%s\", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name); SendClientMessageToAll(0xFFFFFFFF, Msg); } }}else return 0;}else return 0;return 1;}
De ha ezt berakom akkor kapok 1 errort tudnál írni egy példát?
forward ujTimer(playerid);COMMAND:kick(playerid, params[]){new PlayerToKick, Reason[128], ReasonMsg[128], Name[24];// Send the command to all admins so they can see itSendAdminText(playerid, \"/kick\", params);// Check if the player has logged inif (APlayerData[playerid][LoggedIn] == true){// Check if the player\'s admin-level is at least 1if (APlayerData[playerid][PlayerLevel] >= 1){ if (sscanf(params, \"us[128]\", PlayerToKick, Reason)) SendClientMessage(playerid, 0xFF0000AA, \"Hasznalta: \\\"/kick <PlayerToKick> <Reason>\\\"\"); else if (IsPlayerConnected(PlayerToKick)) // If the player is a valid playerid (he\'s connected) { // Get the name of the player who warned the player GetPlayerName(playerid, Name, sizeof(Name)); // Send the warned player a message who kicked him and why he\'s been kicked format(ReasonMsg, 128, \"Te kickelve lettél by %s %s\", AdminLevelName[APlayerData[playerid][PlayerLevel]], Name); SendClientMessage(PlayerToKick, 0xFF0000FF, ReasonMsg); format(ReasonMsg, 128, \"Reason: %s\", Reason); SendClientMessage(PlayerToKick, 0xFF0000FF, ReasonMsg); SetTimerEx(\"ujTimer\",1500,0,\"i\",PlayerToKick); } else SendClientMessage(playerid, 0xFF0000FF, \"Nincs játékos\");}else return 0;}else return 0;// Let the server know that this was a valid commandreturn 1;}public ujTimer(playerid){ Kick(playerid); return 1;}
D:\\GTA modok\\Mod\\Maddddd\\Mad\\régi\\régi\\pawno\\include\\PPC_PlayerCommands.inc(4796) : warning 202: number of arguments does not match definitionPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Warnings.
forward ujTimer2(playerid);// Bans a player by his ipCOMMAND:ipban(playerid, params[]){// Setup local variablesnew PlayerToBan, Reason[128], Msg[128], Name[24], AdminName[24];// Send the command to all admins so they can see itSendAdminText(playerid, \"/ipban\", params);// Check if the player has logged inif (APlayerData[playerid][LoggedIn] == true){// Check if the player\'s admin-level is at least 3if (APlayerData[playerid][PlayerLevel] >= 3){ if (sscanf(params, \"us[128]\", PlayerToBan, Reason)) SendClientMessage(playerid, 0xFF0000AA, \"Használd: \\\"/ipban <PlayerToBan> <Reason>\\\"\"); else { if (IsPlayerConnected(PlayerToBan)) { // Get the names of the player and the admin who executed the ban GetPlayerName(playerid, AdminName, sizeof(AdminName)); GetPlayerName(PlayerToBan, Name, sizeof(Name)); // Inform the player about his ban format(Msg, 128, \"{FF0000}A te IP címed bannolva lett by {FFFF00}%s\", AdminName); SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg); format(Msg, 128, \"{FF0000}Reason: {FFFF00}%s\", Reason); SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg); SetTimerEx(\"ujTimer2\",1000,0,\"i\",PlayerToBan); // Ban the player with a reason // Inform everybody else which player was ip-banned format(Msg, 128, \"{808080}%s %s has ip-banned {FFFF00}%s\", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name); SendClientMessageToAll(0xFFFFFFFF, Msg); } }}else return 0;}else return 0;return 1;}public ujTimer2(playerid){ BanEx(playerid); //Kick(playerid); return 1;}
public ujTimer2(playerid) { BanEx(playerid); //Kick(playerid); return 1;}
BanEx(playerid); //Kick(playerid);
BanEx(playerid, \"Hack\"); //Kick(playerid);