59
59
Text: TD_Background = Text: INVALID_TEXT_DRAW,
60
60
Text: TD_Text[RussifierType] = {INVALID_TEXT_DRAW, ...},
61
61
bool: IsSettingsShowed[MAX_PLAYERS char ],
62
- RussifierType: gPlayerRussifier[MAX_PLAYERS char ],
63
62
gSettingsText[RUSSIFIER_TEXT_LENGTH char ] = ! " ß ìîãó ïðî÷èòàòü ýòîò òåêñò, ýòî ìîé ðóñèôèêàòîð" ;
64
63
65
64
const
@@ -208,8 +207,8 @@ public OnPlayerClickTextDraw(playerid, Text:clickedid)
208
207
209
208
for (new RussifierType: type; type < TEXT_RUSSIFIERS_COUNT; type++ ) {
210
209
if (TD_Text[type] == clickedid) {
211
- gPlayerRussifier{playerid} = type;
212
210
HidePlayerRussifierSettings (playerid);
211
+ SetPlayerRussifierType (playerid, type);
213
212
CallLocalFunction (" OnPlayerRussifierSelect" , " iii" , playerid, true , _: type);
214
213
return 1 ;
215
214
}
@@ -259,14 +258,16 @@ stock ShowPlayerRussifierSettings(playerid)
259
258
return 0 ;
260
259
}
261
260
262
- gPlayerRussifier{playerid} = GetPlayerRussifierType (playerid);
261
+ new RussifierType: current_russifier = GetPlayerRussifierType (playerid);
263
262
264
263
for (new RussifierType: type; type < TEXT_RUSSIFIERS_COUNT; type++ ) {
265
264
SetPlayerRussifierType (playerid, type);
266
265
TextDrawShowForPlayer (playerid, TD_Text[type]);
267
266
TextDrawShowForPlayer (playerid, TD_Background);
268
267
}
269
268
269
+ SetPlayerRussifierType (playerid, current_russifier);
270
+
270
271
SelectTextDraw (playerid, RUSSIFIER_SELECT_COLOR);
271
272
IsSettingsShowed{playerid} = true ;
272
273
return 1 ;
@@ -278,8 +279,6 @@ stock HidePlayerRussifierSettings(playerid)
278
279
return 0 ;
279
280
}
280
281
281
- SetPlayerRussifierType (playerid, gPlayerRussifier{playerid});
282
-
283
282
for (new RussifierType: type; type < TEXT_RUSSIFIERS_COUNT; type++ ) {
284
283
TextDrawHideForPlayer (playerid, TD_Text[type]);
285
284
TextDrawHideForPlayer (playerid, TD_Background);
0 commit comments