Vice City Multiplayer

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

Title: HP Script
Post by: Tamas on August 02, 2008, 02:53:58 AM
Does anybody know how the vcmp.sethp command work?
Cuz the !setcarhp function not work too.
Quotevcmp.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, 06:33:47 AM
  elseif (($2 == !sethp) && ($vcmp.loggedin($1) > 2)) {
    vcmp.sethp $3 $4-
    vcmp.adminchat **Admin $vcmp.hgetname($1) Sets:[ $vcmp.hgetname($3) ] HP To:[ $4- ]
  }


vcmp.sethp %id 100 Work 100%  ;)
Title: Re: HP Script
Post by: Tamas on August 02, 2008, 01:38:04 PM
Work  :D
Title: Re: HP Script
Post by: TanaX01 on August 02, 2008, 09:51:42 PM
Quote from: [SRS]Tomi on August 02, 2008, 01:38:04 PM
Work  :D

ok no problem  ;)
Title: Re: HP Script
Post by: GTA-Roloboy on August 03, 2008, 05: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, 05:36:57 PM
Its work fine with "-" symbol too.
Title: Re: HP Script
Post by: GTA-Roloboy on August 03, 2008, 06: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, 07:06:14 PM
Quote from: GTA-Roloboy on August 03, 2008, 06:33:12 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, 04: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 05, 2008, 11:42:45 PM
And how can i set this command to work from IRC too?
I tryed this:

Code:
Quoteelseif ($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, 05:12:05 PM
Is it sasan?
Title: Re: HP Script
Post by: Tamas on August 06, 2008, 08:16:43 PM
Yes
Title: Re: HP Script
Post by: thijn on August 08, 2008, 02:18:41 PM
Quote from: [SRS]Tomi on August 05, 2008, 11:42:45 PM
And how can i set this command to work from IRC too?
I tryed this:

Code:
Quoteelseif ($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:
Quoteelseif ($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- ] }
;)