Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*------------------------------------------------------------------------------
- ================================================================================
- --------------------------------------------------------------------------------
- F I X E R V O S • C A R A C T E R E S
- \____by Matnix____/
- Informations : Grâce à ce script vous pourrez désormais écrire vos texte en toute
- tranquillité. C'est à dire, comme vous l'aurez déjà remarqué en
- ajoutant des accents à votre texte vous avez des caractères un peu
- bizzard non.
- * FIX DES ACCENTS POUR LES FONCTIONS : - GameTextForPlayer
- - TextDrawCreate
- [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ C R E D I T S ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
- Matnix, Matnix, Matnix, Matnix, Matnix, Matnix, Matnix, Matnix, Matnix, Matnix,
- Kalcor, Kalcor, Kalcor, Kalcor, Kalcor, Kalcor, Kalcor, Kalcor, Kalcor, Kalcor.
- --------------------------------------------------------------------------------
- ================================================================================
- 192 = À - 199 = Ç - 200 = È - 201 = É - 202 = Ê - 203 = Ë- 207 =Ï - 217 = Ù
- 219 = Û - 220 = Ü - 224 = à - 226 = â - 231 = ç - 232 = è - 233 = é - 234 = ê
- 235 = ë - 238 = î - 239 = ï - 249 = ù - 250 = ú - 251 = û - 252 = ü - 253 = ý
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------*/
- #include <a_samp>
- new Text:Texte;
- /*------------------------------------------------------------------------------
- --------------------------------------------------------------------------------*/
- public OnGameModeInit()
- {
- // Exemple d'utilisation pour des TextDraw.
- new str[56];
- strcat(str,"À Ç È É Ê Ë Ï Ù", 56);
- fix_Caracter(str);
- Texte = TextDrawCreate(147.200088, 274.773284, str);
- TextDrawLetterSize(Texte, 0.210000, 1.256533);
- TextDrawAlignment(Texte, 1);
- TextDrawColor(Texte, -1);
- TextDrawSetShadow(Texte, 0);
- TextDrawSetOutline(Texte, 1);
- TextDrawBackgroundColor(Texte, 51);
- TextDrawFont(Texte, 1);
- return 1;
- }
- /*------------------------------------------------------------------------------
- --------------------------------------------------------------------------------*/
- public OnPlayerConnect(playerid)
- {
- // Exemple d'utilisation pour des GameText.
- new str[64];
- format(str, sizeof(str), "À Ç È É Ê Ë Ï Ù");
- GameTextForPlayer(playerid, str, 5000, 3);
- fix_Caracter(str);
- return 1;
- }
- /*------------------------------------------------------------------------------
- --------------------------------------------------------------------------------*/
- stock fix_Caracter(string[])
- {
- new coriginal[22] = {192, 199, 200, 201, 202, 203, 207, 217, 219, 220, 224, 226, 231, 232, 233, 234, 235, 238, 239, 249, 251, 252};
- new cconvertis[22] = {128, 133, 134, 135, 136, 137, 141, 146, 148, 149, 151, 153, 156, 157, 158, 159, 160, 163, 164, 169, 171, 172};
- new len = strlen(string);
- for (new i; i < len; i++)
- {
- for(new j;j < 22;j++)
- {
- if(string[i] == coriginal[j])
- {
- string[i] = cconvertis[j];
- break;
- }
- }
- }
- }
- /*------------------------------------------------------------------------------
- Voilà, merci de garder les crédits. Aller amusez-vous bien la communauté FR.
- -------------------------------------------------------------------------------*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement