Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Mixing the Dev tag with Show Level Code!(now uses code tags >.>)


SpiceyWolf
 Share

Recommended Posts

IN CASE I FORGOT THE WHOLE BUTTON CODE ITS MADE LIKE THIS… PUT A CHECK BOX WHERE YOU WANT IT TO BE USED, THEN THE CODE YOU WANTED THE BUTTON TO AFFECT YOU MUST HAVE
frm(form location).(name of new checkbox button) = 0(or 1 depending if its checked on or not for the effect) Then
THIS IS ALL ONE LINE I WENT OFF TELLING STUFF... BUT AFTERWARDS COPY YOUR ENTIRE CODE, PUT ELSE UNDERNEATH AND PLACE A COPY THEN MAKE THE CHANGES U WANT TO HAVE WHEN U HAVE TURNED ON/OFF THE BUTTON. IF THE CHECKBOX IS = 0 ITS OFF EFFECT IF THE CHECKBOX IS = 1 IT IS ON EFFECT

Ok This is my first participation to the forum.(figured i could give back since i found something on my own with my noob skills and never opening a book to learn VB XD)

Thank Zafi and Chuchoide for these base tutorials :P check them out here :
http://www.touchofdeathforums.com/smf/index.php/topic,72411.0.html ZAFI
http://www.touchofdeathforums.com/smf/index.php/topic,72727.0.html CHUCHOIDE

Start off by searching for

```
Name = Trim$(Player(Index).Name)
```
in the ModText Module.
Overwrite with this starting off
```
If GetPlayerAccess(Index) = 0 Then

End If

```In between those in that space there, put this
```
    Name = Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)
    ElseIf GetPlayerAccess(Index) = 1 Then
    Name = "[Mod]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)

```The thing where it sais mod is just the extra tag it puts when u find the access level in the thing above…
And if you want to have something other that just Lv like have the lvl in parenthases or something change:
```
" Lv" & GetPlayerLevel(Index)
```to
```
" Lv" & GetPlayerLevel(Index) & "Lv"

```and change the "Lv's" to what u want it to show in ur codes.
to add the other access levels just copy
```
    ElseIf GetPlayerAccess(Index) = 1 Then
    Name = "[Mod]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)

```over 3 more times and change 1 to the access level and change the mod tag.

to look like this
```
    ElseIf GetPlayerAccess(Index) = 1 Then
    Name = "[MOD]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)
    ElseIf GetPlayerAccess(Index) = 2 Then
    Name = "[MPR]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)
    ElseIf GetPlayerAccess(Index) = 3 Then
    Name = "[DEV]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)
    ElseIf GetPlayerAccess(Index) = 4 Then
    Name = "[ADMIN]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)

```Done. When you ARE done… your end results should look like this

```
If GetPlayerAccess(Index) = 0 Then
    Name = Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)
    ElseIf GetPlayerAccess(Index) = 1 Then
    Name = "[MOD]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)
    ElseIf GetPlayerAccess(Index) = 2 Then
    Name = "[MPR]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)
    ElseIf GetPlayerAccess(Index) = 3 Then
    Name = "[DEV]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)
    ElseIf GetPlayerAccess(Index) = 4 Then
    Name = "[ADMIN]" Trim$(Player(Index).Name) & " Lv" & GetPlayerLevel(Index)
End If

```If you wanna make the option button AND mix it with this you only need to add :
```
If frmMain.ChckLv = 1 Then

```under
```
If GetPlayerAccess(Index) = 0 Then

```and put the "without level" code… which looks like this by example
```
Else
    Name = Trim$(Player(Index).Name)
End If

```So lets review that…

```
If GetPlayerAccess(Index) = 0 Then   
If frmMain.ChckLv = 1 Then
    Name = Trim$(Player(Index).Name) & "Lv" & GetPlayerLevel(Index)
    Else
    Name = Trim$(Player(Index).Name)
    End If
    Name = "MOD" & Trim$(Player(Index).Name) & "Lv" & GetPlayerLevel(Index)
    Else
    Name = "MOD" &Trim$(Player(Index).Name)
    End If

```and so on …
and make the check button in the options menu... named ChckLv
DONE.
End code should look something like the way i Have it.

```
If GetPlayerAccess(Index) = 0 Then   
If frmMain.ChckLv = 1 Then
    Name = Trim$(Player(Index).Name) & " (" & GetPlayerLevel(Index) & ")"
    Else
    Name = Trim$(Player(Index).Name)
    End If
    ElseIf GetPlayerAccess(Index) = 1 Then
If frmMain.ChckLv = 1 Then
    Name = "[MOD] " & Trim$(Player(Index).Name) & " (" & GetPlayerLevel(Index) & ")"
    Else
    Name = "[MOD] " & Trim$(Player(Index).Name)
    End If
    ElseIf GetPlayerAccess(Index) = 2 Then
If frmMain.ChckLv = 1 Then
    Name = "[MPR] " & Trim$(Player(Index).Name) & " (" & GetPlayerLevel(Index) & ")"
    Else
    Name = "[MPR] " & Trim$(Player(Index).Name)
    End If
    ElseIf GetPlayerAccess(Index) = 3 Then
If frmMain.ChckLv = 1 Then
    Name = "[ADM] " & Trim$(Player(Index).Name) & " (" & GetPlayerLevel(Index) & ")"
    Else
    Name = "[ADM] " & Trim$(Player(Index).Name)
    End If
    ElseIf GetPlayerAccess(Index) = 4 Then
If frmMain.ChckLv = 1 Then
    Name = "[DEV] " & Trim$(Player(Index).Name) & " (" & GetPlayerLevel(Index) & ")"
    Else
    Name = "[DEV] " & Trim$(Player(Index).Name)
    End If
End If

```And in Game u should look like this:http://i1097.photobucket.com/albums/g349/SpiceyWolf/Example.png

DONE now you know how to get both of them! again thanks guys for your wonderfull base codes :P
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...