11.07.2011, 19:48
Hello , i have make a mute command in my mod .
but its not working !
the mute command :
The Public XaPMutePlayer :
its only show me this :
what I need to do ?
Help me !
but its not working !
the mute command :
PHP код:
//==============================================================================
// Mute
//==============================================================================
if(strcmp(cmd, "/Mute", true) ==0)
{
if(AccInfo[playerid][Level] >= 1)
{
new id[256],reason[256],time[256];
id = strtok(cmdtext,idx);
time = strtok(cmdtext,idx);
reason = strrest(cmdtext,idx);
if(!strlen(id) || !strlen(time) || !strlen(reason) || !IsNumeric(time)) return SendClientMessage(playerid,white,"/Mute [id] [Time] [Reason] :щйоещ");
if(!IsPlayerConnected(strval(id))) return SendClientMessage(playerid,white,"аййгй жд ма озебш");
XaPMutePlayer(playerid, !strlen(time), !strlen(reason));
SendClientMessage(playerid,orange,"деа чйбм ойеи !");
}
else return SendClientMessage(playerid,red,"аъд ма бшоъ агойп вбедд осфйч тм оръ мбцт фчегд же");
return 1;
}
PHP код:
public XaPMutePlayer(playerid, time, reason) // Credit To XaP Admin Mod !
{
if(!IsPlayerConnected(playerid)) return 1;
new string[256],ActionName[24]; GetPlayerName(playerid,ActionName,24);
AccInfo[playerid][Muted] = 1;
new nTime[16];
if (time == 1) format(nTime, 16, "%d second", time);
else if (time == 30) format(nTime, 16, "0.5 Minute");
else if (time < 60) format(nTime, 16, "%d seconds", time);
else if (time == 60) format(nTime, 16, "1 minute");
else if (time > 60) format(nTime, 16, "%d minutes", floatdiv(time,60));
TimerUnMute[playerid] = SetTimerEx("UnMutePlayer", (time*1000), 0, "d", playerid);
format(string,256,"The Player %s has been muted for %s.(Reason : %s)",ActionName,nTime,reason);
SendClientMessageToAll(yellow,string);
return 1;
}
what I need to do ?
Help me !