[HELP] Two Questions
#3

just use ZCMD or DCMD... but whatever.... enjoy: Mute command
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
    new cc[128];
    sscanf(cmdtext,"s[128]",cc);
    if(!strcmp(cc,"/mute",true))
    {  
        new id[MAX_PLAYERS],str[128];
        if(sscanf(cmdtext,"s[128]i",cc,id[playerid])) return SendClientMessage(playerid,COLOR_RED,"How To Use: /Mute [ ID ]");
        if(!IsPlayerConnected(id[playerid])) return SendClientMessage(playerid,COLOR_RED,"Player Not Connected");
        if(MutedP[playerid]==0)
        {
            MutedP[playerid]=1;
            format(str,128,"You Have Muted Player ID : %d",id[playerid]);
            SendClientMessage(id[playerid],COLOR_WHITE,"You Have Been Muted By The Admin");
        }
        else
        {
            MutedP[playerid]=0;
            format(str,128,"You Have UnMuted Player ID : %d",id[playerid]);
            SendClientMessage(id[playerid],COLOR_WHITE,"You Have Been Muted By The Admin");
        }
        return SendClientMessage(playerid,COLOR_GREEN,str);
    }
           return 0;
}
//--------------
public OnPlayerText(playerid, text[])
{
    if(MutedP[playerid]==1)
           {
                   SendClientMessage(playerid,COLOR_RED,"You Are On Mute");
                   return 0;
           }
           return 1;
}
Reply


Messages In This Thread
[HELP] Two Questions - by Larsey123IsMe - 13.12.2010, 20:38
Re: [HELP] Two Questions - by blackwave - 13.12.2010, 21:03
Re: [HELP] Two Questions - by XePloiT - 13.12.2010, 21:36

Forum Jump:


Users browsing this thread: 1 Guest(s)