help me out a bit
#1

when i do mute it appear
Server: Unknown command +
SendFMessageToAll(red,"MUTED: has been muted [reason: %s]",pName,reason); (it dosnt appear the name)+
it dosnt mute why?
pawn Код:
dcmd_mute(playerid,params[])
{
    new id,reason,pName[MAX_PLAYER_NAME],file[128];
    if(PInfo[playerid][Level] < 3) return 0;
    if(sscanf(params,"us",id,reason)) return SCM(playerid,orange,"USAGE: /mute [id][reason]");
    PInfo[id][Muted] = 1;
    GetPlayerName(id,pName,sizeof(pName));
    format(file,sizeof(file),"MyAdmin/Users/%s.ini",pName);
    dini_IntSet(file,"Muted",1);
    SendFMessageToAll(red,"MUTED:%s has been muted [reason: %s]",pName,reason);
    return 1;
}
Reply
#2

Edited
pawn Код:
dcmd_mute(playerid,params[])
{
    new id,reason,pName[MAX_PLAYER_NAME],file[128],string[128];
    if(PInfo[playerid][Level] < 3) return 0;
    if(sscanf(params,"us",id,reason)) return SCM(playerid,orange,"USAGE: /mute [id][reason]");
    else
    {
    GetPlayerName(id,pName,sizeof(pName));
    format(file,sizeof(file),"MyAdmin/Users/%s.ini",pName);
    dini_IntSet(file,"Muted",1);
    PInfo[id][Muted] = 1;
    format(string,sizeof(string),"MUTED:%s has been muted [reason: %s]",pName,reason);
    SendFMessageToAll(red, string);
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Hoborific
Посмотреть сообщение
You didn't meet one of the requirements of the IF and you haven't added a statement for the IF and the return below that statement.
You sir are a idiot. you dont know what you are speaking about
Reply
#4

I'm not using dcmd, but I saw a script using it, so I came to think about, did you remember this?:
pawn Код:
dcmd(mute,4,cmdtext);
Under
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
I am unaware if dcmd has been updated and doesn't need that anymore, or if you already added it (I just couldn't see if you added it or not, by the code you show) If that's the case, then sorry.
Reply
#5

Quote:
Originally Posted by Mikkel_Pedersen
Посмотреть сообщение
I'm not using dcmd, but I saw a script using it, so I came to think about, did you remember this?:
pawn Код:
dcmd(mute,4,cmdtext);
Under
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
I am unaware if dcmd has been updated and doesn't need that anymore, or if you already added it (I just couldn't see if you added it or not, by the code you show) If that's the case, then sorry.
yes i remeber that and i do have it
Reply
#6

try this
pawn Код:
dcmd_mute(playerid,params[])
{
    new id,reason[128],pName[MAX_PLAYER_NAME],file[128];
    if(PInfo[playerid][Level] < 3) return 0;
    if(sscanf(params,"is[128]",id,reason)) return SCM(playerid,orange,"USAGE: /mute [id][reason]");
    PInfo[id][Muted] = 1;
    GetPlayerName(id,pName,sizeof(pName));
    format(file,sizeof(file),"MyAdmin/Users/%s.ini",pName);
    dini_IntSet(file,"Muted",1);
    SendFMessageToAll(red,"MUTED:%s has been muted [reason: %s]",pName,reason);
    return 1;
}

public OnPlayerText(playerid,text[])
{
    if(PInfo[playerid][Muted]==1) return 0;
//...
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)