/mute isnt working :O ?
#4

because sscanf give u the ability to do /mute [playername] not just /mute [playerid] and btw command is working like a charm but if i like typed : /mute grim it says "u can't mute urself"

Код:
dcmd_mute(playerid,params[])
{
    new giveplayerid;
    giveplayerid = strval( params );
    if(pInfo[playerid][Adminlvl] < Moderator) return SendClientMessage(playerid,COLOR_RED,"You Have To Be Admin Level 1 To Use This Command");
    if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"Usage: /mute [playerid]");
    if(giveplayerid == playerid) return SendClientMessage(playerid,COLOR_RED,"You Can't Mute Urself");
    if(pInfo[giveplayerid][Muted] == 1) return SendClientMessage(playerid,COLOR_RED,"Player Already Muted");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,COLOR_RED,"User Doesn't Exist");
    new pid[MAX_PLAYER_NAME],pName[MAX_PLAYER_NAME];
    GetPlayerName(giveplayerid,pid,MAX_PLAYER_NAME);
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    new string[128]; format(string,128,"You Muted %s",pid);
    SendClientMessage(playerid,COLOR_YELLOW,string);
    format(string,128,"You've Been Muted By %s",pName);
    SendClientMessage(giveplayerid,COLOR_RED,string);
    pInfo[giveplayerid][Muted] = 1;
    return 1;
}
Reply


Messages In This Thread
/mute isnt working :O ? - by aircombat - 01.01.2011, 19:39
Re: /mute isnt working :O ? - by dice7 - 01.01.2011, 19:41
Re: /mute isnt working :O ? - by Grim_ - 01.01.2011, 19:42
Re: /mute isnt working :O ? - by aircombat - 01.01.2011, 22:25
Re: /mute isnt working :O ? - by aircombat - 02.01.2011, 10:11
Re: /mute isnt working :O ? - by Mean - 02.01.2011, 11:04

Forum Jump:


Users browsing this thread: 5 Guest(s)