Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: jason on July 20, 2008, 07:29:09 PM

Title: how make my own command?
Post by: jason on July 20, 2008, 07:29:09 PM
hello

how can i make my own command for sansan v3?


and how can i add the !heal command in sansan v3?
Title: Re: how make my own command?
Post by: thijn on July 20, 2008, 08:41:54 PM
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, 07: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
    }
Title: Re: how make my own command?
Post by: jason on July 20, 2008, 08:54:44 PM
when i type !heal to hel me i die

lol
Title: Re: how make my own command?
Post by: thijn on July 20, 2008, 09:00:04 PM
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) }
}
Title: Re: how make my own command?
Post by: jason on July 20, 2008, 09:02:12 PM
ok i test it
Title: Re: how make my own command?
Post by: TanaX01 on July 20, 2008, 09:04:44 PM
 nice aport ;)
Title: Re: how make my own command?
Post by: jason on July 20, 2008, 09:07:10 PM
it do nothing

it says:

heal - player: []




help
Title: Re: how make my own command?
Post by: Hancock on December 08, 2008, 11:52:24 AM
Hi, How Can I heal 200 in hp Coz it exist in GTA-vc
Title: Re: how make my own command?
Post by: thijn on December 09, 2008, 08:15:33 PM
U can't
Title: Re: how make my own command?
Post by: Tamas on December 10, 2008, 04:04:17 PM
He can  :P Just the vc-mp automatically sets his hp back to 100.
Title: Re: how make my own command?
Post by: thijn on December 10, 2008, 09:50:06 PM
Quote from: [SRS]Tomi on December 10, 2008, 04: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