Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
/setname
#1
I'm sure I can do this by myself, I think. Anyways, the only trouble I'm having is figuring out what N should =, I don't think it should be a value, lol. I was thinking of Dimming N as a string, but from then on I'm lost. Any help would be appreciated.

[spoiler]
Code:
' :::::::::::::::::::::::
' ::  Set name packet  ::
' :::::::::::::::::::::::
Sub HandleSetName(ByVal Index As Long, ByRef Parse() As String)
Dim n As Long

    ' Prevent hacking
    If GetPlayerAccess(Index) < ADMIN_MAPPER Then
        Call HackingAttempt(Index, "Admin Cloning")
        Exit Sub
    End If
    
    ' The name
    n = Val(Parse(1))
    
    Call SetPlayerName(Index, n)
    Call SendPlayerData(Index)
    Exit Sub
End Sub
[/spoiler]
Reply
#2
n = FindPlayer(Parse(1))

SetPlayerName(n, Parse(2))

Client:

SendData(whatever & sep_char & Command(1) & sep_char & Command(2) & end_char)

/setname Giaken Giakenn

There's a lot more checks you should do though. Like making sure Command 1 and 2 aren't the same and so on. EXPERIMENT WITH IT!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)