22.12.2018, 04:09
Bom pessoal eu fiz uma tela de load antis da tela de login e eu totentando fazer com que esse textdraw:
vб de 0% a 100% entt tentei isso:
e nao funcionou o que deu errado ai?
PHP код:
TDEditor_TD[10] = TextDrawCreate(318.235107, 224.416717, "100%");
TextDrawLetterSize(TDEditor_TD[10], 0.202823, 1.238332);
TextDrawAlignment(TDEditor_TD[10], 1);
TextDrawColor(TDEditor_TD[10], 16777215);
TextDrawSetShadow(TDEditor_TD[10], 0);
TextDrawSetOutline(TDEditor_TD[10], 0);
TextDrawBackgroundColor(TDEditor_TD[10], 255);
TextDrawFont(TDEditor_TD[10], 2);
TextDrawSetProportional(TDEditor_TD[10], 1);
TextDrawSetShadow(TDEditor_TD[10], 0);
PHP код:
new TimerLoadTela[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
if(PlayerInfo[playerid][Logged] == 0)
{
for(new x = 0; x < sizeof(TDEditor_TD); x++)
{
TextDrawHideForPlayer(playerid, TDEditor_TD[x]);
}
new str[128], BARRA[128];
if(BARRA[playerid] != 100)
{
BARRA[playerid] ++;
}
if(BARRA[playerid] == 100)
{
format(str, 100, "%d%", BARRA[playerid]);
TextDrawSetString(TDEditor_TD[10], str);
TimerLoadTela[playerid] = SetTimerEx("telaLogin", 500, false, "i", playerid);
}
ClearChatbox(playerid, 100);
return 1;
}
return 1;
}
forward telaLogin(playerid); // callback para chamar o textdraw da tela de login mas nao ta chamando a tela de login tb
public telaLogin(playerid)
{
SelectTextDraw(playerid,0xFF0000AA);
for(new i = 0; i < sizeof(BVW_LOGIN); i++)
{
TextDrawShowForPlayer(playerid, TDEditor_LOgin[i]);
}
KillTimer(TimerLoadTela[playerid]);
return 1;
}