SA-MP Forums Archive
Duplicating OOC command.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Duplicating OOC command.. (/showthread.php?tid=402271)



Duplicating OOC command.. - HenrySunseri - 25.12.2012

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?


Re: Duplicating OOC command.. - JaKe Elite - 25.12.2012

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;
}



Re: Duplicating OOC command.. - HenrySunseri - 25.12.2012

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.


Re: Duplicating OOC command.. - FalconWingsX - 26.12.2012

Tried changing it to Return 1;
instead of Return True;?


Re: Duplicating OOC command.. - SuperViper - 26.12.2012

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