Help me, /ask command
#2

using ZCMD & Scannf
pawn Код:
COMMAND:ask(playerid, params[])
{
    new String[256];if(sscanf(params,"s", String)) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/Ask "WHITE"[Message]");
    new SenderName[MAX_PLAYER_NAME];GetPlayerName(playerid, SenderName, sizeof(SenderName));
    SendClientMessage(playerid, COLOR_WHITE, "Ask Message Was "GREEN"Send "WHITE"To Admins.");
    new string[128];format(string,sizeof(string),""BLUE"\"%s\" (%d) "WHITE"Has Asked a Qustion"WHITE" Question:",SenderName,playerid);
    for(new i=0;i<MAX_PLAYERS;i++)//lopp all players
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][PlayerAdmin] >= 1)//if player is admin(this is mREG admin check)
        {
            SendClientMessage(i,-1,string);
            SendClientMessage(i,COLOR_BLUE,String);//send message to the admins
        }
    }
    return 1;
}
:NOTE: You need to edit the color embeddings and the admin check
Reply


Messages In This Thread
Help me, /ask command - by Goldino - 19.11.2012, 17:04
Re: Help me, /ask command - by park4bmx - 19.11.2012, 17:12
Re: Help me, /ask command - by d0nTtoucH - 23.08.2013, 23:38
Re: Help me, /ask command - by bensmart469 - 24.08.2013, 00:13

Forum Jump:


Users browsing this thread: 1 Guest(s)