18.07.2015, 22:44
I Dont script in pawno anymore but you can do something like this
Код:
new Bool:OOC; // <-- or some shit liek that CMD:ooc(playerid, params[]) { if(OOC == true) { new sendername[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, sendername, sizeof(sendername)); if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFF,"Correct usage: /ooc [text]"); if(gettime() - 3 < pInfo[playerid][pSpamDrop]) return SendClientMessage(playerid,-1,"*"COL_RED" Wait 3 Seconds to type again!"); format(string, sizeof(string), ""COL_GREY"" "[GLOBAL CHAT] %s: %s ", sendername, params); SendClientMessageToAll(0xFF3300, string); return 1; } else return SendClientMessage(playerid, -1, "OOC disabled"); } CMD:toggleooc(playerid, params[]) { if(Player[playerid][pAdminLevel] >= 1) { OOC = !OOC; } return 1; }