OnPlayerText => OnPlayerCommandText
#1

Hi all,i ask a favour of users here.

I've this for admin chat

OnPlayerText

Код:
     if(text[0] == '@')
    {
        if(PlayerInfo[playerid][AdminLevel] > 2)
        {
            if(!strlen(text[1])) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: @<text>");
            new sendername[128];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new string[128];
            format(string, sizeof(string), "Admin Chat [%i]%s: %s" ,playerid,sendername, text[1]);
            SendMessageToAdmins(COLOR_GREEN, string);
            IRC_GroupSay(gGroupID, IRC_ADMINCHANNEL, string);
            AdminCLog(string);
            return 0;
        }
    else return 0;
    }
   }
I wanna make it /a text with dcmd.

How?

Thanks.
Reply


Messages In This Thread
OnPlayerText => OnPlayerCommandText - by Face9000 - 20.12.2010, 19:57
Re: OnPlayerText => OnPlayerCommandText - by Seven. - 20.12.2010, 20:02
Re: OnPlayerText => OnPlayerCommandText - by Face9000 - 20.12.2010, 20:04

Forum Jump:


Users browsing this thread: 1 Guest(s)