SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 20/08/2012, 11:24 AM   #1
avivelkayam
Big Clucker
 
Join Date: Sep 2010
Posts: 75
Reputation: 4
Default Question | % BUG

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:

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;
}
avivelkayam is offline   Reply With Quote
Old 20/08/2012, 11:32 AM   #2
Vince
High-roller
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 4,888
Reputation: 1418
Default Re: Question | % BUG

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

Progress doesn't come from early risers — progress is made by lazy men looking for easier ways to do things.
Robert A. Heinlein
Vince is offline   Reply With Quote
Old 20/08/2012, 11:49 AM   #3
avivelkayam
Big Clucker
 
Join Date: Sep 2010
Posts: 75
Reputation: 4
Default Re: Question | % BUG

OK but why did they do it?
and you have way to fixed it?
avivelkayam is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Question] 1 very important question... Master_Gangster Help Archive 4 02/03/2011 07:36 PM
Question regarding playerid (noob question!) Mattjones17 Help Archive 5 27/10/2010 04:21 PM
Data type question.. (and mac address question) DarrenReeder Help Archive 2 21/10/2010 08:20 PM
[Question]Dialog Question eDz0r Help Archive 16 22/05/2010 03:03 PM
Hello all i got one question (very easy to answer J.I.C question) SAMPfan109 General 0 06/03/2010 04:43 PM


All times are GMT. The time now is 02:38 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.