Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: gamyster on October 16, 2008, 08:30:49 pm

Title: WSV MONEY SCRIPT ERROR
Post by: gamyster on October 16, 2008, 08:30:49 pm
Please help :- got


Quote
   elseif (withdraw* iswm $3) {
      WSV.cmdlevelcheck $1-
      if (%bankname isin $WSV.loco($2)) {
        if ($4 <= $WSV.bank($2)) || ($4 == all) {
          if ($4 == all) var %money = $hget(WSV.Bank,$WSV.getname($2))
          if ($4 <= $WSV.money($2)) var %money = $4
          hinc WSV.money $WSV.name($2) $4
          hdec WSV.bank $WSV.name($2) $4
          WSV.setcash $2 $hget(WSV.money,$WSV.getname($2))
          WSV.msg $2 You have been withdrawed $chr(91) $ $+ $4 $chr(93) from your bank account!
          WSV.msg $2 New Balance: $chr(91) $ $+ $WSV.bank($2) $chr(93)
        }
        else WSV.msg $2 You hasn't got $chr(91) $ $+ $4 $chr(93) in you're bank account!
      }
      else WSV.msg $2 You have to be at the bank!
    }

THIS SCRIPT by windlord i m having a Problem like if i try anything to buy it says u dont have enough cash like i wanna get healed or when i buy even a car Still i dont know why it gives error Saying you need 200$ but i have 9000$ :( something is error in this script the HEAL CMD i used is this one not made by me :- its made by someone in Forum



Quote
   elseif (aspirine == $3) {
      WSV.cmdlevelcheck $1-
      if (downtown 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.
    }

:( i have 9000$ it says u dont have 2000$ :( whats the error
Title: Re: WSV MONEY SCRIPT ERROR
Post by: thijn on October 16, 2008, 09:06:24 pm
Eeh, its not a Error from the heal script i think because nowere in that script does it says u dont have 2000$, It only says You need at least 500.
But maby u said something wrong :D
Anyways this should work fine:
Quote
   elseif (aspirine == $3) {
      WSV.cmdlevelcheck $1-
      if (downtown isin $WSV.loco($2)) {
       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.
    }
Title: Re: WSV MONEY SCRIPT ERROR
Post by: gamyster on October 17, 2008, 12:34:25 pm
I know that there is a Problem IN This script :-

Quote
   elseif (withdraw* iswm $3) {
      WSV.cmdlevelcheck $1-
      if (%bankname isin $WSV.loco($2)) {
        if ($4 <= $WSV.bank($2)) || ($4 == all) {
          if ($4 == all) var %money = $hget(WSV.Bank,$WSV.getname($2))
          if ($4 <= $WSV.money($2)) var %money = $4
          hinc WSV.money $WSV.name($2) $4
          hdec WSV.bank $WSV.name($2) $4
          WSV.setcash $2 $hget(WSV.money,$WSV.getname($2))
          WSV.msg $2 You have been withdrawed $chr(91) $ $+ $4 $chr(93) from your bank account!
          WSV.msg $2 New Balance: $chr(91) $ $+ $WSV.bank($2) $chr(93)
        }
        else WSV.msg $2 You hasn't got $chr(91) $ $+ $4 $chr(93) in you're bank account!
      }
      else WSV.msg $2 You have to be at the bank!
    }

Because like i have license and heal cmd i cant BUY BOTH! it says same error u dont have Enough money.
Title: Re: WSV MONEY SCRIPT ERROR
Post by: thijn on October 17, 2008, 12:44:31 pm
mmm, i donnu :-\
Title: Re: WSV MONEY SCRIPT ERROR
Post by: gamyster on October 17, 2008, 12:45:32 pm
:p NVM I FIXED IT!.
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Punjabi on October 17, 2008, 12:48:38 pm
Hey quake there is no problem in !withdraw or !deposit ,there is a problem in heal and license command try to find it yourself there is a minor mistake and thijn had replied a right heal command ....and u have seen in my server that heal command is working fine thats the clue now try to find it yourself.. ;)

Cya
Punjabi_goli
Title: Re: WSV MONEY SCRIPT ERROR
Post by: gamyster on October 17, 2008, 01:03:48 pm
Hey is $WSV.money($2) is same like WSV.money $2  ??
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Tamas on October 17, 2008, 03:51:33 pm
The heal command only works, if you are at your property (owned property)
$WSV.money($2) --> it is a command shows how much money  you have, ($2 means you.)
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 17, 2008, 03:57:03 pm
The heal command only works, if you are at your property (owned property)
$WSV.money($2) --> it is a command shows how much money  you have, ($2 means you.)

so there is no possibility to heal like LW, i.e healing at all hospitals and medic stores?
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Tamas on October 17, 2008, 04:15:58 pm
It is possible, just you have to make another command for hospital heals.
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 17, 2008, 04:30:56 pm
It is possible, just you have to make another command for hospital heals.

uhm .. can u provide one, where members should be able to heal at all hospitals and medic store?
Title: Re: WSV MONEY SCRIPT ERROR
Post by: thijn on October 17, 2008, 05:15:31 pm
maby something like:
Code: [Select]
   elseif (heal == $3) {
      WSV.cmdlevelcheck $1-
      if (hosp isin $WSV.loco($2)) || (medic isin $WSV.loco($2)) {
       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 or at a Medic Store.
    }
Think that should work only if the Areas are good, So the Hospital has Hosp in his name, and the Medic Store has medic in his name ;)
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 17, 2008, 07:29:57 pm

Think that should work only if the Areas are good, So the Hospital has Hosp in his name, and the Medic Store has medic in his name ;)

thnkx thijn, any specific place to inject this code?
Title: Re: WSV MONEY SCRIPT ERROR
Post by: thijn on October 17, 2008, 08:26:46 pm
Just add it were the other cmds are i think :D ;)
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Tamas on October 17, 2008, 10:50:50 pm
Yes, and u can set the same name for all hospitals.
Title: Re: WSV MONEY SCRIPT ERROR
Post by: thijn on October 17, 2008, 11:41:37 pm
I think thats in Areas.ini ;)
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 18, 2008, 02:17:55 pm
thnkx thijn & SRS.Tomis, will get back to u once its done  ;)

