Problem with admin chat
#1

Hi all,i've a big problem with the admin chat:

Here is the code:

pawn Код:
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;
    }
The problem is:

When a player ingame writes @text,the chat working,but in the irc echo is showing @text (At the pulic chan,in the IRC_ADMINCHANNEL it's working)

This is what appear in the main chan:

[8:12pm] <Bot1> [ID: 1] Testk: @BLA BLA BLA

This text doesnt need to show.

Thanks.
Reply
#2

You want to delete the @ infront of BLA BLA BLA so u get this:
before: @BLA BLA BLA
after: BLA BLA BLA
i've saw this on a topic :/ ill edit my post when i found it.
Reply
#3

No,i need to HIDE the @blablabla from the public chan.

I dont understand why it's showing...
Reply
#4

-.- i meant: when u type @blablabla on the chat it will show: blablabla without @
haven't found the topic yet but maybe try strdel?
Reply
#5

Facepalm.

Stop posting dumb answers.

I writed in the open topic what is my problem.

All working fine,i need to hide only @blabla from the public irc channel.
Reply
#6

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Facepalm.

Stop postind dumb answers.

I writed in the open topic what is my problem.

All working fine,i need to hide only @blabla from the public irc channel.
lol

pawn Код:
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);
            AdminCLog(string);
            return 0;
        }
    else return 0;
    }
Reply
#7

@blackwave is that is what he wants he has no reason to call me dumb. i was thinking it was a way different thing.
Reply
#8

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
@blackwave is that is what he wants he has no reason to call me dumb. i was thinking it was a way different thing.
Oh. Since it's return 0;, the '@' ain't showing up. About the IRC just need to remove the line that have to do with IRC ( as I did on the previous code ) x_x

Really there's no reason to call someone "dumb"..
Reply
#9

Quote:
Originally Posted by blackwave
Посмотреть сообщение
lol

pawn Код:
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);
            AdminCLog(string);
            return 0;
        }
    else return 0;
    }
LOL and now the admin chat ingame where show in the admin channel?Cuz i dont see any adminchan string to send the text.

You have deleted the adminchannel string,now text ingame doesnt appear in admin chan,lol.

Mike_Peterson i havent called u dumb,i DEFINIED "Dumb" your answers.


BTW Sorry.

#define dumbanswers

loll
Reply
#10

You didn't explain right what you want. Try that:
pawn Код:
if(text[0] == '@')
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(PlayerInfo[playerid][AdminLevel] > 2 && PlayerInfo[i][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]);
              SendClientMessage(i, COLOR_GREEN, string);
              AdminCLog(string);
              return 0;
            }
        }
             else return 0;
    }

Straight that you have more posts than me and knows less time, even though it means you had stayed here more time than me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)