//==============================================================================
// 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;
}
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;
}
error 035: argument type mismatch (argument 2)
it gives :
Код HTML:
error 035: argument type mismatch (argument 2) |
if(strcmp(cmd, "/Mute", true) ==0)
{
if(AccInfo[playerid][Level] >= 1)
{
new id[256],reason[256],time[256];
id = strtok(cmdtext[6],idx);
time = strtok(cmdtext[8],idx);
reason = strrest(cmdtext[11],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;
}
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];
nTime = time;
if(time == 1)
{
format(string, 256, "The player %s has been muted for %d second.(Reason: %s)", ActionName, nTime, reason);
}
else if(time <= 59 && >= 2)
{
format(string, 256, "The player %s has been muted for %d seconds.(Reason: %s)", ActionName, nTime, reason);
}
else if(time >= 60)
{
format(string, 256, "The player %s has been muted for %d seconds.(Reason: %s)", ActionName, nTime, reason);
}
TimerUnMute[playerid] = SetTimerEx("UnMutePlayer", (time*1000), 0, "d", playerid);
SendClientMessageToAll(yellow,string);
return 1;
}
else if (time > 60) format(nTime, 16, "%d minutes", floatdiv(time,60));
else if (time > 60) format(nTime, 22, "%d minutes and %d sec", time/60, time%60);