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

Custom Slash Commands


WiseRock
 Share

Recommended Posts

EDIT: Need someone to Move to Tutoral: Source!

Hello Today We are going to make custom slash commands

like /levelup or /screenshot

Lets get Started

First go to

modInput

To make your own Custom Command use this

```
'

Case "name of your Command"

If GetPlayerAccess(MyIndex) < What Access does the player have to be? Then GoTo Continue

If UBound(Command) < 1 Then

AddText "Usage: /Command name ", red

GoTo Continue

End If

If Not IsNumeric(Command(1)) Then

AddText "Usage: /Command Name ", red

GoTo Continue

End If

SendCommandName

```

For Example lets say we would like to use /levelup

you would do

```

Case "/levelup"

If GetPlayerAccess(MyIndex) < RankMapper Then GoTo Continue

If UBound(Command) < 1 Then

AddText "Usage: /levelup", red

GoTo Continue

End If

If Not IsNumeric(Command(1)) Then

AddText "Usage: /levelup", red

GoTo Continue

End If

SendRequestLevelUp

```

That Basically Wraps up this tutorial

Again Thank me by playing my game when beta comes out!
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
How would one make a /time slash command which shows the real life time? [example: "You check your watch. The real world time is 00:00 am/pm".] or an emote slash command like /e text so you could be like "/e takes a sip of coffee." would turn out as "charactername takes a sip of coffee."?
Link to comment
Share on other sites

  • 3 months later...
> Um. I got a bit of a question. What if I wanted to add like, a slap command? Say such as, /slap playername. Then it would insert a message?

You can do what Peace said but if you want the other player to know that he was 'slapped' then you will have to send a packet for the command.
Link to comment
Share on other sites

> You can do what Peace said but if you want the other player to know that he was 'slapped' then you will have to send a packet for the command.

Thanks! But uh, how do I do that? I'm more of an artist then a coder, so help would always be appreciated.
Link to comment
Share on other sites

  • 1 month later...
  • 3 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...