Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't get a case to work right.
#1
Now, I just copied the /away case and edited it some. This should change the player name to " ", right? It doens't even respond when I type in "/ghost"..

Code:
Case "/ghost"
        'If GetPlayerAccess(index) >= 1 Then
            If GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Ghost") = 0 Then
                Call PlayerMsg("Ghost mode active...", 14)
                Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Ghost", 1)
                Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName", GetPlayerName(index))
                Call SetPlayerName(index, "   ")
                Call SendPlayerData(index)
                Exit Sub
            ElseIf GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Ghost") = 1 Then
                Call SetPlayerName(index, GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName"))
                Call PlayerMsg("Ghost mode deactivated...", 14)
                Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Ghost", 0)
                Call SendPlayerData(index)
                Exit Sub
            End If
        'End If
I also want it to set the player sprite to, say, 0, which happens to be the null color. But I still have to figure that out.
Code:
Call SetPlayerSprite(Index, 0)
?

Edit: Now "/away" doesn't even respond o.O
Reply
#2
Where is this in your source?

I've never added the /away tut. =/
Reply
#3
It's in my Scripts folder under Main.
Reply
#4
Oh, Elysium.
Reply
#5
Elysium is crap. xD

We'll help you out if you're adding something in that you're coding yourself, or if you need general help coding and such, but when it comes to current ES code/tutorials, I'd rather not have anything to do with it.

You really should switch to MS. I'd be more than happy to help you with stuff then. ^_^
Reply
#6
You should uncomment that last End If. You have two ifstatements, and one EndIf. There is a sub in ES that handles Sadscript errors, but the actual logging of it is commented out.

Furthermore, like the above people, I can suggest getting help at ES, most people here don't use scripting in their game/engine.

/my bad, just saw the first If statement is commented out as well, consider this post worthless.
Reply
#7
Yeah, I know you guys don't support ES here. I was just hoping to get it working. Anyway, I'm pulling a mulligan, this never happened.
Reply
#8
I'd help but, I've only opened up ES a handful of times; so I wouldn't really know what I'm talking about.

Although since it's a string case, I'm assuming that sub from the script is called when a player sends chat text.. so I really dunno why it's not working.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)