Warnings and script don't work
#4

Try removing return 0; in the loop and replace it with break;

And why are you making it really complicated?
You're making /me send a local message right?
If so, just use GetPlayerPos and IsPlayerInRangeOfPoint in a loop.

And just like Mionee said, you should start using zcmd.
https://sampforum.blast.hk/showthread.php?tid=91354

If you started using it, use this instead:
pawn Код:
CMD:me(playerid, params[])
{
    if (isnull(params)) // Checking if params is null (params = text after the command)
        return SendClientMessage(playerid, -1, "USAGE: /me [text]");
       
    new Float:x, Float:y, Float:z, name[24], string[128];
    GetPlayerPos(playerid, x, y, z);
    GetPlayerName(playerid, name, sizeof (name));
    format(string, sizeof (string), "* %s %s", name, params); // Just like I said before, params = text after the command
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            if (IsPlayerInRangeOfPoint(i, 16, x, y, z))
            {
                SendClientMessage(playerid, -1, string);
            }
        }
        break;
    }
    return 1;
}
Reply


Messages In This Thread
Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 00:35
Re: Warnings and script don't work - by Dignity - 13.08.2014, 00:42
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 00:54
Re: Warnings and script don't work - by Stinged - 13.08.2014, 01:16
Re: Warnings and script don't work - by Dignity - 13.08.2014, 01:28
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 01:41
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 02:04
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 02:58
Re: Warnings and script don't work - by Dignity - 13.08.2014, 03:02
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 03:48

Forum Jump:


Users browsing this thread: 2 Guest(s)