The problem with textdraws
#1

Good day.
That's the problem I have:
When on-line more than 5-6 players, lost some textdraws.

How do I fix this problem?
Reply
#2

In what way you are defining these Textdraws?, the problem could be a function of maximum Textdraws..
Reply
#3

Show us the Codes So we Can Help you.
Reply
#4

Quote:
Originally Posted by GGW
Посмотреть сообщение
Show us the Codes So we Can Help you.
Textdraws in includes.
Reply
#5

In OnPlayerConnect:
Quote:

#include <a_samp>
#include <streamer>
#pragma tabsize 0
//================================================== ============================!
SpeedoText[playerid] = TextDrawCreate(180.000, 362.000," ");
TextDrawAlignment(SpeedoText[playerid], 1);
TextDrawFont(SpeedoText[playerid],2);
TextDrawLetterSize(SpeedoText[playerid], 0.310, 1.400);
TextDrawSetShadow(SpeedoText[playerid],0);
TextDrawUseBox(SpeedoText[playerid], 1);
TextDrawBoxColor(SpeedoText[playerid], 0x99);
TextDrawTextSize(SpeedoText[playerid], 520.000, 0.000);
//================================================== ============================!
Foto[playerid] = TextDrawCreate(-20.000000,2.000000,"|");
TextDrawUseBox(Foto[playerid],1);
TextDrawBoxColor(Foto[playerid],0xFFFFFF69);
TextDrawTextSize(Foto[playerid],660.000000,22.000000);
TextDrawAlignment(Foto[playerid],0);
TextDrawBackgroundColor(Foto[playerid],0xFFFFFF69);
TextDrawFont(Foto[playerid],3);
TextDrawLetterSize(Foto[playerid],1.000000,52.200000);
TextDrawColor(Foto[playerid],0xFFFFFF69);
TextDrawSetOutline(Foto[playerid],1);
TextDrawSetProportional(Foto[playerid],1);
TextDrawSetShadow(Foto[playerid],1);
//Районы============================================ ============================!
TDZona[playerid] = TextDrawCreate(10.000000, 427.000000, "-");
TextDrawBackgroundColor(TDZona[playerid], 1182971135);
TextDrawFont(TDZona[playerid], 1);
TextDrawLetterSize(TDZona[playerid], 0.500000, 1.600000);
TextDrawColor(TDZona[playerid], -520093697);
TextDrawSetOutline(TDZona[playerid], 1);
TextDrawSetProportional(TDZona[playerid], 1);
//ДМ зоны============================================== =========================
NODMZONE[playerid] = TextDrawCreate(520.000000, 100.000000, "~r~NO-DM ~w~ZONE");
TextDrawLetterSize(NODMZONE[playerid], 0.400000, 0.900000);
TextDrawFont(NODMZONE[playerid], 3);
TextDrawSetProportional(NODMZONE[playerid], 1);
//================================================== ============================
job_td[playerid] = TextDrawCreate(12.181549, 223.999908, "Mycop: 23~n~рублей: 203");
TextDrawLetterSize(job_td[playerid], 0.449999, 1.600000);
TextDrawAlignment(job_td[playerid], 1);
TextDrawColor(job_td[playerid], 0xCECFCEFF);
TextDrawSetShadow(job_td[playerid], 0);
TextDrawSetOutline(job_td[playerid], 1);
TextDrawBackgroundColor(job_td[playerid], 51);
TextDrawFont(job_td[playerid], 3);
TextDrawSetProportional(job_td[playerid], 1);

In OnGameModeInit:
Quote:

#include <a_samp>
#include <streamer>
#pragma tabsize 0
//================================================== ============================
HELPGTACRMP = TextDrawCreate(88.000000, 310.000000, "HGC RolePlay");
TextDrawAlignment(HELPGTACRMP, 2);
TextDrawBackgroundColor(HELPGTACRMP, 255);
TextDrawFont(HELPGTACRMP, 2);
TextDrawLetterSize(HELPGTACRMP, 0.250000, 1.300000);
TextDrawColor(HELPGTACRMP, -5963521);
TextDrawSetOutline(HELPGTACRMP, 1);
TextDrawSetProportional(HELPGTACRMP, 1);
TextDrawTextSize(HELPGTACRMP, 137.000000, 112.000000);
//================================================== ============================
RolePlay = TextDrawCreate(73.000000, 317.000000, "vk.com/hgcrp");
TextDrawLetterSize(RolePlay, 0.322889, 1.425777);
TextDrawAlignment(RolePlay, 1);
TextDrawColor(RolePlay, -1);
TextDrawSetShadow(RolePlay, 0);
TextDrawSetOutline(RolePlay, 1);
TextDrawBackgroundColor(RolePlay, 255);
TextDrawFont(RolePlay, 1);
TextDrawSetProportional(RolePlay, 1);
//================================================== ============================
Textdraw0 = TextDrawCreate(650.000000, 80.000000, "asd");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.800000, -16.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 255);
TextDrawTextSize(Textdraw0, -50.000000, 0.000000);
//================================================== ============================
Textdraw1 = TextDrawCreate(650.000000, 524.000000, "asd");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.800000, -16.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 255);
TextDrawTextSize(Textdraw1, -50.000000, 0.000000);
//================================================== ============================
Textdraw2 = TextDrawCreate(6.000000, 391.000000, "Добро пожаловать в город Южный. Здесь вы начнёте свою жизнь на сервере.");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
//================================================== ============================
Textdraw3 = TextDrawCreate(5.000000, 405.000000, "Это ваш шанс найти новых друзей, зарабатывать деньги и т.п.");
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);
//================================================== ============================
Textdraw4 = TextDrawCreate(6.000000, 419.000000, "Всё, что вы ищите, вы найдёте именно здесь.");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 0);
TextDrawSetProportional(Textdraw4, 1);
TextDrawSetShadow(Textdraw4, 1);
//================================================== ============================
Textdraw9 = TextDrawCreate(6.000000, 391.000000, "Если поискать, то можно найти отделение банка, их может быть несколько.");
TextDrawBackgroundColor(Textdraw9, 255);
TextDrawFont(Textdraw9, 1);
TextDrawLetterSize(Textdraw9, 0.500000, 1.000000);
TextDrawColor(Textdraw9, -1);
TextDrawSetOutline(Textdraw9, 0);
TextDrawSetProportional(Textdraw9, 1);
TextDrawSetShadow(Textdraw9, 1);
//================================================== ============================
Textdraw10 = TextDrawCreate(5.000000, 405.000000, "Мы уже создали вам счёт в банке, чтобы вам было удобнее.");
TextDrawBackgroundColor(Textdraw10, 255);
TextDrawFont(Textdraw10, 1);
TextDrawLetterSize(Textdraw10, 0.500000, 1.000000);
TextDrawColor(Textdraw10, -1);
TextDrawSetOutline(Textdraw10, 0);
TextDrawSetProportional(Textdraw10, 1);
TextDrawSetShadow(Textdraw10, 1);
//================================================== ============================
Textdraw11 = TextDrawCreate(6.000000, 419.000000, "Также по городу работает сеть банкоматов.");
TextDrawBackgroundColor(Textdraw11, 255);
TextDrawFont(Textdraw11, 1);
TextDrawLetterSize(Textdraw11, 0.500000, 1.000000);
TextDrawColor(Textdraw11, -1);
TextDrawSetOutline(Textdraw11, 0);
TextDrawSetProportional(Textdraw11, 1);
TextDrawSetShadow(Textdraw11, 1);
//================================================== ============================
Textdraw5 = TextDrawCreate(6.000000, 391.000000, "Город Южный - не чистый город. В нём полно нелегальных организаций.");
TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, 1);
TextDrawLetterSize(Textdraw5, 0.500000, 1.000000);
TextDrawColor(Textdraw5, -1);
TextDrawSetOutline(Textdraw5, 0);
TextDrawSetProportional(Textdraw5, 1);
TextDrawSetShadow(Textdraw5, 1);
//================================================== ============================
Textdraw12 = TextDrawCreate(5.000000, 405.000000, "Если вас не устраивает ваша подработка, платят мало, то может быть");
TextDrawBackgroundColor(Textdraw12, 255);
TextDrawFont(Textdraw12, 1);
TextDrawLetterSize(Textdraw12, 0.500000, 1.000000);
TextDrawColor(Textdraw12, -1);
TextDrawSetOutline(Textdraw12, 0);
TextDrawSetProportional(Textdraw12, 1);
TextDrawSetShadow(Textdraw12, 1);
//================================================== ============================
Textdraw13 = TextDrawCreate(6.000000, 419.000000, "вы сможете заключить контракт с какой-нибудь компанией.");
TextDrawBackgroundColor(Textdraw13, 255);
TextDrawFont(Textdraw13, 1);
TextDrawLetterSize(Textdraw13, 0.500000, 1.000000);
TextDrawColor(Textdraw13, -1);
TextDrawSetOutline(Textdraw13, 0);
TextDrawSetProportional(Textdraw13, 1);
TextDrawSetShadow(Textdraw13, 1);
//================================================== ============================
Textdraw6 = TextDrawCreate(6.000000, 391.000000, "В этом городе есть и свои грешки.");
TextDrawBackgroundColor(Textdraw6, 255);
TextDrawFont(Textdraw6, 1);
TextDrawLetterSize(Textdraw6, 0.500000, 1.000000);
TextDrawColor(Textdraw6, -1);
TextDrawSetOutline(Textdraw6, 0);
TextDrawSetProportional(Textdraw6, 1);
TextDrawSetShadow(Textdraw6, 1);
//================================================== ============================
Textdraw14 = TextDrawCreate(5.000000, 405.000000, "Бывает здесь торгуют наркотиками и ещё чем-нибудь таким...");
TextDrawBackgroundColor(Textdraw14, 255);
TextDrawFont(Textdraw14, 1);
TextDrawLetterSize(Textdraw14, 0.500000, 1.000000);
TextDrawColor(Textdraw14, -1);
TextDrawSetOutline(Textdraw14, 0);
TextDrawSetProportional(Textdraw14, 1);
TextDrawSetShadow(Textdraw14, 1);
//================================================== ============================
Textdraw15 = TextDrawCreate(6.000000, 419.000000, "Будете ли вы жертвой торговцев или же нет - решать вам.");
TextDrawBackgroundColor(Textdraw15, 255);
TextDrawFont(Textdraw15, 1);
TextDrawLetterSize(Textdraw15, 0.500000, 1.000000);
TextDrawColor(Textdraw15, -1);
TextDrawSetOutline(Textdraw15, 0);
TextDrawSetProportional(Textdraw15, 1);
TextDrawSetShadow(Textdraw15, 1);
//================================================== ============================
Textdraw7 = TextDrawCreate(6.000000, 391.000000, "Будьте осторожны и внимательны.");
TextDrawBackgroundColor(Textdraw7, 255);
TextDrawFont(Textdraw7, 1);
TextDrawLetterSize(Textdraw7, 0.500000, 1.000000);
TextDrawColor(Textdraw7, -1);
TextDrawSetOutline(Textdraw7, 0);
TextDrawSetProportional(Textdraw7, 1);
TextDrawSetShadow(Textdraw7, 1);
//================================================== ============================
Textdraw16 = TextDrawCreate(5.000000, 405.000000, "Улицы в городе иногда патрулируются сотрудниками полиции.");
TextDrawBackgroundColor(Textdraw16, 255);
TextDrawFont(Textdraw16, 1);
TextDrawLetterSize(Textdraw16, 0.500000, 1.000000);
TextDrawColor(Textdraw16, -1);
TextDrawSetOutline(Textdraw16, 0);
TextDrawSetProportional(Textdraw16, 1);
TextDrawSetShadow(Textdraw16, 1);
//================================================== ============================
Textdraw8 = TextDrawCreate(6.000000, 391.000000, "Чтобы работать, нужен паспорт.");
TextDrawBackgroundColor(Textdraw8, 255);
TextDrawFont(Textdraw8, 1);
TextDrawLetterSize(Textdraw8, 0.500000, 1.000000);
TextDrawColor(Textdraw8, -1);
TextDrawSetOutline(Textdraw8, 0);
TextDrawSetProportional(Textdraw8, 1);
TextDrawSetShadow(Textdraw8, 1);
//================================================== ============================
Textdraw17 = TextDrawCreate(5.000000, 405.000000, "Это мэрия города, здесь и получают паспорт.");
TextDrawBackgroundColor(Textdraw17, 255);
TextDrawFont(Textdraw17, 1);
TextDrawLetterSize(Textdraw17, 0.500000, 1.000000);
TextDrawColor(Textdraw17, -1);
TextDrawSetOutline(Textdraw17, 0);
TextDrawSetProportional(Textdraw17, 1);
TextDrawSetShadow(Textdraw17, 1);
//================================================== ============================
Textdraw18 = TextDrawCreate(6.000000, 419.000000, "Ну что ж, пора начинать игру. Поехали. Удачи вам!");
TextDrawBackgroundColor(Textdraw18, 255);
TextDrawFont(Textdraw18, 1);
TextDrawLetterSize(Textdraw18, 0.500000, 1.000000);
TextDrawColor(Textdraw18, -1);
TextDrawSetOutline(Textdraw18, 0);
TextDrawSetProportional(Textdraw18, 1);
TextDrawSetShadow(Textdraw18, 1);

