SA-MP Forums Archive
[Include] rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! (/showthread.php?tid=421863)

Pages: 1 2


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - Yves - 12.03.2013

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


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RajatPawar - 12.03.2013

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.


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - DonWade - 12.03.2013

Nice one Rajat


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - TheArcher - 12.03.2013

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


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RajatPawar - 13.03.2013

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


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RajatPawar - 13.03.2013

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)


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - Pottus - 13.03.2013

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];


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RajatPawar - 13.03.2013

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?


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - rangerxxll - 17.03.2013

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.


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RajatPawar - 26.03.2013

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.


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - Lordzy - 26.03.2013

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


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RajatPawar - 26.03.2013

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.


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - [FSaF]Jarno - 31.03.2013

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.


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RajatPawar - 31.03.2013

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 !


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RandomDude - 23.07.2013

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 -_-


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RajatPawar - 23.07.2013

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?


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RandomDude - 24.07.2013

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


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RandomDude - 24.07.2013

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


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RajatPawar - 24.07.2013

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?


Re: rInfoBox - Cool looking textdraw Info boxes ! Show info to players in one line! - RandomDude - 24.07.2013

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