OOC Disable command
#4

pawn Код:
if(!strcmp(cmdtext, "/toggleooc", true,10))
{
    if(!IsPlayerAdmin(playerid))//or whatever your admin variable is
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "You are not an admin");
        return 1;
    }
    if(ToggleOOC == 1)
    {
        ToggleOOC = 0;
        SendClientMessageToAll(playerid, 0xFFFFFFFF, "Global OOC chat has been disabled");
    }
    else
    {
        ToggleOOC = 1;
        SendClientMessageToAll(playerid, 0xFFFFFFFF, "Global OOC chat has been enabled");
    }
    return 1;
}
pawn Код:
if(!strcmp(cmdtext, "/ooc", true,4)){
    if(ToggleOOC == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Global OOC chat has been disabled");
        return 1;
    }
    if(!strlen(cmdtext[4])) SendClientMessage(playerid, 0xffffffff, "USAGE: /ooc [text]");
    else {
        new tmp[192];
        GetPlayerName(playerid,tmp,24);
        format(tmp,192,"((OOC - %s: %s))",tmp,cmdtext[5]);
        SendClientMessageToAll(0xFFFFFFAA,tmp);
        print(tmp);
    }
    return 1;
 }
(Late reply)
Reply


Messages In This Thread
OOC Disable command - by Compton - 15.07.2011, 14:01
Re: OOC Disable command - by Yakushi Icefox - 15.07.2011, 14:09
Re: OOC Disable command - by Compton - 15.07.2011, 14:16
Re: OOC Disable command - by Adil - 15.07.2011, 14:17
Re: OOC Disable command - by Compton - 15.07.2011, 14:26
Re: OOC Disable command - by Yakushi Icefox - 15.07.2011, 14:28
Re: OOC Disable command - by Compton - 15.07.2011, 14:38
Re: OOC Disable command - by [MG]Dimi - 15.07.2011, 14:51
Re: OOC Disable command - by Yakushi Icefox - 15.07.2011, 14:59
Re: OOC Disable command - by Adil - 15.07.2011, 16:11

Forum Jump:


Users browsing this thread: 2 Guest(s)