Whisper problem
#7

As I do not have your color codes, I cannot compile; but other than that, every thing seems to be in working order. Oh, and I made your command faster by destroying the need for a whole different function..

pawn Код:
CMD:whisper(playerid, params[])
{
    new
        TextSent[128],
        Float:P[3],
        p_Name[MAX_PLAYER_NAME]
    ;
   
    if(sscanf(params, "s[128]", TextSent)) //Did they type the correct syntax? If not, this is called.
        return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: {FFFFFF}/w [message]");
       
    //Correct syntax below.
   
    GetPlayerPos(playerid, P[0], P[1], P[2]);
    GetPlayerName(playerid, p_Name, 24);
   
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, 10, P[0], P[1], P[2]))
        {
            new
                whisstring[128]
            ;
           
            SetPlayerChatBubble(playerid, params, COLOR_ORANGE, 10.0, 10000);
           
            format(whisstring, sizeof(whisstring), "%s whispered: %s", p_Name, TextSent);
            SendClientMessage(i, COLOR_ORANGE, whisstring);
            return 1;
        }
        else return SendClientMessage(playerid, COLOR_SILVER, "You are to far from that person.");
    }
    return 1;
}
Reply


Messages In This Thread
Whisper problem - by Bogdan1992 - 16.01.2012, 16:55
Re: Whisper problem - by rinori - 16.01.2012, 19:16
Re: Whisper problem - by Bogdan1992 - 16.01.2012, 20:26
Re: Whisper problem - by Tanush123 - 16.01.2012, 21:24
Re: Whisper problem - by Bogdan1992 - 16.01.2012, 21:36
Re: Whisper problem - by Tanush123 - 17.01.2012, 00:51
Re: Whisper problem - by 2KY - 17.01.2012, 01:17

Forum Jump:


Users browsing this thread: 3 Guest(s)