#3

Quote:
Originally Posted by antonisrodos94
Посмотреть сообщение
i need commant /ask and type and go message admin can help me?
You could do like this, if you want a player to have ability to send a message to admins:-

pawn Код:
COMMAND:ask(playerid, params[])
{
    new Fstring[164], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(sscanf(params, "s[128]", Fstring))
    {
        SendClientMessage(playerid,  -1, "ERROR: Usage /ask [message]");
        return 1;
    }
    else
    {
        for(new f = 0; f < MAX_PLAYERS; f++)
        {
            if(IsPlayerConnected(f))
            {
                if(IsPlayerAdmin(f)) // you could change into your own admin system
                {
                    format(Fstring, sizeof(Fstring), "(PM TO ADMINS) %s: %s ", name, Fstring);
                    SendClientMessage(f, -1, Fstring);
                }
            }
        }
    }
    return 1;
}
Give it a try and tell me if it works.

-FalconX
Reply


Messages In This Thread
/ask - by antonisrodos94 - 30.04.2012, 14:21
Re: /ask - by Mean - 30.04.2012, 14:48
Re: /ask - by FalconX - 30.04.2012, 14:50
Re: /ask - by antonisrodos94 - 30.04.2012, 14:57
Re: /ask - by Mean - 30.04.2012, 15:03
Re: /ask - by antonisrodos94 - 30.04.2012, 15:12
Re: /ask - by Mark™ - 30.04.2012, 15:14
Re: /ask - by newbienoob - 30.04.2012, 15:15
Re: /ask - by antonisrodos94 - 30.04.2012, 15:17
Re: /ask - by Mean - 30.04.2012, 15:24

Forum Jump:


Users browsing this thread: 1 Guest(s)