global OOC? error help /togt
#5

The playerid ofcourse, SendClientMessageToAll only have 2 arguments: color and message. So remove playerid, also you can't format the string like that.
Код:
CMD:togt(playerid, params[])
{
	new str[128];
    if (PlayerInfo[playerid][pAdmin] < 9)
	    return SendClientMessage(playerid, COLOR_RED, "You don't have permission to use this command.");

	if(!t_chat)
	{
		format(str, sizeof(str), "[ADMIN]: %s [%d] has disabled talk chat.", GetName(playerid), playerid); // is this mean to be "enabled"?
	    SendClientMessageToAll(COLOR_RED, str);
	    t_chat = true;
	}
	else
	{
		format(str, sizeof(str), "[ADMIN]: %s [%d] has enabled talk chat.", GetName(playerid), playerid); // is this mean to be "disabled"?
	    SendClientMessageToAll(COLOR_GREEN, str);
	    t_chat = false;
	}
	return 1;
}
Reply


Messages In This Thread
global OOC? error help /togt - by Tween73 - 03.01.2016, 23:28
Re: global OOC? error help /togt - by saffierr - 03.01.2016, 23:30
Re: global OOC? error help /togt - by Tween73 - 03.01.2016, 23:44
Re: global OOC? error help /togt - by ReDKiiL - 04.01.2016, 01:02
Re: global OOC? error help /togt - by RoboN1X - 04.01.2016, 03:18
Re: global OOC? error help /togt - by saffierr - 04.01.2016, 03:21

Forum Jump:


Users browsing this thread: 1 Guest(s)