SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 03/11/2019, 02:35 PM   #1
ScriptHunter
Little Clucker
 
Join Date: Nov 2019
Posts: 1
Reputation: 3
Default FixChars Plugin

FixChars Plugin beta

This plugin fix some special characters in GameTexts, TextDraws and Menus. You don't need to update / recompile your scripts and modes, this plugin automatically applies the fixes when your scripts loading.

Currently supported characters:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Currently supported functions:
  • GameTextForAll
  • GameTextForPlayer
  • CreateMenu
  • SetMenuColumnHeader
  • AddMenuItem
  • TextDrawCreate
  • CreatePlayerTextDraw
  • TextDrawSetString
  • PlayerTextDrawSetString

Demonstrate:

https://imgur.com/a/vLUeoJ2

The idea based on these works:
Download
If you have any ideas or suggestions please leave a comment below.
ScriptHunter is offline   Reply With Quote
Old 03/11/2019, 06:37 PM   #2
BloodMaster
Banned
 
Join Date: Apr 2010
Posts: 87
Reputation: 13
Default Re: FixChars Plugin

Well done! Maybe you could add support for "č", "ć", "đ", "ž" and "š" characters aswell?
BloodMaster is offline   Reply With Quote
Old 04/11/2019, 12:17 AM   #3
Zorono
Huge Clucker
 
Join Date: Dec 2015
Location: Africa, Egypt, Alexandria
Posts: 345
Reputation: 30
Default Re: FixChars Plugin

Great Job dude,
please add support for samp-discordconnector plugin
and Client Messaging function similar to SendClientMessage

+repped
__________________
Zorono is offline   Reply With Quote
Old 04/11/2019, 12:29 AM   #4
Chavan
Big Clucker
 
Chavan's Avatar
 
Join Date: Sep 2019
Location: 127.0.0.1          Money: $89,222,732.00
Posts: 108
Reputation: 11
Default Re: FixChars Plugin

Thank you bro!

Does this plugin work on debian 9-10?
__________________
"No mude, nem se reinvente, apenas evolua."
"Don't change or reinvent yourself, just evolve."
Chavan is online now   Reply With Quote
Old 04/11/2019, 04:25 PM   #5
NichWell
Little Clucker
 
Join Date: May 2015
Posts: 29
Reputation: 0
Default Re: FixChars Plugin

https://forum.sa-mp.com/showthread.php?t=617345 - this top
NichWell is online now   Reply With Quote
Old 04/11/2019, 04:30 PM   #6
Chavan
Big Clucker
 
Chavan's Avatar
 
Join Date: Sep 2019
Location: 127.0.0.1          Money: $89,222,732.00
Posts: 108
Reputation: 11
Default Re: FixChars Plugin

The does not work.

He goes out like this
__________________
"No mude, nem se reinvente, apenas evolua."
"Don't change or reinvent yourself, just evolve."
Chavan is online now   Reply With Quote
Old 04/11/2019, 09:02 PM   #7
Marllun
Gangsta
 
Marllun's Avatar
 
Join Date: Oct 2016
Location: Brazil
Posts: 896
Reputation: 35
Question Re: FixChars Plugin

If this plugin is faster than looping to correct accents it's already worth


Code:
ConvertEncoding(string[])
{
    new
        szFixed[512],
        iPos,
        iLen;

    for (iLen = strlen(string); iPos < iLen; iPos ++) {
        switch (string[iPos])
        {
            case '':   szFixed[iPos] = 151;
            case '':   szFixed[iPos] = 152;
            case '':   szFixed[iPos] = 153;
            case '':   szFixed[iPos] = 154;
            case '':   szFixed[iPos] = 128;
            case '':   szFixed[iPos] = 129;
            case '':   szFixed[iPos] = 130;
            case '':   szFixed[iPos] = 131;
            case '':   szFixed[iPos] = 157;
            case '':   szFixed[iPos] = 158;
            case '':   szFixed[iPos] = 159;
            case '':   szFixed[iPos] = 160;
            case '':   szFixed[iPos] = 134;
            //case '':   szFixed[iPos] = 135;
            case '':   szFixed[iPos] = 136;
            case '':   szFixed[iPos] = 137;
            case '':   szFixed[iPos] = 161;
            case '':   szFixed[iPos] = 162;
            case '':   szFixed[iPos] = 163;
            case '':   szFixed[iPos] = 164;
            case '':   szFixed[iPos] = 138;
            case '':   szFixed[iPos] = 139;
            case '':   szFixed[iPos] = 140;
            case '':   szFixed[iPos] = 141;
            case '':   szFixed[iPos] = 165;
            case '':   szFixed[iPos] = 166;
            case '':   szFixed[iPos] = 167;
            case '':   szFixed[iPos] = 168;
            case '':   szFixed[iPos] = 142;
            case '':   szFixed[iPos] = 143;
            //case '':   szFixed[iPos] = 228;
            //case '':   szFixed[iPos] = 229;
            case '':   szFixed[iPos] = 144;
            case '':   szFixed[iPos] = 145;
            case '':   szFixed[iPos] = 169;
            case '':   szFixed[iPos] = 170;
            case '':   szFixed[iPos] = 171;
            case '':   szFixed[iPos] = 172;
            case '':   szFixed[iPos] = 146;
            case '':   szFixed[iPos] = 147;
            case '':   szFixed[iPos] = 148;
            case '':   szFixed[iPos] = 149;
            case '':   szFixed[iPos] = 174;
            case '':   szFixed[iPos] = 173;
            case '':   szFixed[iPos] = 64;
            case '':   szFixed[iPos] = 175;
            case '`':   szFixed[iPos] = 177;
            case '&':   szFixed[iPos] = 38;
            case '':   szFixed[iPos] = '';
            case '':   szFixed[iPos] = '';
            default:    szFixed[iPos] = string[iPos];
        }
    }
    format(string,512,szFixed);
    return 1;
}
__________________
Code:
Discord: Marllun#6297
Marllun is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos7 - Streamer plugin and crashdetect plugin Su37Erich Server Support 3 12/08/2016 01:18 AM
[MySQL] From StickenKid's plugin to BlueG's plugin jessejanssen Scripting Help 2 15/06/2014 02:20 AM
Audio Plugin..... Image Plugin? TiNcH010 Scripting Help 2 14/12/2012 01:59 AM
mysql plugin. loading plugin failed ikkentim Help Archive 2 10/02/2011 03:32 PM


All times are GMT. The time now is 11:17 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.