Originally Posted by //~Juam
Usa Timers..
|
/*-------------------------------------------------------------------------------------------------------*/
Textdraw2 = TextDrawCreate(45.000000, 126.000000, "_");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.479999, 1.300000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, 1430);
TextDrawTextSize(Textdraw2, 258.000000, -110.000000);
/* -------------------------------------------------------------------------------------------------------*/
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438)) //cambia los numeros por las coordenadas tuyas del pickup
{
TextDrawHideForPlayer(playerid, Textdraw); // donde textdraw es la variable del textdraw
}
if(IsPlayerInRangeOfPoint(playerid, 5.0, CORDENADAS X,Y,Z DEL PICKUP))
{
TextDrawHideForPlayer(playerid, Textdraw);
}
else
{
TextDrawHideForPlayer(playerid,textdraw);
}
forward SacarTextDraw(playerid);
public SacarTextDraw(playerid)
{
for(new b = 0; b < sizeof(BizzInfo); b++)
{
if(BizzInfo[b][bOwned] == 1)
{
TextDrawHideForPlayer(playerid,NegocioBuy1);
TextDrawHideForPlayer(playerid,NegocioBuy2);
TextDrawHideForPlayer(playerid,NegocioBuy3);
TextDrawHideForPlayer(playerid,NegocioBuy4);
TextDrawHideForPlayer(playerid,NegocioBuy5);
TextDrawHideForPlayer(playerid,NegocioBuy6);
}
else
{
TextDrawHideForPlayer(playerid,TextNegocio1);
TextDrawHideForPlayer(playerid,TextNegocio2);
TextDrawHideForPlayer(playerid,TextNegocio3);
TextDrawHideForPlayer(playerid,TextNegocio4);
TextDrawHideForPlayer(playerid,TextNegocio5);
}
}
}
Donde sale TextNegocio1, ETC, ai sustituye por como tienes definidos tus TextDraw
ejemplo...
...
TextDrawShowForPlayer(i,TextCasa4);
}
SetTimerEx("SacarTextDraw", 3000, false, "d", i);
return 1;
}
}
else
{
TextDrawHideForPlayer( bla bla bla
}
if(IsPlayerInRangeOfPoint(playerid, 5.0, CORDENADAS X,Y,Z DEL PICKUP))
{
TextDrawShowForPlayer(playerid, Textdraw);
}
else
{
TextDrawHideForPlayer(playerid,textdraw);
}