Jump to content
  • 0

pomoc INFOBOX


Fr0st

Dotaz

Dobrý deň chcem sa spýtať QWER mi poradil kód na kontrolu pozície infoboxu a funguje len nastavil som si timer na 1 s a každú sekundu bliká potreboval by so to tak že ke´d stlačí enter na súradniciach už sa ten infobox nezobrazí prosím viete mi pomôcť ?? ;):oops:

Link to comment
Share on other sites

9 odpovědí na tuto otázku

Recommended Posts

  • 0
Přidej si proměnou při zobrazení nastav na 1 po umyslném skrytí na 0 + podminku když == 0 zobrazí iB

 

a jak to chceš províct

 

stock ......(.......)

{

if(.....(playerid) == 0)

{

....[playerid] = 1;

}

}

 

v timeru pro zavření TextDrawu: ....[playerid] = 0;

 

a jak dál :hehe: , taky jsem to skoušel pár dlouhých večer...

Link to comment
Share on other sites

  • 0
  • Administrátor
jak jako jak dál ?

 

takto je to, že se nedá zobrazit jiný než 1 skončí

A od čeho tam máš to playerid v proměný ? asi na ho***no

Link to comment
Share on other sites

  • 0

mam to takto a nejde to :think:

 

 


#include 

new Text:textdraw11;
new InfoBoxLimit[MAX_PLAYERS];

forward InfoBoxHide(playerid);

stock InfoBox(playerid, text[], time, priv)
{
   new infoboxtime;
if(InfoBoxLimit[playerid] == 0)
{
	InfoBoxLimit[playerid] = priv;
	TextDrawSetString(textdraw11, text);
	TextDrawShowForPlayer(playerid, textdraw11);
	infoboxtime = SetTimerEx("InfoBoxHide",time,false,"i",playerid);
}
if(InfoBoxLimit[playerid] == 1)
{
    KillTimer(infoboxtime);
	InfoBoxLimit[playerid] = 0;
	TextDrawSetString(textdraw11, text);
	TextDrawShowForPlayer(playerid, textdraw11);
	SetTimerEx("InfoBoxHide",time,false,"i",playerid);
}
}

public OnFilterScriptInit()
{
textdraw11 = TextDrawCreate(23,143,"_");
TextDrawLetterSize(textdraw11,0.449999,1.500000);
TextDrawAlignment(textdraw11,0);
TextDrawBackgroundColor(textdraw11,0x000000ff);
TextDrawFont(textdraw11,1);
TextDrawUseBox(textdraw11,1);
TextDrawBoxColor(textdraw11,0x000000aa);
TextDrawTextSize(textdraw11,222.000000,153.000000);
TextDrawSetOutline(textdraw11,0);
TextDrawSetProportional(textdraw11,1);
TextDrawSetShadow(textdraw11,1);

return 1;
}

public InfoBoxHide(playerid)
{
if(InfoBoxLimit[playerid] == 1)
{
	TextDrawHideForPlayer(playerid, textdraw11);
 	InfoBoxLimit[playerid] = 0;
   }
if(InfoBoxLimit[playerid] == 0)
{
	TextDrawHideForPlayer(playerid, textdraw11);
   }
return 1;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...