Jump to content

Question

Posted

I'm not sure if this is the right section for this because I'm not sure if this is a source question or what.

I need to add an @command "@support" and all it does is open a script... Similar to whisper system

7 answers to this question

Recommended Posts

Posted


OnInit:

        bindatcmd("<any command you want to use>",strnpcinfo(3)+ "::OnExe");

        end;

OnExe:

// Execute code when the binded command was triggered by the user

  • Upvote 2
Posted

Please read the Wiki page I linked...

.@atcmd_numparameters: The number of parameters defined.

.@atcmd_parameters$[]: Array containing the given parameters, starting from an index of 0.

Posted
.@atcmd_command$       =  The name of the @command used.
.@atcmd_parameters$[]  =  Array containing the given parameters, starting from an index of 0.
.@atcmd_numparameters  =  The number of parameters defined.

You can get command parameters with .@atcmd_parameters$[index].

So, @test a b would result in this:

.@atcmd_command$        = @test
.@atcmd_parameters$[0]  = a
.@atcmd_parameters$[1]  = b
.@atcmd_numparameters   = 2
  • Upvote 1
Posted

@Euphy...

I'm aware of the link... I actually knew about that page, I just didn't understand it before. Thanks for the replies everyone...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...