[Ajuda] [URGENTE]PROBLEMAS COM TEXTDRAWS
#1

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.
Reply
#2

Perai, dxa eu pensar seu cуdigo.

Reply
#3

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;
}
Reply
#4

use SetTimerEx
Reply
#5

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

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.
Reply
#7

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?
Reply
#8

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.
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)