Filter signs in textboxes
#1

Is there any option to filter out '~' signs of textboxes, but allow colors '~r~,~y~,...'?
Reply
#2

just search for them

than check if the cell after the next cell is another '~'

If thats the case it would be a color code

At least we check if the letter between is a valid one

If not you can delete everything

Same goes if there is no second '~'
Reply
#3

what about colors like ~triangle~ that isn't a real choice but once upon a time gave fun results.
Reply
#4

Код:
	
	for(new Position;Position < strlen(Text);Position++)
	{
	    if(Text[Position] == '~')
	    {
	        if(Text[Position + 2] != EOS && Text[Position + 2] != '~')
			{
				Text[Position] = '-';
			}
	    }
	}
I made this piece of code, but unfortunately when I enter "~" in textdraw the client game crashes.
BTW: Is there any other signs that makes bug in textdraws or dialogs?
Reply
#5

Quote:
Originally Posted by Killer#Mummy
Посмотреть сообщение
Код:
	
	for(new Position;Position < strlen(Text);Position++)
	{
	    if(Text[Position] == '~')
	    {
	        if(Text[Position + 2] != EOS && Text[Position + 2] != '~')
			{
				Text[Position] = '-';
			}
	    }
	}
I made this piece of code, but unfortunately when I enter "~" in textdraw the client game crashes.
BTW: Is there any other signs that makes bug in textdraws or dialogs?
Here you go , these are some that crash. only some , not all of them.

pawn Код:
if(strfind(params,":")!= -1 || strfind(params,"?")!= -1 || strfind(params,"<")!= -1 ||
       strfind(params,"|")!= -1 || strfind(params,"\\")!= -1 || strfind(params,"*") != -1 || strfind(params,"\"")!= -1 ||
       strfind(params,">")!= -1)
from my gm.

They have been tested, you can change it however you want like just copying them and not using my check.
I don't mind.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)