{"id":24626660,"url":"https://github.com/ziggi/rustext","last_synced_at":"2025-05-07T18:50:45.528Z","repository":{"id":145798061,"uuid":"68550497","full_name":"ziggi/rustext","owner":"ziggi","description":"Fix Russian text plugin for SA-MP: GameText's, TextDraw's and Menu's","archived":false,"fork":false,"pushed_at":"2024-05-04T10:49:03.000Z","size":89,"stargazers_count":15,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-04T11:37:50.019Z","etag":null,"topics":["cmake","cpp","crutch","gta","gtasa","hooks","plugin","sa-mp","samp","sanandreas"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ziggi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-18T22:23:48.000Z","updated_at":"2023-12-19T03:56:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"17e7795a-53da-406b-8d79-d32f363b8465","html_url":"https://github.com/ziggi/rustext","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziggi%2Frustext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziggi%2Frustext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziggi%2Frustext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziggi%2Frustext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziggi","download_url":"https://codeload.github.com/ziggi/rustext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235538065,"owners_count":19006075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cpp","crutch","gta","gtasa","hooks","plugin","sa-mp","samp","sanandreas"],"created_at":"2025-01-25T04:49:29.174Z","updated_at":"2025-01-25T04:49:29.756Z","avatar_url":"https://github.com/ziggi.png","language":"C++","readme":"# rustext\nFix Russian text plugin for SA-MP: GameText's, TextDraw's and Menu's. Default russifier type is SanLtd.\n\n# Usage\nJust add rustext[.so] in your **server.cfg** to **plugins** key. If you want to get additional functionality you should copy **rustext.inc** to your libraries directory and add `#include \"rustext\"` in your script.\n\n# Russifiers\nYou can download any of the usеd russifiers [here](https://mega.nz/#F!tVhlhDCT!FK1xFcBalTA0ySY_JsryMg).\n\n# Examples\nHere you can see how it works with SanLtd russifier:\n\n![sanltd](https://cloud.githubusercontent.com/assets/1020099/18914954/db9b4ade-8597-11e6-8d72-783cfd24fb99.png)\n\nHere you can see how it works with Ukraine localization:\n\n![ukraine](https://cloud.githubusercontent.com/assets/1020099/18914955/db9d95dc-8597-11e6-9c2b-6ae5cc05bc72.png)\n\n# Example of usage\nBase script for setting player russifier:\n```Pawn\n#include \u003ca_samp\u003e\n#include \u003crustext\u003e\n\nstatic\n\tTextRusTD[RussifierType];\n\nconst\n\tFloat:TEXT_BASE_X = 150.0,\n\tFloat:TEXT_BASE_Y = 150.0,\n\tTEXT_RUSSIFIERS_COUNT = 7; // only Russian localizations\n\npublic OnGameModeInit()\n{\n\tfor (new i; i \u003c TEXT_RUSSIFIERS_COUNT; i++) {\n\t\tTextRusTD[RussifierType:i] = _:TextDrawCreate(TEXT_BASE_X,\n\t\t                                              TEXT_BASE_Y + 15.0 * i,\n\t\t                                              \"Я могу прочитать этот текст, это мой русификатор\");\n\t\tTextDrawSetSelectable(Text:TextRusTD[RussifierType:i], 1);\n\t\tTextDrawTextSize(Text:TextRusTD[RussifierType:i], 600.0, 10.0);\n\t}\n\treturn 1;\n}\n\npublic OnPlayerSpawn(playerid)\n{\n\tfor (new i; i \u003c TEXT_RUSSIFIERS_COUNT; i++) {\n\t\tSetPlayerRussifierType(playerid, RussifierType:i);\n\t\tTextDrawShowForPlayer(playerid, Text:TextRusTD[RussifierType:i]);\n\t}\n\tSelectTextDraw(playerid, 0xAA3333FF);\n\treturn 1;\n}\n\npublic OnPlayerClickTextDraw(playerid, Text:clickedid)\n{\n\tfor (new i; i \u003c TEXT_RUSSIFIERS_COUNT; i++) {\n\t\tif (TextRusTD[RussifierType:i] == _:clickedid) {\n\t\t\tSetPlayerRussifierType(playerid, RussifierType:i);\n\t\t\tCancelSelectTextDraw(playerid);\n\t\t}\n\t\tTextDrawHideForPlayer(playerid, Text:TextRusTD[RussifierType:i]);\n\t}\n\treturn 0;\n}\n```\n\nOr you can use [russifier](https://github.com/Open-GTO/russifier) library for this.\n![russifier](https://user-images.githubusercontent.com/1020099/42131912-a08b08b8-7d15-11e8-93f6-aa0478d4b095.png)\n\n# Types\n\n```Pawn\nenum RussifierType {\n\tRussifierType_Disabled = -1,\n\tRussifierType_SanLtd = 0,\n\tRussifierType_OneC,\n\tRussifierType_Rush,\n\tRussifierType_Unknown1,\n\tRussifierType_Unknown2,\n\tRussifierType_Unknown3,\n\tRussifierType_MG,\n\tRussifierType_Community,\n\tRussifierType_Ukraininan,\n\tRussifierType_Hungarian,\n}\n```\n\n# Natives\n\n```Pawn\nnative GetRussifierVersion(version[], const size = sizeof(version));\nnative GetRussifierText(RussifierType:type, string[], string_return[], const size = sizeof(string_return));\n\nnative SetPlayerRussifierType(playerid, RussifierType:type);\nnative RussifierType:GetPlayerRussifierType(playerid);\n\nnative SetDefaultRussifierType(RussifierType:type);\nnative RussifierType:GetDefaultRussifierType();\n```\n\n# Build\n```bash\ngit clone https://github.com/ziggi/rustext.git\nmkdir build\ncd build\ncmake ..\nmake\n```\n\n# Build (Visual Studio)\n```bash\ncd FCNPC\nmkdir build\ncd build\ncmake .. -G \"Visual Studio 12\"\n```\n\n# Thanks\n\nBig thanks to [urShadow](https://github.com/urShadow) for [urmem](https://github.com/urShadow/urmem) and [Pawn.RakNet](https://github.com/urShadow/Pawn.RakNet) on which based rakserver hook code.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziggi%2Frustext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziggi%2Frustext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziggi%2Frustext/lists"}