OnPlayerText For Rcon Admins Help Needed! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerText For Rcon Admins Help Needed! (
/showthread.php?tid=333999)
OnPlayerText For Rcon Admins Help Needed! -
Torus - 13.04.2012
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
Re: OnPlayerText For Rcon Admins Help Needed! -
Torus - 13.04.2012
amm Guys Srry For Double Post But Please Atleast Try to help me.
Re: OnPlayerText For Rcon Admins Help Needed! -
Sasino97 - 13.04.2012
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
Re: OnPlayerText For Rcon Admins Help Needed! -
Torus - 13.04.2012
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
Re: OnPlayerText For Rcon Admins Help Needed! -
JAMMIEISFTW - 02.05.2012
Quote:
Originally Posted by Torus
helped +rep
|
U cant give rep under 50 posts
Re: OnPlayerText For Rcon Admins Help Needed! -
[ABK]Antonio - 02.05.2012
Just so you know...anyone can type /timestamp to see timestamps on messages