20.08.2012, 11:24
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:
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; }