Mirage Source
Another Question - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Another Question (/showthread.php?tid=2136)



Another Question - skillzalot - 20-09-2008

Everything in doomteams admin panel works until here. I am using MSE2
Just so you know I added the whole form
Code:
Private Sub btnBan_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_CREATOR Then
        Call SendBan(Trim$(txtPlayer.Text))
    Else: Auth = "You are not authorized to carry out that action"
         Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnedititem_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then
        Call SendRequestEditItem
    Else: Auth = "You are not authorized to carry out that action"
         Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnEditNPC_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then
        Call SendRequestEditNpc
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnEditShops_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then
        Call SendRequestEditShop
    Else: Auth = "You are not authorized to carry out that action"
         Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btneditspell_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then
        Call SendRequestEditSpell
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnKick_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_MONITER Then
        Call SendKick(frmAdmin.txtPlayer.Text)
        Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnLOC_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call SendRequestLocation
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnMapeditor_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call SendRequestEditMap
    Else: Auth = "You are not authorized to carry out that action"
             Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnPlayerSprite_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        If Trim$(txtPlayer.Text)  vbNullString Then
            If Trim$(txtSprite.Text)  vbNullString Then
                Call SendSetPlayerSprite(Trim$(txtPlayer.Text), Trim$(txtSprite.Text))
            End If
        End If
    Else: Auth = "You are not authorized to carry out that action"
    Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnRespawn_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call SendMapRespawn
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnSetAccess_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_CREATOR Then
      Call SendSetAccess(Trim$(txtPlayerAdmin.Text), Trim$(txtAccess.Text))
   Else: Auth = "You are not authorized to carry out that action"
         Call AddText(Auth, BrightRed)
   End If
End Sub

Private Sub btnSprite_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call SendSetSprite(Val(txtSprite.Text))
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnWarpMeTo_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call WarpMeTo(Trim$(txtPlayer.Text))
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If
End Sub

Private Sub btnWarpto_Click()
If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call WarpTo(Val(txtMap.Text))
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If
End Sub

It highlights Call SendSetPlayerSprite and says sub or function not defined

And How would I make it so if you click f1 you can access the panel


Re: Another Question - Nean - 20-09-2008

I suggest porting all questions over to the Admin Panel thread. The F1 question is answered over there.


Re: Another Question - skillzalot - 20-09-2008

Just so you know im using mse2


Re: Another Question - Nean - 20-09-2008

skillzalot Wrote:Just so you know im using mse2

Then use:
Code:
SetPlayerSprite
... It should work.

Edit: I helped him fix all his probs.


Re: Another Question - skillzalot - 20-09-2008

Thanks to Nean My admin panel works really good