pol@nder
Умник
На тесте все работает как часы. Но стоит только поставить мод на сервер (онлайн 200) текстдравы перестают работать или работают частично. И не показываются текстдравы созданные в OnPlayerConnect, все остальные работают.
Вот один из текстдравов (капт):
Если чего-то не хватает дополню.
P.S. У меня всего два текстдрава в OnPlayerConnect, спидометр и капт, до вставки капта спидометр работал и при онлайне. Но ошибки я найти не смог.
Вот один из текстдравов (капт):
PHP:
new Text:CaptTime[MAX_PLAYERS]; new Text:BandaCapt1a[MAX_PLAYERS]; new Text:BandaCapt2a[MAX_PLAYERS];
new Text:ScoreCapt1a[MAX_PLAYERS]; new Text:ScoreCapt2a[MAX_PLAYERS];
//===============
OnPlayerConnect:
CaptTime[playerid] = TextDrawCreate(47.000000, 252.000000, "Time: 7:00");
TextDrawBackgroundColor(CaptTime[playerid], 65535);
TextDrawFont(CaptTime[playerid], 1);
TextDrawLetterSize(CaptTime[playerid], 0.500000, 1.399999);
TextDrawColor(CaptTime[playerid], -1);
TextDrawSetOutline(CaptTime[playerid], 1);
TextDrawSetProportional(CaptTime[playerid], 1);
BandaCapt1a[playerid] = TextDrawCreate(45.000000, 269.000000, "_");
TextDrawBackgroundColor(BandaCapt1a[playerid], 255);
TextDrawFont(BandaCapt1a[playerid], 1);
TextDrawLetterSize(BandaCapt1a[playerid], 0.470000, 1.300000);
TextDrawColor(BandaCapt1a[playerid], -1);
TextDrawSetOutline(BandaCapt1a[playerid], 1);
TextDrawSetProportional(BandaCapt1a[playerid], 1);
BandaCapt2a[playerid] = TextDrawCreate(45.000000, 285.000000, "_");
TextDrawBackgroundColor(BandaCapt2a[playerid], 255);
TextDrawFont(BandaCapt2a[playerid], 1);
TextDrawLetterSize(BandaCapt2a[playerid], 0.500000, 1.200000);
TextDrawColor(BandaCapt2a[playerid], -1);
TextDrawSetOutline(BandaCapt2a[playerid], 1);
TextDrawSetProportional(BandaCapt2a[playerid], 1);
ScoreCapt1a[playerid] = TextDrawCreate(191.000000, 269.000000, "0");
TextDrawBackgroundColor(ScoreCapt1a[playerid], -65281);
TextDrawFont(ScoreCapt1a[playerid], 1);
TextDrawLetterSize(ScoreCapt1a[playerid], 0.500000, 1.200000);
TextDrawColor(ScoreCapt1a[playerid], 16777215);
TextDrawSetOutline(ScoreCapt1a[playerid], 1);
TextDrawSetProportional(ScoreCapt1a[playerid], 1);
ScoreCapt2a[playerid] = TextDrawCreate(191.000000, 285.000000, "0");
TextDrawBackgroundColor(ScoreCapt2a[playerid], -65281);
TextDrawFont(ScoreCapt2a[playerid], 1);
TextDrawLetterSize(ScoreCapt2a[playerid], 0.500000, 1.200000);
TextDrawColor(ScoreCapt2a[playerid], 16777215);
TextDrawSetOutline(ScoreCapt2a[playerid], 1);
TextDrawSetProportional(ScoreCapt2a[playerid], 1);
//==============================
OnPlayerDisconnect:
TextDrawDestroy(BandaCapt1a[playerid]);
TextDrawDestroy(BandaCapt2a[playerid]);
TextDrawDestroy(ScoreCapt1a[playerid]);
TextDrawDestroy(ScoreCapt2a[playerid]);
TextDrawDestroy(CaptTime[playerid]);
//==============================
Остальное:
stock CaptureUpd(bandkiller)
{
new SCORE1[5];
new SCORE2[5];
foreach(new i : Player)
{
if(gPlayerLogged[i] == 0) continue;
if(IsAGang(i))
{
if(gNum[bandkiller] == 2)
{
format(SCORE1, 5, "%d", BandaKill[bandkiller]);
TextDrawSetString(ScoreCapt1a[i], SCORE1);
}
if(gNum[bandkiller] == 1)
{
format(SCORE2, 5, "%d", BandaKill[bandkiller]);
TextDrawSetString(ScoreCapt2a[i], SCORE2);
}
}
}
}
stock CaptureStart(familyone, familytwo)
{
new BANDA[5];
foreach(new i : Player)
{
if(gPlayerLogged[i] == 0) continue;
if(PlayerInfo[i][pMember] == familyone || PlayerInfo[i][pMember] == familytwo)
{
TextDrawShowForPlayer(i, BandaCapt1a[i]);
TextDrawShowForPlayer(i, BandaCapt2a[i]);
TextDrawShowForPlayer(i, ScoreCapt1a[i]);
TextDrawShowForPlayer(i, ScoreCapt2a[i]);
TextDrawShowForPlayer(i, CaptTime[i]);
TextDrawSetString(BandaCapt1a[i], GName[familyone]);
TextDrawSetString(BandaCapt2a[i], GName[familytwo]);
format(BANDA, 5, "0");
TextDrawSetString(ScoreCapt1a[i], BANDA);
format(BANDA, 5, "0");
TextDrawSetString(ScoreCapt2a[i], BANDA);
}
}
}
stock CaptureEnd(familyone, familytwo)
{
foreach(new i : Player)
{
if(PlayerInfo[i][pMember] == familyone || PlayerInfo[i][pMember] == familytwo)
{
TextDrawHideForPlayer(i, BandaCapt1a[i]);
TextDrawHideForPlayer(i, BandaCapt2a[i]);
TextDrawHideForPlayer(i, ScoreCapt1a[i]);
TextDrawHideForPlayer(i, ScoreCapt2a[i]);
TextDrawHideForPlayer(i, CaptTime[i]);
}
}
}
P.S. У меня всего два текстдрава в OnPlayerConnect, спидометр и капт, до вставки капта спидометр работал и при онлайне. Но ошибки я найти не смог.
