Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Punjabi on September 26, 2008, 11:57:36 AM

Title: Heal command for WSV..
Post by: Punjabi on September 26, 2008, 11:57:36 AM
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..... :(
Title: Re: Heal command for WSV..
Post by: Windlord on September 26, 2008, 01:24:08 PM
It's

WSV.sethealth $2 100


not


WSV.sethealth $1 100
Title: Re: Heal command for WSV..
Post by: Punjabi on September 26, 2008, 06:08:33 PM
Ok i will test it  ;)
Title: Re: Heal command for WSV..
Post by: Punjabi on September 29, 2008, 01:55:46 PM
So guys the right code for !heal is this one.. ;)

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.
}
Title: Re: Heal command for WSV..
Post by: evil_night13 on October 15, 2008, 05: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!
Title: Re: Heal command for WSV..
Post by: Punjabi on October 17, 2008, 12: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.. ;)

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
Title: Re: Heal command for WSV..
Post by: evil_night13 on October 17, 2008, 02: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!
Title: Re: Heal command for WSV..
Post by: Punjabi on October 18, 2008, 03: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..  ;)

if (* $+ [ Your first location] $+ * iswm $WSV.loco($1)) || (* $+ [ Your second location ] $+ * iswm $WSV.loco($1)) {     

Cya
Punjabi_goli
Title: Re: Heal command for WSV..
Post by: evil_night13 on October 18, 2008, 02: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?
Title: Re: Heal command for WSV..
Post by: Punjabi on October 18, 2008, 04:44:21 PM
Yes i recommend this place near the ammunation where two ambulance are placed .. ;)

if (* $+ [ Schuman Health Care Center-Downtown ] $+ * iswm $WSV.loco($1))

Cya
Punjabi_goli

Title: Re: Heal command for WSV..
Post by: evil_night13 on October 18, 2008, 04:56:35 PM
still it says invalid command  :(
Title: Re: Heal command for WSV..
Post by: Punjabi on October 18, 2008, 05:01:36 PM
than u have pasted it at wrong place.. :-*
Title: Re: Heal command for WSV..
Post by: evil_night13 on October 18, 2008, 05:04:37 PM
Quote from: Punjabi on October 18, 2008, 05:01:36 PM
than u have pasted it at wrong place.. :-*

iam asking u from the beginning where to paste, u never seems to answer that!
Title: Re: Heal command for WSV..
Post by: Punjabi on October 18, 2008, 05:24:56 PM
paste it below this command ... :-\

elseif (getc == $3) {

Do i need to identify anything else.. :(


Title: Re: Heal command for WSV..
Post by: evil_night13 on October 18, 2008, 06:00:20 PM
Quote from: Punjabi on October 18, 2008, 05:24:56 PM
paste it below this command ... :-\

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!
Title: Re: Heal command for WSV..
Post by: Punjabi on October 19, 2008, 10:47:13 AM
U need to identify th place if u are in [Schuman Health Care Center-Downtown] Than go to that place and then type !aspirine or tell me which place u have written where we have to go to heal..
Title: Re: Heal command for WSV..
Post by: evil_night13 on October 19, 2008, 11:20:37 AM
well i need all the hospitals and medic stores in the whole vice city , i think 4 medic stores and 3 hospitals!
Title: Re: Heal command for WSV..
Post by: Punjabi on October 19, 2008, 12:22:29 PM
Than u have to save the boundaries first then edit those boundaires in location folder like this..
Medic store= X Y Z
Hospital= X Y Z

plz edit axis in place of (X Y Z)...i think it will work..

Regards
Punjabi_goli
Title: Re: Heal command for WSV..
Post by: evil_night13 on October 19, 2008, 12:47:22 PM
Quote from: Punjabi on October 19, 2008, 12:22:29 PM
Than u have to save the boundaries first then edit those boundaires in location folder like this..
Medic store= X Y Z
Hospital= X Y Z

plz edit axis in place of (X Y Z)...i think it will work..

Regards
Punjabi_goli

thnkx for ur idea  ;D
Title: Re: Heal command for WSV..
Post by: Punjabi on October 19, 2008, 03:07:58 PM
No problem ::)