admin message
#1

I want to make a command like

/amsg [text]

And it will bind for his account until he log out or change it.

if players type /admins it will be like this

Uncle - Admin Level 6 - *The message

Uncle - Admin Level 6 - Use /report if you see a hacker


I know how to make the command for the message, but how to make the message appear in /admins?
Reply
#2

Not quite sure, but I think of creating a variable
Reply
#3

Something like this?

Код:
new amsg[MAX_PLAYERS][64];

CMD:/amsg(playerid, par[])
{
    new temp[64];
    if(sscanf(par, "s", temp)) return 1;
    format(amsg[playerid], 64, temp);
    SendClientMessage(playerid, 0xFFFFFFFF, "You have successfully changed your Admin text.");
    return 1;
}

CMD:admins(playerid, par[])
{ 
    new str[64];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        new name[32];
        if(IsPlayerAdmin(i))
        {
            GetPlayerName(i, name, 32);
            format(str, 64, " %s - Admin Level 6 - %s", name, amsg[i]);
            SendClientMessage(playerid, 0xFFFFFFFF, str);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)