Jump to content
  • 0

Custom Console Commands


deltagi

Question

9 answers to this question

Recommended Posts

  • 0

you could make a script that gets input from the chat like


_chat = _display displayCtrl 28;
_text = ctrlText _chat;
 
if(_tex in ["/rules"]) then {
systemChat "====Rules====";
sleep 0.5;
systemChat "No Haxors";
sleep 0.5;
systemChat "No camping safezones";
sleep 0.5;
systemChat "Kill me";
sleep 0.5;
systemChat "Love infiSTAR";
};

should work. you will need to double check the displayCtrl number for the chat box because I can't remember, if I find out ill update the post

Link to comment
Share on other sites

  • 0

Fixed a typo for ya Dean

 

_chat = _display displayCtrl 28;
_text = ctrlText _chat;

while {alive player} do {
if(_text in ["/rules"]) then {
systemChat "====Rules====";
sleep 0.5;
systemChat "No Haxors";
sleep 0.5;
systemChat "No camping safezones";
sleep 0.5;
systemChat "Kill me";
sleep 0.5;
systemChat "Love infiSTAR";
};
sleep 1;
};
Link to comment
Share on other sites

  • 0

that still didn't work, no errors but it didn't recognize the text at all.

-Aurora

is there a already made file in compiles.sqf to use?

 

If you haven't already, then  I believe you are going to have to loop that if conditional.  I would suggest trying to add it into a while loop that's conditional is always true.

_condition = true;

while {_condition} do {

// if condition then execute code

};

[Edit] Never mind, I just realized that Gr8 had already mentioned using a while loop.

Link to comment
Share on other sites

  • 0

Also, if you have Infistar AH, then I would just suggest attempting to add in new commands to the AH.sqf.  Just open up the file, hit ctrl+F, search for "dance," and you will see all of the commands.  That would probably be your best bet.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...