SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/10/2012, 07:08 AM   #1
necrobg3
Huge Clucker
 
necrobg3's Avatar
 
Join Date: Mar 2011
Location: Bulgaria
Posts: 219
Reputation: 8
Question Rcon HELP

Hey guys. Is it possible the rcon chat to be other color?

Example:
pawn Code:
SendRconCommand("say TEST");

And the text is white blue color. How to make the text yellow?
__________________
necrobg3 is offline   Reply With Quote
Old 03/10/2012, 07:37 AM   #2
XtremeR
Gangsta
 
XtremeR's Avatar
 
Join Date: Aug 2012
Location: Australia
Posts: 867
Reputation: 565
Default Re: Rcon HELP

here u go,
pawn Code:
public OnRconCommand(cmd[])
{
    if(strcmp(cmd, "say", true) == 0)
    {
        new string[256], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
        format(string,sizeof string,"*Admin %s:  %s",pName,string);
        SendClientMessageToAll(0xFFFF00AA,string);//yellow
    }
    return 1;
}
__________________
XtremeR is offline   Reply With Quote
Old 03/10/2012, 07:44 AM   #3
SupaVZ
Huge Clucker
 
SupaVZ's Avatar
 
Join Date: Apr 2012
Location: In the Graves
Posts: 245
Reputation: 38
Default Re: Rcon HELP

Ooo thanks for telling, i never could you can do that
SupaVZ is offline   Reply With Quote
Old 03/10/2012, 11:30 AM   #4
necrobg3
Huge Clucker
 
necrobg3's Avatar
 
Join Date: Mar 2011
Location: Bulgaria
Posts: 219
Reputation: 8
Default Re: Rcon HELP

Thanks, it was saying an error with the playerid but i just add new playerid; +REP for you.
__________________
necrobg3 is offline   Reply With Quote
Old 03/10/2012, 11:35 AM   #5
KingHual
Banned
 
Join Date: Jun 2010
Location: Bulgaria
Posts: 2,286
Reputation: 1389
Default Re: Rcon HELP

Quote:
Originally Posted by XtremeR View Post
here u go,
pawn Code:
public OnRconCommand(cmd[])
{
    if(strcmp(cmd, "say", true) == 0)
    {
        new string[256], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
        format(string,sizeof string,"*Admin %s:  %s",pName,string);
        SendClientMessageToAll(0xFFFF00AA,string);//yellow
    }
    return 1;
}
There's no playerid parameter in that callback. Also, what do you think would happen if you used it from the console or a remote access application?
KingHual is offline   Reply With Quote
Old 03/10/2012, 02:50 PM   #6
necrobg3
Huge Clucker
 
necrobg3's Avatar
 
Join Date: Mar 2011
Location: Bulgaria
Posts: 219
Reputation: 8
Default Re: Rcon HELP

Oh it isn't work when i type somethin it stay in blue color.
__________________
necrobg3 is offline   Reply With Quote
Old 03/10/2012, 02:57 PM   #7
Jarnu
Guest
 
Posts: n/a
Default Re: Rcon HELP

It says in blue color because you assigned it in blue ..
Change to
pawn Code:
public OnRconCommand(cmd[])
{
    if(strcmp(cmd, "say", true) == 0)
    {
        new string[128];
        format(string,sizeof string,"*RCON Admin:  %s",string);
        SendClientMessageToAll(0xFFFFFFFF,string); //------This line to edit to change color-------//
    }
    return 1;
}
For white.. ^^
else if its not the problem .. then Explain it properly!
  Reply With Quote
Old 03/10/2012, 05:30 PM   #8
necrobg3
Huge Clucker
 
necrobg3's Avatar
 
Join Date: Mar 2011
Location: Bulgaria
Posts: 219
Reputation: 8
Default Re: Rcon HELP

I work with defines so the command must be this:

pawn Code:
new string[128];
        format(string,sizeof string,"*RCON Admin:  %s",string);
        SendClientMessageToAll(COLOR_YELLOW,string);

Still don't see the problem.
__________________
necrobg3 is offline   Reply With Quote
Old 03/10/2012, 05:34 PM   #9
CmZxC
Huge Clucker
 
CmZxC's Avatar
 
Join Date: Apr 2011
Location: Notepad++ ; pawncc.exe
Posts: 373
Reputation: 35
Default Re: Rcon HELP

add return 0 after sendclientmessagetoall?
__________________
Boo-hoo.
CmZxC is offline   Reply With Quote
Old 04/10/2012, 10:23 AM   #10
necrobg3
Huge Clucker
 
necrobg3's Avatar
 
Join Date: Mar 2011
Location: Bulgaria
Posts: 219
Reputation: 8
Default Re: Rcon HELP

Nevermind i fixed it.
__________________
necrobg3 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] RCON-manager (control your server easier from RCON-console) Correlli Filterscripts 34 09/04/2015 08:28 PM
[FilterScript] [FS] SCON - RCON Replacement for anti-RCON hack Lazarus Filterscripts 24 23/10/2013 11:40 AM
RCON flood? Wrong RCON password = kick. Osviux Help Archive 3 04/05/2011 04:35 PM
[FilterScript] [R.P.S] Rcon Protection System (/rSenha) [/rcon login = kick] Diogo_Bras Lanšamentos/Releases 14 30/04/2011 03:57 PM


All times are GMT. The time now is 04:40 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.