[Help] Admin Message
#1

Alright, so, a nice guy from this forum made me this CMD, but now I want to improve it a bit but I don't have the knowledge for that, could you help me out, pros?

pawn Код:
CMD:am(playerid, params[])
{
    new ToAdminsText[128], TargetID, MessageToAdmins[152], PlayerName[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][pAdmin] < 1 && sscanf(params, "s[128]", ToAdminsText)) return SendClientMessage(playerid, -1, "USAGE: /am [text]");
    if(PlayerInfo[playerid][pAdmin] > 0 && sscanf(params, "rs[128]",TargetID, ToAdminsText)) return SendClientMessage(playerid, -1, "USAGE: /am [id] [text]");
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    format(MessageToAdmins, sizeof(MessageToAdmins), "Admin Message from %s (ID: %d): %s", PlayerName, playerid, ToAdminsText);
    if(PlayerInfo[playerid][pAdmin] < 1)
    {
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
            if(PlayerInfo[i][pAdmin] > 0) SendClientMessage(i, -1, MessageToAdmins);
        }
    }
    else SendClientMessage(TargetID, COLOR_GREEN, MessageToAdmins);
    return 1;
}
I want it that when a player sends a message to admins a message returns to him like: Your message, ( what he typed), was sent to administrators. And that when an admin sends a message to a player all admins see something like this: Admin Message to %s (ID: %d): (message that he sent) from (admin that send the message). Could you help me out, please?
Reply


Messages In This Thread
[Help] Admin Message - by DuarteCambra - 26.04.2013, 19:11
Re: [Help] Admin Message - by DobbysGamertag - 26.04.2013, 20:24
Re: [Help] Admin Message - by DuarteCambra - 26.04.2013, 20:26
Re: [Help] Admin Message - by RVRP - 26.04.2013, 20:40
Re: [Help] Admin Message - by DuarteCambra - 26.04.2013, 21:01
Re: [Help] Admin Message - by RVRP - 26.04.2013, 21:03
Re: [Help] Admin Message - by DuarteCambra - 26.04.2013, 21:10

Forum Jump:


Users browsing this thread: 1 Guest(s)