Skip to content

Commit ac4eec7

Browse files
committed
Upload
1 parent 0591121 commit ac4eec7

File tree

7 files changed

+486
-0
lines changed

7 files changed

+486
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pwn linguist-language=Pawn
2+
*.inc linguist-language=Pawn

.gitignore

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#
2+
# Package only files
3+
#
4+
5+
# Compiled Bytecode, precompiled output and assembly
6+
*.amx
7+
*.lst
8+
*.asm
9+
10+
# Vendor directory for dependencies
11+
dependencies/
12+
13+
# Dependency versions lockfile
14+
pawn.lock
15+
16+
17+
#
18+
# Server/gamemode related files
19+
#
20+
21+
# compiled settings file
22+
# keep `samp.json` file on version control
23+
# but make sure the `rcon_password` field is set externally
24+
# you can use the environment variable `SAMP_RCON_PASSWORD` to do this.
25+
server.cfg
26+
27+
# Plugins directory
28+
plugins/
29+
30+
# binaries
31+
*.exe
32+
*.dll
33+
*.so
34+
announce
35+
samp03svr
36+
samp-npc
37+
38+
# logs
39+
logs/
40+
server_log.txt
41+
crashinfo.txt
42+
43+
#
44+
# Common files
45+
#
46+
47+
*.sublime-workspace

.vscode/tasks.json

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build only",
6+
"type": "shell",
7+
"command": "sampctl package build",
8+
"group": {
9+
"kind": "build",
10+
"isDefault": true
11+
},
12+
"isBackground": false,
13+
"presentation": {
14+
"reveal": "silent",
15+
"panel": "dedicated"
16+
},
17+
"problemMatcher": "$sampctl"
18+
},
19+
{
20+
"label": "build watcher",
21+
"type": "shell",
22+
"command": "sampctl package build --watch",
23+
"group": "build",
24+
"isBackground": true,
25+
"presentation": {
26+
"reveal": "silent",
27+
"panel": "dedicated"
28+
},
29+
"problemMatcher": "$sampctl"
30+
},
31+
{
32+
"label": "run tests",
33+
"type": "shell",
34+
"command": "sampctl package run",
35+
"group": {
36+
"kind": "test",
37+
"isDefault": true
38+
},
39+
"isBackground": true,
40+
"presentation": {
41+
"reveal": "silent",
42+
"panel": "dedicated"
43+
},
44+
"problemMatcher": "$sampctl"
45+
},
46+
{
47+
"label": "run tests watcher",
48+
"type": "shell",
49+
"command": "sampctl package run --watch",
50+
"group": "test",
51+
"isBackground": true,
52+
"presentation": {
53+
"reveal": "silent",
54+
"panel": "dedicated"
55+
},
56+
"problemMatcher": "$sampctl"
57+
}
58+
]
59+
}

README.md

+60
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,62 @@
11
# russifier
22
Russifer settings TextDraw window
3+
4+
# Dependencies
5+
- [rustext](https://github.com/Open-GTO/rustext)
6+
7+
# Screenshot
8+
9+
![russifier](https://user-images.githubusercontent.com/1020099/42131621-c1bde476-7d0e-11e8-821c-595a6a7a5f32.png)
10+
11+
# Usage
12+
13+
```Pawn
14+
#include <a_samp>
15+
#include "russifier"
16+
17+
public OnPlayerCommandText(playerid, cmdtext[])
18+
{
19+
if (!strcmp(cmdtext, "/russifier", true, 10)) {
20+
ShowPlayerRussifierSettings(playerid);
21+
return 1;
22+
}
23+
return 0;
24+
}
25+
26+
public OnPlayerRussifierSelect(playerid, bool:changed, RussifierType:type)
27+
{
28+
new string[144];
29+
format(string, sizeof(string), "changed = %d | type = %d", _:changed, _:type);
30+
SendClientMessage(playerid, -1, string);
31+
return 1;
32+
}
33+
```
34+
35+
# Functions
36+
37+
```Pawn
38+
ShowPlayerRussifierSettings(playerid);
39+
HidePlayerRussifierSettings(playerid);
40+
Russifier_SetText(string[]);
41+
```
42+
43+
# Callbacks
44+
45+
```Pawn
46+
forward OnPlayerRussifierSelect(playerid, bool:changed, RussifierType:type);
47+
```
48+
49+
# Directives
50+
51+
Directive | Default value | Can be redefined
52+
----------|---------------|-----------------
53+
RUSSIFIER_TEXT_BASE_X | 130.0 | yes
54+
RUSSIFIER_TEXT_BASE_Y | 200.0 | yes
55+
RUSSIFIER_TEXT_Y_STEP | 19.0 | yes
56+
RUSSIFIER_TEXT_SIZE_X | 505.0 | yes
57+
RUSSIFIER_TEXT_SIZE_Y | 15.0 | yes
58+
RUSSIFIER_SELECT_COLOR | 0xAA3333FF | yes
59+
RUSSIFIER_BACKGROUND_PADDING | 5.0 | yes
60+
RUSSIFIER_TEXT_LETTER_SIZE_X | 0.4 | yes
61+
RUSSIFIER_TEXT_LETTER_SIZE_Y | RUSSIFIER_TEXT_SIZE_Y / 10.0 | yes
62+
RUSSIFIER_TEXT_LENGTH | 60 | yes

pawn.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"user": "ziggi",
3+
"repo": "russifier",
4+
"entry": "test.pwn",
5+
"output": "test.amx",
6+
"dependencies": [
7+
"sampctl/samp-stdlib",
8+
"Open-GTO/rustext",
9+
"ziggi/rustext"
10+
],
11+
"runtime": {
12+
"version": "0.3.7",
13+
"mode": "server",
14+
"rcon_password": "password",
15+
"port": 7777
16+
}
17+
}

0 commit comments

Comments
 (0)