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?