Vice City Multiplayer

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

Title: Heal command for WSV..
Post by: Punjabi 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..... :(
Title: Re: Heal command for WSV..
Post by: Windlord on September 26, 2008, 02: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, 07:08:33 pm
Ok i will test it  ;)
Title: Re: Heal command for WSV..
Post by: Punjabi 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.
}
Title: Re: Heal command for WSV..
Post by: evil_night13 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!
Title: Re: Heal command for WSV..
Post by: Punjabi 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
Title: Re: Heal command for WSV..
Post by: evil_night13 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!
Title: Re: Heal command for WSV..
Post by: Punjabi 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
Title: Re: Heal command for WSV..
Post by: evil_night13 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?
Title: Re: Heal command for WSV..
Post by: Punjabi 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

Title: Re: Heal command for WSV..
Post by: evil_night13 on October 18, 2008, 05:56:35 pm
still it says invalid command  :(
Title: Re: Heal command for WSV..
Post by: Punjabi on October 18, 2008, 06: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, 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!
Title: Re: Heal command for WSV..
Post by: Punjabi 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.. :(


Title: Re: Heal command for WSV..
Post by: evil_night13 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!
Title: Re: Heal command for WSV..
Post by: Punjabi on October 19, 2008, 11: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, 12:20:37 pm
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, 01: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, 01:47:22 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, 04:07:58 pm
No problem ::)