Help with mute command
#6

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], idx;
	cmd = strtok(cmdtext, idx);
	new tmp[128];
	new string[2000];
	new params[256];
	if(strcmp(cmd,"/tmute",true) == 0)
	{
	    if(pInfo[playerid][pAdmin] >= 2)
	    {
		    new id,minutes,reason[128];
		    if(sscanf(params,"uds[128]", id, minutes, reason)) return SendClientMessage(playerid,-1,"Използвай: /tmute [playerid] [time] [reason]");
			pInfo[id][pMuted] = 1;
			pInfo[id][pMutedTime] = minutes*1;
			format(string,sizeof(string),"%s беше заглушен от администратор %s за %d минути[Причина: %s]",GetName(id),GetName(playerid),minutes,reason);
			SendClientMessageToAll(0xFF0000FF,string);
			SetTimerEx("CheckPlayerMute", 1000, 1, "d", id);
			return 1;
	    }
	    else
	    {
	        SendClientMessage(playerid, 0xFF0000FF, "Нямаш права за да ползваш командата!");
	        return 1;
	    }
	   	return 1;
	}
	return 0;
}
Reply


Messages In This Thread
Help with mute command - by scripter112 - 20.03.2018, 15:30
Re: Help with mute command - by Gameluner - 20.03.2018, 18:00
Re: Help with mute command - by scripter112 - 20.03.2018, 19:12
Re: Help with mute command - by Maximun - 20.03.2018, 19:20
Re: Help with mute command - by Dayrion - 20.03.2018, 19:30
Re: Help with mute command - by scripter112 - 20.03.2018, 19:49
Re: Help with mute command - by Dayrion - 20.03.2018, 19:57
Re: Help with mute command - by scripter112 - 20.03.2018, 20:14

Forum Jump:


Users browsing this thread: 1 Guest(s)