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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)