Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[General] Stop Player Names from going offscreen
#1
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
Reply
#2
Works epicly. Thanks. =-p
Reply
#3
Coulda just ripped it from Essence xD
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#4
I did this for Elmysia after I saw it done on Mirage Realms Big Grin
Reply
#5
Yeah you could rip it from something, but i'm inflating my epenis with the most tutorials.
Reply
#6
Race system then. =-p

Another tutorial! ;D
Reply
#7
I don't take requests.
Reply
#8
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
Reply
#9
The best way to do it would to just do it in Sub DrawText.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)