Bug chat
#1

Hi everyone, i'm having a little problem with my code.

When the string is less than 100 works ok, but when is more than 100 then send 2 messages like i want, but ignoring the format function, just 2 globals messages not ProxDetector.
Code:
                        format(string, sizeof(string), "%s dice: %s", PlayerName(playerid), text);
			while(string[t])
			{
				if(string[t] == '*' && string[t+1] != '*')
				{
				    if(l == 0){
						strdel(string,t,t+1);
						strins(string,"{7B49AA}",t);
					}
					else{
					    strdel(string,t,t+1);
						strins(string,"{FFFFFF}",t);
					}
					l++;
				}
				t++;
			}
			l=0;
			if(strlen(string) > 100){
   				strmid(Almac1,string,0,100);
	    		strmid(Almac2,string,100,200);
	    		ProxDetector(20.0, playerid, Almac1, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
	    		ProxDetector(20.0, playerid, Almac2, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
			}
			else{
				ProxDetector(20.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
			}
			return 0;
Thanks you.
Reply


Messages In This Thread
Bug chat - by Ghost112397 - 15.02.2020, 20:02
Re: Bug chat - by Davi52 - 15.02.2020, 21:22
Re: Bug chat - by Ghost112397 - 15.02.2020, 21:59
Re: Bug chat - by Calisthenics - 16.02.2020, 09:45

Forum Jump:


Users browsing this thread: 2 Guest(s)