thijn ur code worked!

btw areas.ini has only one hospital, how do i add the rest medic store and other hospitals, if give the coord's and save them in areas.ini with a name eg: dispensary-downtown, its not detecting in the server!
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Punjabi on October 19, 2008, 11:48:48 am
It will not work u need the [boundaries] of the particular place.. :)
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 19, 2008, 12:19:06 pm
It will not work u need the [boundaries] of the particular place.. :)

u mean coords of the 4 corners?

if iam wrong , pls say how to get the boundaries of the particular place
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Knucis on October 19, 2008, 12:35:29 pm
It will not work u need the [boundaries] of the particular place.. :)

u mean coords of the 4 corners?

if iam wrong , pls say how to get the boundaries of the particular place

Boundaries... Try this: http://forum.vicecitymultiplayer.com/index.php?topic=733.0
I dunno if is this what you wants...

Cya, Knucis
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Punjabi on October 19, 2008, 01:29:40 pm
I am config editor so i should know what boundaries are and i can easily make boundaries of 4 corners...Tested boundaries means i have already tested it..and i know how to make it but cant open the secret..sorry if u need the boundaries of any area plz tell me in new topic.. i will help..definately..
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 19, 2008, 01:50:22 pm
It will not work u need the [boundaries] of the particular place.. :)

u mean coords of the 4 corners?

if iam wrong , pls say how to get the boundaries of the particular place

Boundaries... Try this: http://forum.vicecitymultiplayer.com/index.php?topic=733.0
I dunno if is this what you wants...

Cya, Knucis

thnkx Knucis, i think adtec's idea will work , will try it now!
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Knucis on October 19, 2008, 02:15:11 pm
It will not work u need the [boundaries] of the particular place.. :)

u mean coords of the 4 corners?

if iam wrong , pls say how to get the boundaries of the particular place

Boundaries... Try this: http://forum.vicecitymultiplayer.com/index.php?topic=733.0
I dunno if is this what you wants...

Cya, Knucis

thnkx Knucis, i think adtec's idea will work , will try it now!
No Problem ;)
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 19, 2008, 02:24:39 pm
Knucis can u help me :

iam trying to get the Dispensary - VicePoint to be saved as a loc in server, i followed Adtec's idea :

Code: [Select]
201.=Dispensary-VicePoint
201=378.901215,748.782532,387.484894,748.782532,387.484894,760.228638,378.901215,760.228638

still the loc is not detected in the server!

am i doint it wrong?

UPDATE: oops i forgot adtec's tip, to place it at the top, now the loc is detected!
thnkx once again! :D
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 19, 2008, 10:17:12 pm
 :o after inserting this commands, !kill or /c kill is not working, it says invalid command!
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Punjabi on October 20, 2008, 03:49:03 am
Post ur command here !kill i will tell u where to paste it.. :P
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 20, 2008, 10:27:08 am
Post ur command here !kill i will tell u where to paste it.. :P

nvm sorted it out!  ;D