[Include] rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line!
#21

Very sexy i may use this one time when i work on a gm for a release
Reply
#22

He he , thanks guys. And yes , I do know about that huge bug which could ruin things
I basically just wanted this to get off my hands , I fixed it up as I could and released it. Next version , I will get you the player text draws. And no, I did not use timers.
Reply
#23

Nice one Rajat
Reply
#24

Pretty nice stuff, I'd like to see a coordinate set. :/
Reply
#25

Thanks! You want coordinates? Maybe like ipleomax,'s editor? Just drag and drop. I am on to it!
Reply
#26

Updated to v0.2 with PlayerTextDraws, fixed a bug and added a bit of design. Check out the main topic for the download link (updated)
Reply
#27

Still a small problem....

new PlayerText:Textdraw0;
new PlayerText:Textdraw1;
new PlayerText:Textdraw2;
new PlayerText:Textdraw3;
new PlayerText:Textdraw4;

Should be.....

new PlayerText:Textdraw0[MAX_PLAYERS];
new PlayerText:Textdraw1[MAX_PLAYERS];
new PlayerText:Textdraw2[MAX_PLAYERS];
new PlayerText:Textdraw3[MAX_PLAYERS];
new PlayerText:Textdraw4[MAX_PLAYERS];
Reply
#28

Nope, not necessary. I could do
pawn Код:
new Text:some_TD[MAX_PLAYERS]
and show the textdraw to different players, or just use a player textdraw with no array, since player textdraws, well you get the point, don't ya?
Reply
#29

When I create a global variable like this.
pawn Код:
new td = CreateTDboxForPlayer(playerid, "Help Box", COLOR_CYAN, "~w~1. Rules~n~2. Commands.");
My pawno crashes. Any idea as to why this is happening? Thanks.
Reply
#30

Quote:
Originally Posted by rangerxxll
Посмотреть сообщение
When I create a global variable like this.
pawn Код:
new td = CreateTDboxForPlayer(playerid, "Help Box", COLOR_CYAN, "~w~1. Rules~n~2. Commands.");
My pawno crashes. Any idea as to why this is happening? Thanks.
Sorry to be answering so late, but here it is. What you are doing is just like doing:
pawn Код:
new rand = random(sizeof(var));
under global scope. This will crash pawno. So try doing it under a callback or function or whatever, after globally declaring the variable.
Reply
#31

Pretty nice, but would be better if there's coordinate setting.
Reply
#32

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
Pretty nice, but would be better if there's coordinate setting.
Thank you, I did try that, but it just messes up the box thingy. If you need, it's quite editable in the include.
Reply
#33

Would be nice if you would get rid of the show and hide functions, and instead make it something like this:

ShowInfoBox(playerid,const title[],const info[],time);

(also probably a ShowInfoBoxForAll)

This way the textdraw will be created, shown instantly, and a timer will be set to hide the textdraw after time has passed.
Reply
#34

Quote:
Originally Posted by [FSaF]Jarno
Посмотреть сообщение
Would be nice if you would get rid of the show and hide functions, and instead make it something like this:

ShowInfoBox(playerid,const title[],const info[],time);

(also probably a ShowInfoBoxForAll)

This way the textdraw will be created, shown instantly, and a timer will be set to hide the textdraw after time has passed.
That was my first stock, but I later destroyed it because I wanted the coder to hand full freedom. For example, it's the trend nowadays to close textdraw boxes on (newkeys & KEY_FIRE) which wouldn't be possible if I did the above.
Also, you can surely do the showinfoboxforall thing easily !
pawn Код:
#define ShowInfoBoxForAll(%0) foreach(new i:Player) ShowInfoBoxToPlayer(i, %0);
Anyways, thanks for you response !
Reply
#35

I did this example of yours
pawn Код:
CMD:help(playerid)
{
new Te = CreateTDboxForPlayer(playerid, "Help me!", -1, "~w~1. ~y~Buy potatoes~n~~w~2.~y~ Buy some ~r~crazy ~g~shit~n~~w~3.~y~ Some random option~n~4. Exit");
ShowTDboxToPlayer(playerid, Te);
return 1;
}
I join game and spawn I don't even type your command I be sent out of world boundaries because of your script -_-
Reply
#36

Weird. Over 80 people have downloaded this, but they don't seem to face this issue. Are you sure it's not something in YOUR script?
Reply
#37

Yeah I'm perfectly sure.
I love this include of yours and I really want to use it but now I can't argh!
Reply
#38

Your signiture does not lead me anywere and I opened it -_- Is it a virus?
Reply
#39

Thanks for appreciating it, but I frankly cannot help you any more! Since only you have this problem. Can I see the script you are running, in a PM? Also, my signature, well.. it's kind of a joke?
Reply
#40

Na sorry I do not want to show my script.
Oh lol!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)