• Welcome to Vice City Multiplayer.
 

HP Script

Started by Tamas, August 02, 2008, 02:53:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tamas

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


TanaX01

  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%  ;)

Tamas


TanaX01


GTA-Roloboy

I should use vcmp.sethp $3 $4 not vcmp.sethp $3 $4-

Tamas

Its work fine with "-" symbol too.

GTA-Roloboy

ye but if u do like !sethp 2 100 dr84
it may crash.. just for the safer way

TanaX01

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  ;)

Tommis

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

Tamas

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

szostol


Tamas


thijn

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- ] }
;)