OnPlayerText For Rcon Admins Help Needed!
#1

Hello Guys,
I am a scripter but i got stuck in middle of one thing.I want that RCON Admins Should see when anyplayer types the
format :
[hour : minute : second] playername: text
Can anyone help i will +rep him
Only for rcon admins not for simple players
like
[18:12:20] Torus: Test
Which will only be seen by rcon admins and please help me with that Torus Should Be seen by its colour[players names color].

+rep
Reply
#2

amm Guys Srry For Double Post But Please Atleast Try to help me.
Reply
#3

It's not that difficult as it seems:

pawn Код:
public OnPlayerText(playerid, text[])
{
    new FinalMessage[128];
    new pname[24];
    new hour, minute, second;
    gettime(hour, minute, second); // If not works, check if you have the time include by compuphase
    GetPlayerName(playerid, pname, 24);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerAdmin(i))
        {
            format(FinalMessage, 128, "[%02d:%02d:%02d]%s: {FFFFFF}%s", hour, minute, second, pname, text);
        }
        else
        {
            format(FinalMessage, 128, "%s: {FFFFFF}%s", pname, text);
        }
        SendClientMessage(i, GetPlayerColor(playerid), FinalMessage);
    }
    return 0;
}
Untested but compiled
Reply
#4

Quote:
Originally Posted by [GF]Sasino97
Посмотреть сообщение
It's not that difficult as it seems:

pawn Код:
public OnPlayerText(playerid, text[])
{
    new FinalMessage[128];
    new pname[24];
    new hour, minute, second;
    gettime(hour, minute, second); // If not works, check if you have the time include by compuphase
    GetPlayerName(playerid, pname, 24);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerAdmin(i))
        {
            format(FinalMessage, 128, "[%02d:%02d:%02d]%s: {FFFFFF}%s", hour, minute, second, pname, text);
        }
        else
        {
            format(FinalMessage, 128, "%s: {FFFFFF}%s", pname, text);
        }
        SendClientMessage(i, GetPlayerColor(playerid), FinalMessage);
    }
    return 0;
}
Untested but compiled
helped +rep
Reply
#5

Quote:
Originally Posted by Torus
Посмотреть сообщение
helped +rep
U cant give rep under 50 posts
Reply
#6

Just so you know...anyone can type /timestamp to see timestamps on messages
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)