SA-MP Forums Archive
[Ajuda] [URGENTE]PROBLEMAS COM TEXTDRAWS - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] [URGENTE]PROBLEMAS COM TEXTDRAWS (/showthread.php?tid=655710)



[URGENTE]PROBLEMAS COM TEXTDRAWS - MtPlayerZ - 27.06.2018

Fiz uma textdraw de login para ser exibida ao player quando logar, apos o player logar ele vai pro OnPlayerRequestClass onde da start em um timer de 5 segundos que irб exibir o menu.

O problema й que eu estou logado no servidor e funciona normal, mais, quando outro player loga o timer carrega mais exibe o textdraw pra min e o outro player fica no loading que coloquei pra acompanhar o Timer.Assim outros player nгo consegue logar.


Re: [URGENTE]PROBLEMAS COM TEXTDRAWS - NelsonC - 27.06.2018

Perai, dxa eu pensar seu cуdigo.




Re: [URGENTE]PROBLEMAS COM TEXTDRAWS - MtPlayerZ - 27.06.2018

Quote:
Originally Posted by NelsonC
Посмотреть сообщение
Perai, dxa eu pensar seu cуdigo.

kkkkkk tгo engraзado

Код:
public OnPlayerRequestClass(playerid, classid)
{
	bloquear_chat = false;
	TogglePlayerSpectating(playerid, true);
	SetTimer("Loading",5000,false);
	return 1;
}
Код:
forward Loading(playerid);
public Loading(playerid)
{
    new Str1[128], Str2[128], Str3[128], Str4[128];
	new Str5[128], Str6[128];
    TextDrawShowForPlayer(playerid, ImagemEntrada);
	TextDrawShowForPlayer(playerid, FUNDO1);
	TextDrawShowForPlayer(playerid, FUNDO2);
	TextDrawShowForPlayer(playerid, FUNDO3);
	TextDrawShowForPlayer(playerid, FUNDOPLAY1);
	TextDrawShowForPlayer(playerid, FUNDOPLAY2);
	TextDrawShowForPlayer(playerid, PLAYSOLO);
	TextDrawShowForPlayer(playerid, FUNDOSKIN1);
	TextDrawShowForPlayer(playerid, FUNDOSKIN2);
	TextDrawShowForPlayer(playerid, SKIN);
	TextDrawShowForPlayer(playerid, TXTNICK);
	TextDrawShowForPlayer(playerid, TXTLEVEL);
	TextDrawShowForPlayer(playerid, TXTKILLS);
	TextDrawShowForPlayer(playerid, TXTDEATHS);
	TextDrawShowForPlayer(playerid, TXTWINS);
	TextDrawShowForPlayer(playerid, FUNDODUPLA1);
	TextDrawShowForPlayer(playerid, FUNDODUPLA2);
	TextDrawShowForPlayer(playerid, PLAYDUO);
	TextDrawShowForPlayer(playerid, FUNDOSQUAD1);
	TextDrawShowForPlayer(playerid, FUNDOSQUAD2);
	TextDrawShowForPlayer(playerid, PLAYSQUAD);
	TextDrawShowForPlayer(playerid, GTA);
	TextDrawShowForPlayer(playerid, SANROYALE);
	TextDrawShowForPlayer(playerid, VERSION);
	TextDrawShowForPlayer(playerid, TCCPROJECT);
	TextDrawShowForPlayer(playerid, TXTDINHEIRO);
	SelectTextDraw(playerid, 0xFFFF00FF);
    format(Str1,sizeof(Str1),"Nick:______%s",PlayerInfo[playerid][pNome]);
	format(Str2,sizeof(Str2),"LEVEL:_________________%d",PlayerInfo[playerid][pLevel]);
	format(Str3,sizeof(Str3),"Matou:________________%d",PlayerInfo[playerid][pMatou]);
	format(Str4,sizeof(Str4),"Morreu:______________%d",PlayerInfo[playerid][pMorreu]);
	format(Str5,sizeof(Str5),"vitorias:____________%d",PlayerInfo[playerid][pVitorias]);
	format(Str6,sizeof(Str6),"$%d",PlayerInfo[playerid][pDinheiro]);
	TextDrawSetString(TXTNICK,Str1);
	TextDrawSetString(TXTLEVEL,Str2);
	TextDrawSetString(TXTKILLS,Str3);
	TextDrawSetString(TXTDEATHS,Str4);
	TextDrawSetString(TXTWINS,Str5);
	TextDrawSetString(TXTDINHEIRO,Str6);
	PlayAudioStreamForPlayer(playerid,	"https://dl.dropboxusercontent.com/s/9lesgz73pl25lks/NYAN%20CAT%20instrumental%20HD.mp3?dl=0");
	for(new i=0; i < 100; i++)
	{
		SendClientMessage(playerid, COLOR_GRAD1, " ");
	}
	return 1;
}



Re: [URGENTE]PROBLEMAS COM TEXTDRAWS - FerrariL - 27.06.2018

use SetTimerEx


Re: [URGENTE]PROBLEMAS COM TEXTDRAWS - MtPlayerZ - 27.06.2018

Quote:
Originally Posted by FerrariL
Посмотреть сообщение
use SetTimerEx
qual a diferenзa?


Re: [URGENTE]PROBLEMAS COM TEXTDRAWS - FerrariL - 27.06.2018

Quote:
Originally Posted by MtPlayerZ
Посмотреть сообщение
qual a diferenзa?
SetTimer й sem parвmetros, SetTimerEx com parвmetros.
Quando se quer definir algo para cada player se tratando de Timer se usa SetTimerEx.


Re: [URGENTE]PROBLEMAS COM TEXTDRAWS - MtPlayerZ - 27.06.2018

Quote:
Originally Posted by FerrariL
Посмотреть сообщение
SetTimer й sem parвmetros, SetTimerEx com parвmetros.
Quando se quer definir algo para cada player se tratando de Timer se usa SetTimerEx.
E o que eu deveria colocar nos parametros do SetTimerEx?


Re: [URGENTE]PROBLEMAS COM TEXTDRAWS - willttoonn - 27.06.2018

Altera isso:
pawn Код:
SetTimer("Loading",5000,false);
por isso
pawn Код:
SetTimerEx("Loading", 5000, false, "d", playerid);
Vocк tava chamando a funзгo Loading(playerid) declarando o playerid como 0 e nгo com o ID correto.


Re: [URGENTE]PROBLEMAS COM TEXTDRAWS - MtPlayerZ - 27.06.2018

Quote:
Originally Posted by willttoonn
Посмотреть сообщение
Altera isso:
pawn Код:
SetTimer("Loading",5000,false);
por isso
pawn Код:
SetTimerEx("Loading", 5000, false, "d", playerid);
Vocк tava chamando a funзгo Loading(playerid) declarando o playerid como 0 e nгo com o ID correto.
Entendi, muito obrigado galeris!!!

@Closed