[Help] InfoBox
#1

Hi, i made infobox to my gamemode, but it dont show. I don't know where is mistake Help please .)
Sorry for my bad english, i'm from czech republic

Код:
new Text:InfoBox[100];
OnPlayerConnect
Код:
	InfoBox[playerid] = TextDrawCreate(36.000000, 144.000000, "___");
	TextDrawBackgroundColor(InfoBox[playerid], 255);
	TextDrawFont(InfoBox[playerid], 2);
	TextDrawLetterSize(InfoBox[playerid], 0.250000, 1.099999);
	TextDrawColor(InfoBox[playerid], -1);
	TextDrawSetOutline(InfoBox[playerid], 0);
	TextDrawSetProportional(InfoBox[playerid], 1);
	TextDrawSetShadow(InfoBox[playerid], 1);
	TextDrawUseBox(InfoBox[playerid], 1);
	TextDrawBoxColor(InfoBox[playerid], 118);
	TextDrawTextSize(InfoBox[playerid], 180.000000, 5.000000);
Код:
stock Box(playerid, text[], time)
{
    TextDrawHideForPlayer(playerid, InfoBox[playerid]);
	new info[700];
    format(info, sizeof(info), "~r~InfoBox~n~~w~%s", text);
    SetTimerEx("DeleteInfoBox", time * 1000, 0, "i", playerid);
    PlayerPlaySound(playerid, 1056, 0, 0, 0);
    TextDrawSetString(InfoBox[playerid], info);
	TextDrawShowForPlayer(playerid, InfoBox[playerid]);
}

forward DeleteInfoBox(playerid);
public DeleteInfoBox(playerid)
{
	TextDrawHideForPlayer(playerid, InfoBox[playerid]);
}
Thanks
Reply
#2

You must to use it like this:
Код:
Box( playerid, "Hello pps !", 1 ); // time in seconds, greater than 0 !
Reply
#3

Quote:
Originally Posted by costel_nistor96
Посмотреть сообщение
You must to use it like this:
Код:
Box( playerid, "Hello pps !", 1 ); // time in seconds, greater than 0 !
omg i used it like this, but thanks for help
Reply
#4

What is the problem you are facing?
Reply
#5

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
What is the problem you are facing?
i have in the OnPlayerConnect this:
Код:
Box(playerid, "bla bla", 16);
but textdraw doesn't show for player
Reply
#6

I think you need to create your textdraw in your stock.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)