• Welcome to Vice City Multiplayer.
 

how make my own command?

Started by jason, July 20, 2008, 06:29:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jason

hello

how can i make my own command for sansan v3?


and how can i add the !heal command in sansan v3?

thijn

#1
its easy to add your own command in SanSan,
If you want a command like /c <command here> you have to change the
on *:SIGNAL:vcmp.event.command:
simply add a line (at the end):elseif ($2 == here you comand) { Here the code you want to run when the command is typed }
If you want a command like !command here
you have to change the
on *:SIGNAL:vcmp.event.gamecmd
simply add a line: elseif ($2 == !here your command) { Here the code you want to run when the command is typed }

I hope that helped ;)


Quote from: jason on July 20, 2008, 06:29:09 PM
and how can i add the !heal command in sansan v3?
Try this:

    elseif ($2 == !heal) {
vcmp.sethp $1 100
vcmp.adminmsg %id You healed
    }

Or if you want the players to pay:

    elseif ($2 == !heal) {
var %cost = Here the amount you want it to cost
vcmp.sethp $1 100
vcmp.setmon %id $calc($vcmp.hgetmoney(%id) - %cost
vcmp.adminmsg %id You healed
    }


jason

when i type !heal to hel me i die

lol

thijn

lolz, try this:
Command:

elseif ($2 == !heal) {
vcmp.cmd.healplayer $1
    }

Alias:

alias vcmp.cmd.healplayer {
  var %id = $vcmp.nameid($$1-)
  var %hp = 100
  var %amount = 1000
  if (%amount >= $vcmp.hgetmoney(%id)) {
    vcmp.gametextpm %id ~a~ Not enough money...
    vcmp.adminmsg %id You need 1000!
  }
  else {
    vcmp.adminchat ** Heal -  Player: $chr(91) $vcmp.hgetname($vcmp.nameid($1)) $chr(93)
    vcmp.adminmsg %id You healed -  Cost: 1000
    vcmp.sethp %id %hp
  vcmp.setmon %id $calc($vcmp.hgetmoney(%id) - 1000) }
}


jason


TanaX01


jason

#6
it do nothing

it says:

heal - player: []




help

Hancock

Hi, How Can I heal 200 in hp Coz it exist in GTA-vc
Hancock Of VC-MP


thijn



Tamas

He can  :P Just the vc-mp automatically sets his hp back to 100.

thijn

Quote from: [SRS]Tomi on December 10, 2008, 03:04:17 PM
He can  :P Just the vc-mp automatically sets his hp back to 100.
Lolz, Why u post this? I allready told him :P