• Welcome to Vice City Multiplayer.
 

How To !cmd to /c <cmd> ?

Started by Dudu, February 06, 2009, 10:06:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dudu

Pls help me!
Gus 9.0
Announce!
I use the command now: !say
How to !cmd to /c cmd

code:
Quoteelseif ($2 == !say) {
    if ($vcmp.cmdcheck(!say,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <text>
    else {
      var %a = 0
      while (%a <=  50) {
        if ($vcmp.name(%a) != Unknown) {
          vcmp.announce  %a  $3-
        }
        !inc %a
      }
    }
  }

Dudu


Vayan

#2
The simpliest way for one command - is just put to it in checking of vcmp.command2 signals. Just add before the string
else vcmp.msg %id Error - Invalid System Command $+ , Type "!commands" for a list of commands!
The code for checking say command:
  elseif ($2 == say) {
    if ($vcmp.cmdcheck(!say,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <text>
    else {
      var %a = 0
      while (%a <=  50) {
        if ($vcmp.name(%a) != Unknown) {
          vcmp.announce  %a  $3-
        }
        !inc %a
      }
    }
  }

Good luck!

Dudu