SA-MP Forums Archive
Question | % BUG - 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: Question | % BUG (/showthread.php?tid=370519)



Question | % BUG - avivelkayam - 20.08.2012

Hello All!

this bug is if you send message with a % its replace with #
there is a way to fix this bug?

i tried to fix this bug by replace # in %
but than if you click # is replace with %

here is my code:

Код:
public OnPlayerText(playerid, text[])
{
	new string[150],String[130],string3[20];
	format(string, sizeof(string), text);
	if(strfind(text, "#", false) != -1)
	{
		for(new i; i<strlen(text); i++)
		{
			format(string3, sizeof(string3), text[i]);
			strdel(string3, 1, strlen(string3));
			if(!strcmp(string3, "#", false))
			{
				strdel(string, i, i+1);
				strins(string, "%", i);
			}
		}
 	}
	format(String, sizeof(String), "%s", string);
	SendPlayerMessageToAll(playerid, String);
	return 0;
}



Re: Question | % BUG - Vince - 20.08.2012

You know, the sign is probably filtered out for a reason. It's probably hard coded in the server/client.


Re: Question | % BUG - avivelkayam - 20.08.2012

OK but why did they do it?
and you have way to fixed it?