WiseRock Posted November 23, 2012 Author Share Posted November 23, 2012 EDIT: Need someone to Move to Tutoral: Source!Hello Today We are going to make custom slash commandslike /levelup or /screenshotLets get StartedFirst go tomodInputTo 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 ContinueIf UBound(Command) < 1 ThenAddText "Usage: /Command name ", redGoTo ContinueEnd IfIf Not IsNumeric(Command(1)) ThenAddText "Usage: /Command Name ", redGoTo ContinueEnd IfSendCommandName```For Example lets say we would like to use /levelupyou would do```Case "/levelup"If GetPlayerAccess(MyIndex) < RankMapper Then GoTo ContinueIf UBound(Command) < 1 ThenAddText "Usage: /levelup", redGoTo ContinueEnd IfIf Not IsNumeric(Command(1)) ThenAddText "Usage: /levelup", redGoTo ContinueEnd IfSendRequestLevelUp```That Basically Wraps up this tutorialAgain Thank me by playing my game when beta comes out! Link to comment Share on other sites More sharing options...
teamokell Posted November 23, 2012 Share Posted November 23, 2012 pretty good. keep doing tutorials as well. Link to comment Share on other sites More sharing options...
WiseRock Posted December 8, 2012 Author Share Posted December 8, 2012 [German Version of this tutorial](http://www.touchofdeathforums.com/community/index.php?/topic/130872-benutzerdefinierte-slash-befehl/#entry869560)Used google Translate Link to comment Share on other sites More sharing options...
Ganjika Posted December 20, 2012 Share Posted December 20, 2012 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 More sharing options...
Growlith1223 Posted December 20, 2012 Share Posted December 20, 2012 ```AddText "Your time is: " & Date(Now), Blue```Date will give you the time plus the date. Link to comment Share on other sites More sharing options...
BlueBean Posted April 15, 2013 Share Posted April 15, 2013 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? Link to comment Share on other sites More sharing options...
boyesjs03 Posted April 15, 2013 Share Posted April 15, 2013 > 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?Addtext (GetPlayerName.(MyIndex)) "Slapped" ā¦ Link to comment Share on other sites More sharing options...
abhi2011 Posted April 16, 2013 Share Posted April 16, 2013 > 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 More sharing options...
boyesjs03 Posted April 16, 2013 Share Posted April 16, 2013 Theres a broadcast command right? Link to comment Share on other sites More sharing options...
abhi2011 Posted April 16, 2013 Share Posted April 16, 2013 > Theres a broadcast command right?Global chat yes, player messaging no. Link to comment Share on other sites More sharing options...
boyesjs03 Posted April 16, 2013 Share Posted April 16, 2013 Thought so. Link to comment Share on other sites More sharing options...
BlueBean Posted April 17, 2013 Share Posted April 17, 2013 > 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 More sharing options...
Lala55 Posted May 28, 2013 Share Posted May 28, 2013 hi Render!Your post is so nice, thanks for tell us Custom Slash Commands code with examples. I like it and i try this code. Link to comment Share on other sites More sharing options...
WiseRock Posted June 12, 2013 Author Share Posted June 12, 2013 > hi Render!> > Your post is so nice, thanks for tell us Custom Slash Commands code with examples. I like it and i try this code.No ProblemĀ :) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now