15.02.2020, 20:02
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.
Thanks you.
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;