Duplicating OOC command..
#1

Okay, I found this /b command and edited it a little, but whenever someone speaks in /b it repeats the message several times.
code:
Quote:

CMD:b(playerid, params[])
{
if (isnull(params)) return SendClientMessage(playerid, -1, "{C0C0C0}USAGE: /b [message]");

new Float:X, Float:Y, Float:Z, String[128], pname[25];

GetPlayerPos(playerid, X, Y, Z);
GetPlayerName(playerid, pname, 25);

format(String, 128, "(( [%d] %s: %s ))", playerid, pname, params);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(String, 128, "(( [%d] {FF9900}%s:{C0C0C0} %s ))", playerid, pname, params);
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
ProxDetector(30.0, playerid, String, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
{
SendClientMessage(playerid, 0xC0C0C0FF, String);
}
}

return true;
}

Anyone know what's wrong?
Reply
#2

What you mean?

like

Код:
(( [0] Romel Rowan: test))
Romel_Rowan: test
Something like that?
if yes

then change the return of OnPlayerText to return 0;

pawn Код:
//Like this.

public OnPlayerText(playerid, text[])
{
    return 0;
}
Reply
#3

No, it's like:
(( [0] Romel Rowan: test))
(( [0] Romel Rowan: test))
(( [0] Romel Rowan: test))
(( [0] Romel Rowan: test))
(( [0] Romel Rowan: test))
(( [0] Romel Rowan: test))
(( [0] Romel Rowan: test))
(( [0] Romel Rowan: test))
and continues.
Reply
#4

Tried changing it to Return 1;
instead of Return True;?
Reply
#5

Your messages should be sent to the i variable, not playerid.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)