#2

Using zcmd, and sscanf
pawn Код:
CMD:ask(playerid, params[])
{
    new string[128], pname[24];
    if(!sscanf(params,"s[128]",string))
    {
        GetPlayerName(playerid, pname, 24);
        format(string,128,"[ASK] %s is asking: %s",pname,string);
        for(new i=0;i<MAX_PLAYERS;i++)
        {
            if(IsPlayerAdmin(i)) SendClientMessage(i, -1, string);
        }
    }
    else SendClientMessage(playerid, 0xFF0000AA, "Usage: /ASK [Message]");
}
Reply


Messages In This Thread
/ask - by DerickClark - 10.01.2013, 02:13
Re: /ask - by mastermax7777 - 10.01.2013, 03:16
Re: /ask - by DerickClark - 10.01.2013, 03:49
Re: /ask - by Skyrise - 10.01.2013, 03:56
Re: /ask - by ThePhenix - 10.01.2013, 04:04
Re: /ask - by Skyrise - 10.01.2013, 04:06
Re: /ask - by ThePhenix - 10.01.2013, 04:16
Re: /ask - by DerickClark - 10.01.2013, 04:24
Re: /ask - by Skyrise - 10.01.2013, 04:43

Forum Jump:


Users browsing this thread: 2 Guest(s)