Mirage Source http://www.miragesource.net/forums/ |
|
[General] Stop Player Names from going offscreen http://www.miragesource.net/forums/viewtopic.php?f=183&t=4368 |
Page 1 of 49 |
Author: | Jacob [ Fri Sep 19, 2008 4:59 pm ] |
Post subject: | [General] Stop Player Names from going offscreen |
This will prevent Player Names from going off screen. modText Sub DrawPlayerName Find Code: ' Determine location for text TextX = GetPlayerX(Index) * PIC_X + Player(Index).XOffset + (PIC_X \ 2) - ((Len(GetPlayerName(Index)) / 2) * 8) TextY = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - (PIC_Y \ 2) - 4 Right After Add Code: If TextY <= 0 Then TextY = 0 If TextX <= 0 Then TextX = 0 If TextX + (Len(GetPlayerName(Index)) * 8) >= DDSD_BackBuffer.lWidth Then TextX = DDSD_BackBuffer.lWidth - (Len(GetPlayerName(Index)) * 8) Pictures: |
Author: | Mattyw [ Fri Sep 19, 2008 7:32 pm ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Works epicly. Thanks. =-p |
Author: | Robin [ Fri Sep 19, 2008 7:35 pm ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Coulda just ripped it from Essence xD |
Author: | GIAKEN [ Fri Sep 19, 2008 7:36 pm ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
I did this for Elmysia after I saw it done on Mirage Realms |
Author: | Jacob [ Fri Sep 19, 2008 8:00 pm ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Yeah you could rip it from something, but i'm inflating my epenis with the most tutorials. |
Author: | Mattyw [ Fri Sep 19, 2008 8:01 pm ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Race system then. =-p Another tutorial! ;D |
Author: | Jacob [ Fri Sep 19, 2008 8:01 pm ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
I don't take requests. |
Author: | Mattyw [ Sat Sep 20, 2008 12:27 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Modification to work for NPC's: CLIENT Look for "Sub BltNPCName", then scroll down until: Code: 'Draw name TextX = MapNpc(Index).X * PIC_X + MapNpc(Index).XOffset + CLng(PIC_X / 2) - ((Len(Trim$(.Name)) / 2) * 8) TextY = MapNpc(Index).Y * PIC_Y + MapNpc(Index).YOffset - CLng(PIC_Y / 2) - 4 Then add the following directly after it: Code: If TextY <= 0 Then TextY = 0 If TextX <= 0 Then TextX = 0 If TextX + (Len(MapNpc(Index)) * 8) >= DDSD_BackBuffer.lWidth Then TextX = DDSD_BackBuffer.lWidth - (Len(MapNpc(Index)) * 8) This must be after it: Code: DrawText TexthDC, TextX, TextY, Trim$(.Name), vbWhite Enjoy. |
Author: | GIAKEN [ Sat Sep 20, 2008 1:27 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
The best way to do it would to just do it in Sub DrawText. |
Author: | wanai [ Mon Dec 27, 2021 10:50 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
XVII |
Author: | wanai [ Mon Dec 27, 2021 10:51 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
48.8 |
Author: | wanai [ Mon Dec 27, 2021 10:52 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Bett |
Author: | wanai [ Mon Dec 27, 2021 10:54 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Bett |
Author: | wanai [ Mon Dec 27, 2021 10:55 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Jump |
Author: | wanai [ Mon Dec 27, 2021 10:56 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Part |
Author: | wanai [ Mon Dec 27, 2021 10:57 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Thre |
Author: | wanai [ Mon Dec 27, 2021 10:58 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
XVII |
Author: | wanai [ Mon Dec 27, 2021 10:59 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Flem |
Author: | wanai [ Mon Dec 27, 2021 11:00 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Made |
Author: | wanai [ Mon Dec 27, 2021 11:01 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Baby |
Author: | wanai [ Mon Dec 27, 2021 11:02 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Dart |
Author: | wanai [ Mon Dec 27, 2021 11:04 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Sifr |
Author: | wanai [ Mon Dec 27, 2021 11:05 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
Cher |
Author: | wanai [ Mon Dec 27, 2021 11:06 am ] |
Post subject: | Re: [General] Stop Player Names from going offscreen |
ZORL |
Page 1 of 49 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |