Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Map Name in Title Bar
#1
Author: derNalia
Difficulty: 1/5

This tutorial will show you how to put the map's name into the title bar.

:: CLIENT SIDE ::
In modGameLogic, find:
Code:
' Draw map name
              If Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NONE Then
                  Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim(Map(GetPlayerMap(MyIndex)).Name), QBColor(BrightRed))
              ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_SAFE Then
                  Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim(Map(GetPlayerMap(MyIndex)).Name), QBColor(White))
              ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NO_PENALTY Then
                  Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim(Map(GetPlayerMap(MyIndex)).Name), QBColor(Black))
              End If
Comment that whole bit out.

Beneath that, add:
Code:
'Map Name in Title Bar
              If Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NONE Then
                  frmMirage.Caption = "GAME_NAME - " & (Map(GetPlayerMap(MyIndex)).Name) & " (No Morals)"
              ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_SAFE Then
                  If Map(GetPlayerMap(MyIndex)).Right = 36 And Map(GetPlayerMap(MyIndex)).Left = 366 And Map(GetPlayerMap(MyIndex)).Up = 2 Then
                  frmMirage.Caption = "GAME_NAME" & " (Safe Zone)"
                  Else
                  frmMirage.Caption = "GAME_NAME - " & (Map(GetPlayerMap(MyIndex)).Name) & " (Safe Zone)"
                  End If
              ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NO_PENALTY Then
                 frmMirage.Caption = "GAME_NAME - " & (Map(GetPlayerMap(MyIndex)).Name) & " (No Death Penalty)"
              End If
That's all!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)