• Welcome to Vice City Multiplayer.
 

WSV MONEY SCRIPT ERROR

Started by gamyster, October 16, 2008, 07:30:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gamyster

Please help :- got


Quoteelseif (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



Quoteelseif (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
Founder of [SAF]Clan

thijn

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.
   }


gamyster

#2
I know that there is a Problem IN This script :-

Quoteelseif (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.
Founder of [SAF]Clan

thijn



gamyster

Founder of [SAF]Clan

Punjabi

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
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

gamyster

Hey is $WSV.money($2) is same like WSV.money $2  ??
Founder of [SAF]Clan

Tamas

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.)

evil_night13

Quote from: [SRS]Tomi on October 17, 2008, 02: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.)

so there is no possibility to heal like LW, i.e healing at all hospitals and medic stores?

Tamas

It is possible, just you have to make another command for hospital heals.

evil_night13

Quote from: [SRS]Tomi on October 17, 2008, 03:15:58 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?

thijn

maby something like:

   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 ;)


evil_night13

Quote from: thijn on October 17, 2008, 04:15:31 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?

thijn

Just add it were the other cmds are i think :D ;)


Tamas

Yes, and u can set the same name for all hospitals.