/rcon say other text and new colour [HELP!]
#1

So, when I do /rcon say "blbablabla"

it'll say like Admin: blablalbla

But I want, when I type /rcon say, it'll show like
Admin (then my name(player's name)): and text what i've typed
e.g: Admin Jake_Roger: blablalbla
How to make that?
Of course, new color to be this: 0x66FF00

Thank you.
Reply
#2

Код:
CMD:say(playerid,params[])
{
  new adminid;
  if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
  if(sscanf(params,"u", adminid)) return SCM(playerid, RED, "Say something to all players: /say <text>");
  new s_name[MAX_PLAYER_NAME], s_msg[300];
  GetPlayerName(playerid, s_name,sizeof (s_name));
  format(s_msg,sizeof (s_msg),"* Administrator %s: %s",s_name, params);
  SCMA(RED, s_msg);
  AdminLogs(s_msg);
  return 1;
}
Reply
#3

pawn Код:
C:\Users\Ilic\Desktop\GoGoGo druga verzija\GoGoGo server\filterscripts\rconsay.pwn(238) : error 017: undefined symbol "SCM"
C:\Users\Ilic\Desktop\GoGoGo druga verzija\GoGoGo server\filterscripts\rconsay.pwn(239) : error 017: undefined symbol "sscanf"
C:\Users\Ilic\Desktop\GoGoGo druga verzija\GoGoGo server\filterscripts\rconsay.pwn(239) : error 017: undefined symbol "SCM"
C:\Users\Ilic\Desktop\GoGoGo druga verzija\GoGoGo server\filterscripts\rconsay.pwn(243) : error 017: undefined symbol "SCMA"
C:\Users\Ilic\Desktop\GoGoGo druga verzija\GoGoGo server\filterscripts\rconsay.pwn(244) : error 017: undefined symbol "AdminLogs"
C:\Users\Ilic\Desktop\GoGoGo druga verzija\GoGoGo server\filterscripts\rconsay.pwn(237) : warning 203: symbol is never used: "adminid"
How to fix it? and is this a ZCMD?
Reply
#4

Okay I've downloaded a sscanf got 3 folders:
Pawno/include/sscanf2.inc --> add it in include folder
Plugins sscanf.so sscanf.so ---> added to plugins folder and typed in server configuration --> plugins sscanf or sscanf.so?
And the third folder is: sscanf
In there, got one folder named SDK and others file .h .def and others, where I can put that?
also i typed #include <sscanf2>
Added this:
pawn Код:
CMD:say(playerid,params[])
{
  new adminid;
  if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
  if(sscanf(params,"u", adminid)) return SCM(playerid, RED, "Say something to all players: /say <text>");
  new s_name[MAX_PLAYER_NAME], s_msg[300];
  GetPlayerName(playerid, s_name,sizeof (s_name));
  format(s_msg,sizeof (s_msg),"* Administrator %s: %s",s_name, params);
  SCMA(RED, s_msg);
  AdminLogs(s_msg);
  return 1;
}
got this warning, help please:
pawn Код:
C:\Users\Ilic\Desktop\GoGoGo druga verzija\GoGoGo server\filterscripts\rconsay.pwn(247) : warning 203: symbol is never used: "say"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Reply
#5

Oh my God, sscanf

pawn Код:
if(strcmp(cmdtext, "/asay", true) == 0)
{
    if(!IsPlayerAdmin(playerid)) return 1;
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    new string[144];
    format(string, sizeof(string), "Admin %s: %s", PlayerName, cmdtext[6]);
    SendClientMessageToAll(0x66FF00FF, string);
    return 1;
}
Zcmd I think:
pawn Код:
CMD:say(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return 1;
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    new string[144];
    format(string, sizeof(string), "Admin %s: %s", PlayerName, params);
    SendClientMessageToAll(0x66FF00FF, string);
    return 1;
}
Reply
#6

Hey OKStyle, I got this error:
pawn Код:
C:\Users\Ilic\Desktop\GoGoGo druga verzija\GoGoGo server\gamemodes\rlg.pwn(2603) : error 035: argument type mismatch (argument 1)
Used this:
pawn Код:
if(strcmp(cmdtext, "/asay", true) == 0)
{
    if(!IsPlayerAdmin(playerid)) return 1;
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    new string[144];
    format(string, sizeof(string), "Admin %s: %s", PlayerName, cmdtext[6]);
    SendClientMessageToAll(string, 0x66FF00FF);
    return 1;
}
hmm?
Reply
#7

(string, 0x66FF00FF); switch positions: color - first, string - second Top post edited)
Reply
#8

Hey, no errors, no warnings, I came ingame typed first only /asay and I saw I didn't receive a message "Server: unknown command" but when i typed for example: /asay hi
it says SERVER:Unknown Command, why? What I have to fix?
Reply
#9

pawn Код:
#include <zcmd>
   
CMD:asay(playerid, params[]) {

    if (!isnull(params) && IsPlayerAdmin(playerid))
    {
        new szOutput[144], szPlayerName[24];
        GetPlayerName(playerid, szPlayerName, sizeof szPlayerName);
       
        format(szOutput, sizeof szOutput, "** Admin %s: %s **", szPlayerName, params);
        SendClientMessageToAll(0x66FF00FF, szOutput);
    }
    return 0;
}
You don't need sscanf and you need to be logged in RCON.
Reply
#10

Okay /rcon asay works, but the problem is,
it says [RCON]Message to Admins: [text here]
Admin Message: [text here] Sent!
So, does it mean i send this only to admins?
And the problem is, it's not working like "Admin (my name): text"
Any solution how to fix that?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)