Problem with admin chat -
Face9000 - 20.12.2010
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.
Re: Problem with admin chat -
Mike_Peterson - 20.12.2010
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.
Re: Problem with admin chat -
Face9000 - 20.12.2010
No,i need to HIDE the @blablabla from the public chan.
I dont understand why it's showing...
Re: Problem with admin chat -
Mike_Peterson - 20.12.2010
-.- i meant: when u type @blablabla on the chat it will show: blablabla without @
haven't found the topic yet but maybe try strdel?
Re: Problem with admin chat -
Face9000 - 20.12.2010
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.
Re: Problem with admin chat -
blackwave - 20.12.2010
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;
}
Re: Problem with admin chat -
Mike_Peterson - 20.12.2010
@blackwave is that is what he wants he has no reason to call me dumb. i was thinking it was a way different thing.
Re: Problem with admin chat -
blackwave - 20.12.2010
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"..
Re: Problem with admin chat -
Face9000 - 20.12.2010
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
Re: Problem with admin chat -
blackwave - 20.12.2010
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