Say command
#8

After I tested the command a little bit more, I found that when typing /say Hi. It would display to the other person but it wouldn't display to the player whom wrote it. So I added this
PHP код:
CMD:say(playeridparams[])
{
    if (
isnull(params)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /s [Action]");
    new 
FloatxFloatyFloatzstring[145], count;
    
GetPlayerPos(playeridxyz);
    
GetPlayerName(playeridstring24);
    
format(stringsizeof(string), "*%s says\58 \34%s\34"stringparams);
    for (new 
iGetPlayerPoolSize(); <= ji++) // for (new i; i < MAX_PLAYERS; i++) if you don't use 0.3.7
    
{
        if (
== playerid)    continue;
        if (!
IsPlayerConnected(i))
            continue;
        if (
IsPlayerInRangeOfPoint(i25.0xyz))
        {
            
SendClientMessage(iCOLOR_LIGHTBLUEstring);
            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
            
count++;
        }
    }
    if (!
countSendClientMessage(playeridCOLOR_SILVER"You spoke but nobody heard you...");
    return 
1;

But when I am around more than 1 person, it displays whatever has been said twice.
Reply


Messages In This Thread
Say command - by Tass007 - 17.07.2016, 11:17
Re: Say command - by oMa37 - 17.07.2016, 11:58
Re: Say command - by TaiRinsuru - 17.07.2016, 12:00
Re: Say command - by Stinged - 17.07.2016, 12:14
Re: Say command - by Tass007 - 18.07.2016, 04:52
Re: Say command - by Stinged - 18.07.2016, 08:55
Re: Say command - by Tass007 - 18.07.2016, 10:41
Re: Say command - by Tass007 - 20.07.2016, 02:09
Re: Say command - by Sew_Sumi - 20.07.2016, 03:20
Re: Say command - by Tass007 - 20.07.2016, 04:17

Forum Jump:


Users browsing this thread: 1 Guest(s)