ooc help
#7

Quote:
Originally Posted by ReD_HunTeR
Посмотреть сообщение
pawn Код:
new ooc = 0;

CMD:ooc(playerid, params[])
{
   new string[128], sendername[MAX_PLAYER_NAME];
   if(ooc == 1)
   {
      GetPlayerName(playerid, sendername, sizeof(sendername));
      if(isnull(params)) return SendClientMessage(playerid,-1, "* /ooc [text] or /o [text]");
      format(string, sizeof(string), "[GLOBAL CHAT]%s: %s",sendername,params);
      SendClientMessageToAll(-1, string);
   }
   else if(ooc == 0) return SendClientMessage(playerid, -1, "OOC Chat is Currently Disabled");
   return 1;
}

CMD:togooc(playerid, params[])
{
   if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COL_WHITE, "You are not an admin.");
   if(ooc == 0)
   {
      ooc = 1;
      SendClientMessageToAll(-1, "OOC Chat Enabled");
   }
   else if(ooc == 1)
   {
      ooc = 0;
      SendClientMessageToAll(-1, "OOC Chat Disabled");
   }
   return 1;
}
Yours just keeps the ooc chat closed all the time I added instead of IsPlayerAdmin
Код:
(pInfo[playerid][pAdminLevel] >= 2)
admin rank
Could that be the problem?
Reply


Messages In This Thread
ooc help - by Hybris - 13.03.2015, 15:55
Re: ooc help - by ATGOggy - 13.03.2015, 15:59
Re: ooc help - by Hybris - 13.03.2015, 16:18
Re: ooc help - by ReD_HunTeR - 13.03.2015, 16:30
Re: ooc help - by TheLegend1 - 13.03.2015, 16:32
Re: ooc help - by CalvinC - 13.03.2015, 16:33
Re: ooc help - by Hybris - 13.03.2015, 17:42
Re: ooc help - by Hybris - 13.03.2015, 17:47
Re: ooc help - by ATGOggy - 13.03.2015, 18:03

Forum Jump:


Users browsing this thread: 1 Guest(s)