Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Tamas on August 02, 2008, 03:53:58 am

Title: HP Script
Post by: Tamas on August 02, 2008, 03:53:58 am
Does anybody know how the vcmp.sethp command work?
Cuz the !setcarhp function not work too.
Quote
vcmp.sethp %id 100
Its changing the health but how can i do it if i want to change the players HP manually Example:

!sethp Tomi 89

Title: Re: HP Script
Post by: TanaX01 on August 02, 2008, 07:33:47 am
Code: [Select]
  elseif (($2 == !sethp) && ($vcmp.loggedin($1) > 2)) {
    vcmp.sethp $3 $4-
    vcmp.adminchat **Admin $vcmp.hgetname($1) Sets:[ $vcmp.hgetname($3) ] HP To:[ $4- ]
  }

Code: [Select]
vcmp.sethp %id 100 Work 100%  ;)
Title: Re: HP Script
Post by: Tamas on August 02, 2008, 02:38:04 pm
Work  :D
Title: Re: HP Script
Post by: TanaX01 on August 02, 2008, 10:51:42 pm
Work  :D

ok no problem  ;)
Title: Re: HP Script
Post by: GTA-Roloboy on August 03, 2008, 06:34:30 pm
I should use vcmp.sethp $3 $4 not vcmp.sethp $3 $4-
Title: Re: HP Script
Post by: Tamas on August 03, 2008, 06:36:57 pm
Its work fine with "-" symbol too.
Title: Re: HP Script
Post by: GTA-Roloboy on August 03, 2008, 07:33:12 pm
ye but if u do like !sethp 2 100 dr84
it may crash.. just for the safer way
Title: Re: HP Script
Post by: TanaX01 on August 03, 2008, 08:06:14 pm
ye but if u do like !sethp 2 100 dr84
it may crash.. just for the safer way

nah my !sethp no crash  ;)
Title: Re: HP Script
Post by: Tommis on August 04, 2008, 05:36:02 am
Hey,

All depends on the alias of the function. It should disregard all variables that it does not need, so using the "-" will have no effect, as for those variables will be lost.

Regards,
Tommis
Title: Re: HP Script
Post by: Tamas on August 06, 2008, 12:42:45 am
And how can i set this command to work from IRC too?
I tryed this:

Code:
Quote
    elseif ($1 == !sethp) { vcmp.sethp $vcmp.nameid($2) $4- | vcmp.adminchat Admin:[ $nick ] Changed:[ $iif($vcmp.nameid($2) != $null,$vcmp.hgetname($vcmp.nameid($2)),$2) ] HP To:[ $4- ] }

But its not showing the health number in the chat only [], and if i write !sethp Tamas 67 --> than its kill me, sets my life to 0
Title: Re: HP Script
Post by: szostol on August 06, 2008, 06:12:05 pm
Is it sasan?
Title: Re: HP Script
Post by: Tamas on August 06, 2008, 09:16:43 pm
Yes
Title: Re: HP Script
Post by: thijn on August 08, 2008, 03:18:41 pm
And how can i set this command to work from IRC too?
I tryed this:

Code:
Quote
    elseif ($1 == !sethp) { vcmp.sethp $vcmp.nameid($2) $4- | vcmp.adminchat Admin:[ $nick ] Changed:[ $iif($vcmp.nameid($2) != $null,$vcmp.hgetname($vcmp.nameid($2)),$2) ] HP To:[ $4- ] }

But its not showing the health number in the chat only [], and if i write !sethp Tamas 67 --> than its kill me, sets my life to 0
try:
Quote
    elseif ($1 == !sethp) { vcmp.sethp $vcmp.nameid($2) $3- | vcmp.adminchat Admin:[ $nick ] Changed:[ $iif($vcmp.nameid($2) != $null,$vcmp.hgetname($vcmp.nameid($2)),$2) ] HP To:[ $4- ] }
;)