13.08.2014, 01:16
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:
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;
}