Can someone take a look at this?
#4

pawn Код:
command(noteplayer, playerid, params[])
{
    new pid;
    new note[128];
    new string[128];
   
    if( PlayerInfo[playerid][Admin] >= 1)
    {
        if(sscanf(params, "is[128]", pid, note)) //You forgot to add the "s" , and the [128] is the size
        {
            SendClientMessage(playerid, COLOUR_ORANGE, "Hint: /noteplayer (playerid) (note)");
            return 1;
        }
        if(!IsPlayerConnected(pid))
        {
            SendClientMessage(playerid, COLOUR_ORANGE, "That player ID is not connected.");
            return 1;
        }
        format(string, sizeof(string), "~r %s",note);
        GameTextForPlayer(pid, string , 10000, 0); //You use the string we formatted for the text
    }
    return 1;
}
Untested, but should work.
Reply


Messages In This Thread
Can someone take a look at this? - by cloudysky - 11.06.2011, 23:13
Re: Can someone take a look at this? - by ricardo178 - 11.06.2011, 23:25
Re: Can someone take a look at this? - by cloudysky - 12.06.2011, 10:57
Re: Can someone take a look at this? - by PrawkC - 12.06.2011, 11:02
Re: Can someone take a look at this? - by cloudysky - 12.06.2011, 11:14
Re: Can someone take a look at this? - by PrawkC - 12.06.2011, 12:11

Forum Jump:


Users browsing this thread: 1 Guest(s)