SA-MP Forums Archive
[HELP] Everyone on the server can read my /local... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Everyone on the server can read my /local... (/showthread.php?tid=79524)



[HELP] Everyone on the server can read my /local... - FreddeN - 28.05.2009

The title says it all... here is the script:

Код:
	if(!strcmp(cmdtext, "/local", true, 6))
	{
		new str[256], pname[256];
		GetPlayerName(playerid, pname, 256);
		format(str, 256, "(( Local Ooc: %s:%s ))", pname, cmdtext[6]);
		LimitGlobalChatRadius(20);
		SendClientMessageToAll(0xFFFFFFAA, str);
 		return 1;
	}
Why can everyone read it?


Re: [HELP] Everyone on the server can read my /local... - Puzi - 28.05.2009

Код:
SendClientMessageToAll
I think that maybe failing your script :P


Re: [HELP] Everyone on the server can read my /local... - BP13 - 28.05.2009

lol ^

Код:
	if(!strcmp(cmdtext, "/local", true, 6))
	{
		new str[256], pname[256];
		GetPlayerName(playerid, pname, 256);
		format(str, 256, "(( Local Ooc: %s:%s ))", pname, cmdtext[6]);
		LimitGlobalChatRadius(20);
		SendClientMessage(0xFFFFFFAA, str); [maybe SendClientMessage (playerid) or I donno I or the other]
 		return 1;
	}



Re: [HELP] Everyone on the server can read my /local... - Daren_Jacobson - 29.05.2009

this should do it.
pawn Код:
if(!strcmp(cmdtext, "/local", true, 6))
    {
        new str[256], pname[256];
        GetPlayerName(playerid, pname, 256);
        format(str, 256, "(( Local Ooc: %s:%s ))", pname, cmdtext[6]);
        LimitGlobalChatRadius(20);
        OnPlayerText(playerid, str);
        LimitGlobalChatRadius(999999);
        return 1;
    }