Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- removeAccent(c) {
- static const ACCENTS[] = "ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž";
- static const NON_ACCENTS[] = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz";
- for (new i = strlen(ACCENTS) - 1; i >= 0; i--) {
- if (c == ACCENTS[i]) {
- c = NON_ACCENTS[i];
- break;
- }
- }
- return c;
- }
- strRemoveAccent(const source[], dest[], len = sizeof(dest)) {
- for (new i = len - 1; i >= 0; i--) {
- dest[i] = removeAccent(source[i]);
- }
- }
- SendClientMessageToAllAndroid(color, const text[]) {
- new strAccents[256];
- for(new x = 0, j = GetPlayerPoolSize(); x <= j; x++) {
- if(IsPlayerInAndroid(x)) {
- strRemoveAccent(text, strAccents);
- SendClientMessageAndroid(x, color, strAccents);
- }
- else {
- SendClientMessageAndroid(x, color, text);
- }
- }
- return 1;
- }
- SendClientMessageAndroid(playerid, color, const text[]) {
- new strAccents[256];
- if(IsPlayerInAndroid(playerid)) {
- strRemoveAccent(text, strAccents);
- SendClientMessage(playerid, color, strAccents);
- }
- else {
- SendClientMessage(playerid, color, text);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement