how i make ooc off?
#3

Quote:
Originally Posted by sampmark05
Посмотреть сообщение
Код:
CMD:oocoff(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{
		if (!oocoff)
		{
			oocoff = 1;
			BroadCast(COLOR_GRAD2, "   OOC chat channel disabled by an Admin!");
		}
		else
		{
			oocon = 0;
			BroadCast(COLOR_GRAD2, "   OOC chat channel enabled by an Admin!");
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	}
	return 1;
}
AGAIN you post incomplete code.



On topic.


Why are you using the ProxDetector function with a radius of 999999999999999999999999999999999? (exaggeration) You could just use SendClientMessageToAll, and using the proxdetector with that radius is a waste of cpu.

To disable an OOC chat.
pawn Код:
new
    OOC = 0; // ooc is off
CMD:ooc(playerid, params[])
{
    if(OOC == 0) return SendClientMessage(playerid, -1, "The OOC chat has been disabled.");
    // blah blah
   
CMD:enableocc(playerid, params[])
{
    if(OOC == 0) // if it's turned off
    {
        OOC = 1; // then turn it on
        SendClientMessage(playerid, -1, "OOC chat has been enabled");
    }
    else if(OOC == 1) // if it's on
    {
        OOC = 0; // then turn it off
        SendClientMessage(playerid, -1, "OOC chat has been enabled");
    }
    return 1;
}
Hope you understand.
Reply


Messages In This Thread
how i make ooc off? - by TheDiscussionCafe - 25.05.2012, 05:10
Re: how i make ooc off? - by sampmark05 - 25.05.2012, 05:17
Re: how i make ooc off? - by ReneG - 25.05.2012, 05:20
Re: how i make ooc off? - by Verbal - 25.05.2012, 05:36
Re: how i make ooc off? - by TheDiscussionCafe - 25.05.2012, 22:11

Forum Jump:


Users browsing this thread: 2 Guest(s)