Author Topic: Heal command for WSV..  (Read 10291 times)

0 Members and 3 Guests are viewing this topic.

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Heal command for WSV..
« on: September 26, 2008, 12:57:36 pm »
Code: [Select]
elseif (heal == $3) {
  WSV.cmdlevelcheck $1-
  if (Hospital isin $WSV.loco($2)) {
   if ($WSV.money >= 500) {
      hdec WSV.money $WSV.name($2) 500
      WSV.setcash $2 $WSV.money($3)
      WSV.sethealth $1 100
      WSV.announce $2 You are healed by the doctors of the hospital.
    }
    else WSV.msg $2 You need at least 500
  }
  else WSV.msg $2 You need to be Hospital.
}

Any problem in this code not working..... :(
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Windlord

  • Guest
Re: Heal command for WSV..
« Reply #1 on: September 26, 2008, 02:24:08 pm »
It's

WSV.sethealth $2 100


not


WSV.sethealth $1 100

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: Heal command for WSV..
« Reply #2 on: September 26, 2008, 07:08:33 pm »
Ok i will test it  ;)
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: Heal command for WSV..
« Reply #3 on: September 29, 2008, 02:55:46 pm »
So guys the right code for !heal is this one.. ;)

Code: [Select]
elseif (heal == $3) {
  WSV.cmdlevelcheck $1-
  if (Hospital isin $WSV.loco($2)) {
   if ($WSV.money >= 500) {
      hdec WSV.money $WSV.name($2) 500
      WSV.setcash $2 $WSV.money($3)
      WSV.sethealth $2 100
      WSV.announce $2 You are healed by the doctors of the hospital.
    }
    else WSV.msg $2 You need at least 500
  }
  else WSV.msg $2 You need to be Hospital.
}
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: Heal command for WSV..
« Reply #4 on: October 15, 2008, 06:48:20 pm »
do i need to save the loc of hospitals?

i want both hospitals and medic store to heal?

is it possible to have prop heal along with it, coz in wsv0.3 only prop heal is there, so i want the add the above too, any help regarding this would be appreciated!

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: Heal command for WSV..
« Reply #5 on: October 17, 2008, 01:08:31 pm »
Hey evil night try this one out..u have said that u want to add two locations at one time ...i have done this for u.. ;)

Code: [Select]
elseif (aspirine == $3) {
    if (* $+ [ Your first location] $+ * iswm $WSV.loco($1)) || (* $+ [ Your second location ] $+ * iswm $WSV.loco($1)) {     
     if ($WSV.money($2) >= 500) {
          hdec WSV.money $WSV.name($2) 500
          WSV.setcash $2 $WSV.money($2)
          WSV.sethealth $2 100
          WSV.announce $2 You are healed by the doctors of the hospital.
        }
        else WSV.msg $2 You need at least 500
      }
      else WSV.msg $2 You need to be Hospital.
    }

Cya
Punjabi_goli
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: Heal command for WSV..
« Reply #6 on: October 17, 2008, 03:49:32 pm »
well thnkx

do i need to give a location name or will it auto identify the hospitals and medic stores??

where do i place this code, if i place it somewhere, it says You need to be at ur prop to heal!

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: Heal command for WSV..
« Reply #7 on: October 18, 2008, 04:09:23 am »
well u have to place the location names urself it will not auto identify i have already left the place for writing place names and u have to use this command in serve by typing !aspirine thats all and if u want to edit the place name u have to loc the place use in server !location to identify the location name and then edit that place in script where i left the place for writing..here..  ;)

Code: [Select]
if (* $+ [ Your first location] $+ * iswm $WSV.loco($1)) || (* $+ [ Your second location ] $+ * iswm $WSV.loco($1)) {     
Cya
Punjabi_goli
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: Heal command for WSV..
« Reply #8 on: October 18, 2008, 03:03:13 pm »
still the aspirin command, is not detected by the game, it says invalid command,

is there any place that u would like 2 recommend to inject this code?

btw in the location name, i gave the location which i took from areas.ini, is that rite?

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: Heal command for WSV..
« Reply #9 on: October 18, 2008, 05:44:21 pm »
Yes i recommend this place near the ammunation where two ambulance are placed .. ;)

Code: [Select]
if (* $+ [ Schuman Health Care Center-Downtown ] $+ * iswm $WSV.loco($1))
Cya
Punjabi_goli

GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: Heal command for WSV..
« Reply #10 on: October 18, 2008, 05:56:35 pm »
still it says invalid command  :(

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: Heal command for WSV..
« Reply #11 on: October 18, 2008, 06:01:36 pm »
than u have pasted it at wrong place.. :-*
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: Heal command for WSV..
« Reply #12 on: October 18, 2008, 06:04:37 pm »
than u have pasted it at wrong place.. :-*

iam asking u from the beginning where to paste, u never seems to answer that!

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: Heal command for WSV..
« Reply #13 on: October 18, 2008, 06:24:56 pm »
paste it below this command ... :-\

Code: [Select]
elseif (getc == $3) {
Do i need to identify anything else.. :(


GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: Heal command for WSV..
« Reply #14 on: October 18, 2008, 07:00:20 pm »
paste it below this command ... :-\

Code: [Select]
elseif (getc == $3) {
Do i need to identify anything else.. :(




thnkx the command works now, but iam not getting healed, it says i should be at hospital, but iam at the hospital!