Author Topic: HP Script  (Read 6698 times)

0 Members and 1 Guest are viewing this topic.

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
HP Script
« 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


Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: HP Script
« Reply #1 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%  ;)

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: HP Script
« Reply #2 on: August 02, 2008, 02:38:04 pm »
Work  :D

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: HP Script
« Reply #3 on: August 02, 2008, 10:51:42 pm »

Offline GTA-Roloboy

  • Made Man
  • ***
  • Posts: 135
    • View Profile
Re: HP Script
« Reply #4 on: August 03, 2008, 06:34:30 pm »
I should use vcmp.sethp $3 $4 not vcmp.sethp $3 $4-

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: HP Script
« Reply #5 on: August 03, 2008, 06:36:57 pm »
Its work fine with "-" symbol too.

Offline GTA-Roloboy

  • Made Man
  • ***
  • Posts: 135
    • View Profile
Re: HP Script
« Reply #6 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

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: HP Script
« Reply #7 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  ;)

Offline Tommis

  • VC:MP Beta Tester (inactive)
  • Wiseguy
  • *
  • Posts: 56
    • View Profile
Re: HP Script
« Reply #8 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

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: HP Script
« Reply #9 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

szostol

  • Guest
Re: HP Script
« Reply #10 on: August 06, 2008, 06:12:05 pm »
Is it sasan?

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: HP Script
« Reply #11 on: August 06, 2008, 09:16:43 pm »
Yes

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: HP Script
« Reply #12 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- ] }
;)