Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- #define SCTA SendClientMessageToAll
- new Mute[MAX_PLAYERS];
- public OnPlayerConnect(playerid)
- {
- Mute[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid)
- {
- Mute[playerid] = 0;
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(Mute[playerid] == 1)
- {
- SendClientMessage(playerid,-1,"You Are Muted You Cant Chat");
- }
- return 1;
- }
- CMD:mute(playerid,params[])
- {
- new targetid,string[128];
- if(Mute[playerid] == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(sscanf(params,"u",targetid)) return SendClientMessage(playerid, -1, "/mute [playerid]");
- {
- Mute[playerid] = 1;
- format(string,sizeof(string)," ID: %s Has been Muted by The Rcon admin",targetid);
- SCTA(-1, string);
- }
- }
- }
- return 1;
- }
- CMD:unmute(playerid,params[])
- {
- new targetid, string[128];
- if(Mute[playerid] == 1)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(sscanf(params,"u",targetid)) return SendClientMessage(playerid, -1, "/mute [playerid]");
- {
- Mute[playerid] = 1;
- format(string,sizeof(string)," ID: %s Has been {FF0000}Un{FFFFFF}Muted by The Rcon admin",targetid);
- SCTA(-1, string);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement