I have a problem with my textdraws. They do not show up.
Код:
new Reklamka2[MAX_PLAYERS], Text:InfoTextDraw[7];
new reklamka_idx, reklamka[][] = {
"~h~~g~New~w~ TEXT~y~ TEXT",
"~h~~g~New~w~ TEXT~y~ TEXT",
"~h~~g~New~w~ TEXT~y~ TEXT",
"~h~~g~New~w~ TEXT~y~ TEXT",
"~h~~g~New~w~ TEXT~y~ TEXT",
"~h~~g~New~w~ TEXT~y~ TEXT",
"~h~~g~New~w~ TEXT~y~ TEXT",
"~h~~g~New~w~ TEXT~y~ TEXT",
"~h~~g~New~w~ TEXT~y~ TEXT"
};
in GameModeInit:
InfoTextDraw[2] = Text:TextDrawCreate(9.390945, 423.583374, "~h~~g~Info~w~ TEXT~y~ ///");
TextDrawBackgroundColor(InfoTextDraw[2], 51);
TextDrawFont(InfoTextDraw[2], 1);
TextDrawLetterSize(InfoTextDraw[2], 0.281127, 1.072497);
TextDrawColor(InfoTextDraw[2], -5963521);
TextDrawSetOutline(InfoTextDraw[2], 1);
TextDrawSetProportional(InfoTextDraw[2], 1);
TextDrawSetSelectable(InfoTextDraw[2], 0);
SetTimer("reklamka1",40000,true);
in OnPlayerSpawn:
TextDrawShowForPlayer(playerid, InfoTextDraw[2]);
forward reklamka1();
public reklamka1()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(reklamka_idx == sizeof(reklamka))
{
reklamka_idx = 0;
}
TextDrawSetString(InfoTextDraw[2], reklamka[reklamka_idx]);
if(Reklamka2[i] == 1)
{
return 0;
}
TextDrawShowForPlayer(i,InfoTextDraw[2]);
reklamka_idx ++;
}
return 1;
}
It doesn't work.