COMMAND:mute(playerid, params[]){// Setup local variablesnew Msg[128], Name[24], AdminName[24], Reason[128], OtherPlayer;// Send the command to all admins so they can see itSendAdminText(playerid, \"/mute\", 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]\", OtherPlayer, Reason)) SendClientMessage(playerid, 0xFF0000AA, \"Usage: \\\"/mute <OtherPlayer> <Reason>\\\"\"); else { // Check if the otherplayer is online if (IsPlayerConnected(OtherPlayer)) { // Get the player-names GetPlayerName(playerid, AdminName, sizeof(AdminName)); GetPlayerName(OtherPlayer, Name, sizeof(Name)); // Mute the other player APlayerData[OtherPlayer][Muted] = true; // Let the other player know that he has been muted format(Msg, 128, \"{FF0000}Te némítva lettél by {FFFF00}%s {FF0000}for {FFFF00}%s\", AdminName, Reason); SendClientMessage(OtherPlayer, 0xFFFFFFFF, Msg); // Let the admin know who he has muted format(Msg, 128, \"{00FF00}Némítva vagy {FFFF00}%s\", Name); SendClientMessage(playerid, 0xFFFFFFFF, Msg); // Save the player-stats PlayerFile_Save(OtherPlayer); } else SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}NIncs ilyen játékos\"); }}else return 0;}else return 0;// Let the server know that this was a valid commandreturn 1;}
// This callback gets called whenever a player uses the chat-boxpublic OnPlayerText(playerid, text[]){// Block the player\'s text if he has been muted if (APlayerData[playerid][Muted] == true){// Let the player know he\'s still mutedSendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Te még mindig némítva vagy.\");// Don\'t allow his text to be sent to the chatboxreturn 0;} return 1;}
COMMAND:mute(playerid, params[]){ new Msg[128], Name[24], AdminName[24], Reason[128], OtherPlayer; SendAdminText(playerid, \"/mute\", params); if (APlayerData[playerid][LoggedIn] == true) { if (APlayerData[playerid][PlayerLevel] >= 1) { if (sscanf(params, \"us[128]\", OtherPlayer, Reason)) SendClientMessage(playerid, 0xFF0000AA, \"Usage: \\\"/mute <OtherPlayer> <Reason>\\\"\"); else { if (IsPlayerConnected(OtherPlayer)) { GetPlayerName(playerid, AdminName, sizeof(AdminName)); GetPlayerName(OtherPlayer, Name, sizeof(Name)); format(Msg, 128, \"{FF0000}Te némítva lettél by {FFFF00}%s {FF0000}for {FFFF00}%s\", AdminName, Reason); SendClientMessage(OtherPlayer, 0xFFFFFFFF, Msg); format(Msg, 128, \"{00FF00}Némítva vagy {FFFF00}%s\", Name); SendClientMessage(playerid, 0xFFFFFFFF, Msg); APlayerData[OtherPlayer][Muted] = true; PlayerFile_Save(OtherPlayer); } else SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}NIncs ilyen játékos\"); } } else return 0; } else return 0; return 1;}
public OnPlayerText(playerid, text[]){ if (APlayerData[playerid][Muted] == true) { SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Te még mindig némítva vagy.\"); return 0; } return 1;}
Nem jó ugyan úgy tudok írni cheatba