[Ajuda] ajuda no OnPlayerConnect
#1

No meu OnPlayerConnect eu uso esas 4 TextDraw:
PHP код:
TextDrawShowForPlayer(playeridTextdraw0);
TextDrawShowForPlayer(playeridTextdraw1);
TextDrawShowForPlayer(playeridTextdraw2);
TextDrawShowForPlayer(playeridTextdraw3); 
eu queria uma forma de limitar um tempo para elas aparecerem
pois elas aparecem 1 segundo e sai

Helpe-me
Reply
#2

SetTimer https://sampwiki.blast.hk/wiki/SetTimer
Reply
#3

PHP код:
public OnPlayerConnect(playerid)
{
blockpm[playerid] = 0;
morar[playerid] = 0;
moradia[playerid] = 0;
convitede[playerid] = 0;
PlayerInfo[playerid][LoginsFalsos] = 0;
pAdmin[playerid] = 0;
emcasa[playerid] = 0;
ResetPlayerGrana(playerid);
new 
aname[MAX_PLAYER_NAME];
GetPlayerName(playeridanameMAX_PLAYER_NAME);
format(filesizeof(file), PASTA_CONTASaname);
if(
dini_Int(file"Casa") == 1)
{
Create3DTextLabel(aname,Amarelo,dini_Int(file"CasaX"),dini_Int(file"CasaY"),dini_Int(file"CasaZ"),80.0,0);
}
dini_IntSet(file"DM"0);
TextDrawShowForPlayer(playeridbottomblack);
TextDrawShowForPlayer(playeridtopblack);
TextDrawShowForPlayer(playeridTextdraw0);
TextDrawShowForPlayer(playeridTextdraw1);
TextDrawShowForPlayer(playeridTextdraw2);
TextDrawShowForPlayer(playeridTextdraw3);
//settimers
SetTimerEx("semporte"10001,"e",playerid);
//variavels
CPSERVICE_actualcp[playerid] = 0;
AFK[playerid]=0;
multar[playerid]= 0;
autoescola[playerid] = 0;
nogame[playerid] = 0;
noevento[playerid] = 0;
PlayerInfo[playerid][Logged] = 0;
vip[playerid] = 0;
GPS_Spawned[playerid] = 0;
DMLiberado[playerid] = 0;
Mute[playerid] = 0;
//news
new Pname[MAX_PLAYER_NAME];
new 
string[256];
new 
sstring[256];
//============================================================================================================
dini_IntSet(file,"aAdmin",0);
if(
dini_Int("nickban.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid0x11B1FFAA"Vocк foi banido Motivo: Vocк estб banido!");
format(sstringsizeof(sstring), "%s (%d) Foi banido |Motivo|: Conta estб banida!"aname,playerid);
SendClientMessageToAll(0x11B1FFAAsstring);
Kick(playerid);
return 
1;
}
if(
dini_Int("banidos.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid0x11B1FFAA"Vocк foi kickado |Motivo|: Conta estб banida!");
format(sstringsizeof(sstring), "%s (%d) Foi kickado |Motivo|: Conta estб banida"aname,playerid);
SendClientMessageToAll(0x11B1FFAAsstring);
Kick(playerid);
return 
1;
}
//============================================================================================================
GetPlayerName(playeridPnamesizeof(Pname));
format(stringsizeof(string), "» %s (%d) entrou no servidor."Pname,playerid);
SendClientMessageToAll(0xFFFFFFAA,string);
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xFFFFFFAA" ");
SendClientMessage(playerid0xA86400AA"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
SendClientMessage(playerid0x0081D8AA"» Seja bem vindo(a) ao servidor!");
SendClientMessage(playerid0xE9FFE8AA"» Para ver os comandos /comandos");
SendClientMessage(playerid0x0081D8AA"» Para ver as regras /regras");
SendClientMessage(playerid0xE9FFE8AA"» Para ver os crйditos /creditos");
SendClientMessage(playerid0x0081D8AA"» Tenha Um Bom Jogo!");
SendClientMessage(playerid0xA86400AA"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
SetSpawnInfo(playerid1dini_Int(file"Skin"), dini_Int(file"CasaX"), dini_Int(file"CasaY"), dini_Int(file"CasaZ"),0000000);
return 
1;

Reply
#4

Quote:
Originally Posted by DarkPT
Посмотреть сообщение
Poste o sistema todo, pois pelo que vi algueres nele deve ter um SetTimerEx para fazer desaparecer o textdraws apуs 1 segundo.
Mas SetTimerEx nгo й pra um player especнfico?
Reply
#5

asssim tu mostra a texdraw

pawn Код:
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
assim tu esconde ela....

pawn Код:
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
entгo se tu quiser que ela aparece somente na seleзгo de class tu poe em OnPlayerConnect
pawn Код:
TextDrawShowForPlayer(playerid, Textdraw0);
e pra ela sumir depois em OnPlayerSpawn(playerid)

pawn Код:
TextDrawHideForPlayer(playerid, Textdraw0);
espero ter ajudado....
Reply
#6

Quote:
Originally Posted by [AF]Junior
Посмотреть сообщение
Mas SetTimerEx nгo й pra um player especнfico?
SetTimerEx й um timer com parвmetros especificos


"f" para float
"i" ou "d" para valores inteiros (integer/int)
"s" para strings
e tem muito mais

Um exemplo seria

PHP код:
public OnPlayerConnect(playerid)
{
    
SetTimerEx("Timer",10*10/10*5,true,"sfi","Oi",50.0,5);
    return 
true;
}
forward Timer(str[],Float:float,int);
public 
Timer(str[],Float:mfloat,int)
{
    for(new 
iGetMaxPlayers(); != j; ++i)
    {
        
SendClientMessage(i,-1,str);
        
SetPlayerPos(i,mfloat,0.0 int,0.0);
        
    }
    return 
true;

Reply
#7

Hum, interessante Vou tentar fazer uma textdraw randфmica u_U

@off

roubou minha userbar .-.
Reply
#8

ele fika em OnPlayerRequestClass
mas eu ja consegui resouver o problema vlw '-'
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)