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

Map


HappyBoy
 Share

Recommended Posts

Hello,

I have a question…
I was trying to make a map in the game, so that if you press: /map it would pop-up.
So I made this in the commands sub:
```
Case "/map"
Call CustomMenuShow (Index, Map, "\GUI\Custom\Map.png",1)
```But that didn't work, so does anybody know what I did wrong? (I have never scripted b4 :p)
Link to comment
Share on other sites

might it be anything else? like… do I have to set up other things to make it work?
I've also tried jpg now...
And yeah, I'm changing the .x also -.-
This is the only scripting part I've put-in, but I couldn't find anything to make settings for it or anything...
Link to comment
Share on other sites

me 2 and it worked… btw it's not the same thing like you posted....

      Case "/map"
        Call CustomMenuShow (Index, Map, "\GUI\Custom\Map.png",1)
is yours...

      Case "/map"
        Call CustomMenuShow(Index, Map, "\GUI\Custom\Map.png", 1)

is the fixed one from me for you, which works

hope you can see the difference... it's the spaces.... after Call CustomMenuShow is NO space = Call CustomMenuShow(...)
and there's a space between "\GUI\Custom\Map.png and the 1 (i use bmp every time... dont know bout png )
Link to comment
Share on other sites

i dont see your problem…... what i posted works.. here's the sub....

```
' Executed whenever a slash command is sent to the server.
Sub Commands(Index)
Dim TextSay
Dim PlayerID
Dim MapNum

' Get the command and arguments from the cache.
TextSay = Trim(GetVar("Scripts\Command.ini", "TEMP", "Text" & Index))

' Split the command into an array. All arguments are seperated by spaces.
TextSay = Split(TextSay)

Select Case TextSay(0)
Case "/testscripts"
Call TestMain(Index)
Exit Sub

Case "/help"
Call PlayerMsg(Index, "Social Commands:", WHITE)
Call PlayerMsg(Index, "'msghere = Broadcast Message", WHITE)
Call PlayerMsg(Index, "-msghere = Emote Message", WHITE)
Call PlayerMsg(Index, "!namehere msghere = Player Message", WHITE)
Call PlayerMsg(Index, "Available Commands: /help, /info, /who, /fps, /inv, /stats, /train, /party, /join, /leave, /refresh", WHITE)
Exit Sub

Case "/calladmins"
If GetPlayerAccess(Index) = 0 Then
Call AdminMsg(GetPlayerName(Index) & " needs your help!", BRIGHTGREEN)
Else
Call PlayerMsg(Index, "You are an admin! You cannot call for help!", BRIGHTGREEN)
End If
Exit Sub

Case "/admin"
If GetPlayerAccess(Index) > 0 Then
Call PlayerMsg(Index, "Social Commands:", WHITE)
Call PlayerMsg(Index, """msghere = Global Admin Message", WHITE)
Call PlayerMsg(Index, "=msghere = Private Admin Message", WHITE)
Call PlayerMsg(Index, "Available Commands: /admin, /loc, /mapeditor, /warpmeto, /warptome, /warpto, /setsprite, /mapreport, /kick, /ban, /edititem, /respawn, /editnpc, /motd, /editshop, /ban, /editspell", WHITE)
End If
Exit Sub

Case "/warpmeto"
If GetPlayerAccess(Index) > 0 Then
PlayerID = FindPlayer(TextSay(1))

If PlayerID > 0 Then
Call PlayerWarp(Index, GetPlayerMap(PlayerID), GetPlayerX(PlayerID), GetPlayerY(PlayerID))
Call PlayerMsg(Index, "You have been warped to " & GetPlayerName(PlayerID) & ".", BROWN)
Else
Call PlayerMsg(Index, "Player is not online.", WHITE)
End If
End If
Exit Sub

Case "/warptome"
If GetPlayerAccess(Index) > 0 Then
PlayerID = FindPlayer(TextSay(1))

If PlayerID > 0 Then
Call PlayerWarp(PlayerID, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))
Call PlayerMsg(PlayerID, "You have been warped to " & GetPlayerName(Index) & ".", BROWN)
Else
Call PlayerMsg(Index, "Player is not online.", WHITE)
End If
End If
Exit Sub

Case "/warpto"
If GetPlayerAccess(Index) > 0 Then
MapNum = TextSay(1)

If MapNum > 0 And MapNum <= MAX_MAPS Then
Call PlayerWarp(Index, MapNum, GetPlayerX(Index), GetPlayerY(Index))
Call PlayerMsg(Index, "You have been warped to map #" & MapNum & ".", BRIGHTBLUE)
Else
Call PlayerMsg(Index, "Invalid map number.", BRIGHTRED)
End If
End If

      Case "/map"
        Call CustomMenuShow(Index, Map, "\GUI\Custom\Map.bmp", 1)
Exit Sub
End Select

Call PlayerMsg(Index, "That is not a valid command.", BRIGHTRED)
End Sub
```
if you dont get it to work… you're maybe stupid OR it's just your pc/vista or something else... idk...

vista fkin SUCKZ btw...
Link to comment
Share on other sites

  • 2 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...