08.03.2019, 12:09
Quote:
pse criei um tela de carregamento que antes de aparecer a textdraw carrega atй 100 dps aparece a tela de login
mas apareceu uns warnings que nгo consegui resolver se alguem puder ajudar agradeзo Olha ae o code new TimerLoadTela[MAX_PLAYERS]; new Carregar[2]; public OnPlayerRequestClass(playerid, classid) { if(PlayerInfo[playerid][Logged] == 0) { ClearChatbox(playerid, 100); TextDrawShowForPlayer(playerid, Carregar[1]); TimerLoadTela[playerid] = SetTimerEx("telaLogin", 60, true, "d", playerid); } SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; } Carregar[1] = TextDrawCreate(318.235107, 224.416717, "100%"); TextDrawLetterSize(Carregar[1], 0.202823, 1.238332); TextDrawAlignment(Carregar[1], 1); TextDrawColor(Carregar[1], 16777215); TextDrawSetShadow(Carregar[1], 0); TextDrawSetOutline(Carregar[1], 0); TextDrawBackgroundColor(Carregar[1], 255); TextDrawFont(Carregar[1], 2); TextDrawSetProportional(Carregar[1], 1); TextDrawSetShadow(Carregar[1], 0); forward telaLogin(playerid); // callback para chamar o textdraw da tela de login mas nao ta chamando a tela login public telaLogin(playerid) { static barra, str[4]; if(barra != 100) barra++; format(str, 100, "%d%", barra); TextDrawSetString(Carregar[1], str); if(barra == 100){ SelectTextDraw(playerid, 0xFF0000AA); for(new i = 0; i < sizeof(Login_BVV); i++) { TextDrawShowForPlayer(playerid, TDEditor_LOgin[i]); } KillTimer(TimerLoadTela[playerid]); } return 1; } |
Quote:
new TimerLoadTela[MAX_PLAYERS]; new Carregar[2]; public OnPlayerRequestClass(playerid, classid) { if(PlayerInfo[playerid][Logged] == 0) { ClearChatbox(playerid, 100); TextDrawShowForPlayer(playerid, Carregar[1]); TimerLoadTela[playerid] = SetTimerEx("telaLogin", 60, true, "i", playerid); } SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; } Carregar[1] = TextDrawCreate(318.235107, 224.416717, "100%"); TextDrawLetterSize(Carregar[1], 0.202823, 1.238332); TextDrawAlignment(Carregar[1], 1); TextDrawColor(Carregar[1], 16777215); TextDrawSetShadow(Carregar[1], 0); TextDrawSetOutline(Carregar[1], 0); TextDrawBackgroundColor(Carregar[1], 255); TextDrawFont(Carregar[1], 2); TextDrawSetProportional(Carregar[1], 1); TextDrawSetShadow(Carregar[1], 0); forward telaLogin(playerid); // callback para chamar o textdraw da tela de login mas nao ta chamando a tela login public telaLogin(playerid) { static barra, str[4]; if(barra != 100) barra++; format(str, 100, "%d%", barra); PlayerTextDrawSetString(Carregar[1], str); if(barra == 100){ SelectTextDraw(playerid, 0xFF0000AA); for(new i = 0; i < sizeof(Login_BVV); i++) { TextDrawShowForPlayer(playerid, TDEditor_LOgin[i]); } KillTimer(TimerLoadTela[playerid]); } return 1; |