Reply
#6

Try to Use this

PHP код:
TextDrawShowForPlayer(playerid,Textdrawname[playerid]); 
For Example

Код HTML:
//================================================== ============================!
SpeedoText[playerid] = TextDrawCreate(180.000, 362.000," ");
TextDrawShowForPlayer(playerid,SpeedoText[playerid]);
TextDrawAlignment(SpeedoText[playerid], 1);
TextDrawFont(SpeedoText[playerid],2);
TextDrawLetterSize(SpeedoText[playerid], 0.310, 1.400);
TextDrawSetShadow(SpeedoText[playerid],0);
TextDrawUseBox(SpeedoText[playerid], 1);
TextDrawBoxColor(SpeedoText[playerid], 0x99);
TextDrawTextSize(SpeedoText[playerid], 520.000, 0.000);
//================================================== ============================!
Reply
#7

Doing so, it is still the same problem.
Reply
#8

Make sure you used

PHP код:
TextDrawShowForPlayer(playerid,Textdrawname[playerid]); 
under the OnPlayerConnect Only

not under onGameModeInit
Reply
#9

That's what I did.
Reply
#10

I'm here still talking when something is written to the global textdraws in OnGameModeInit, and if a player is in OnPlayerConnect. Well I did and still the problem that I have described here.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)