Vice City Multiplayer

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

Title: WSV MONEY SCRIPT ERROR
Post by: gamyster on October 16, 2008, 07:30:49 PM
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
Title: Re: WSV MONEY SCRIPT ERROR
Post by: thijn on October 16, 2008, 08: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, 11:34:25 AM
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.
Title: Re: WSV MONEY SCRIPT ERROR
Post by: thijn on October 17, 2008, 11:44:31 AM
mmm, i donnu :-\
Title: Re: WSV MONEY SCRIPT ERROR
Post by: gamyster on October 17, 2008, 11:45:32 AM
:p NVM I FIXED IT!.
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Punjabi on October 17, 2008, 11:48:38 AM
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, 12: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, 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.)
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 17, 2008, 02:57:03 PM
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?
Title: Re: WSV MONEY SCRIPT ERROR
Post by: Tamas on October 17, 2008, 03: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, 03:30:56 PM
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?
Title: Re: WSV MONEY SCRIPT ERROR
Post by: thijn on October 17, 2008, 04:15:31 PM
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 ;)
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 17, 2008, 06:29:57 PM
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?
Title: Re: WSV MONEY SCRIPT ERROR
Post by: thijn on October 17, 2008, 07: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, 09: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, 10:41:37 PM
I think thats in Areas.ini ;)
Title: Re: WSV MONEY SCRIPT ERROR
Post by: evil_night13 on October 18, 2008, 01: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, 10: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, 11:19:06 AM
Quote from: Punjabi on October 19, 2008, 10:48:48 AM
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, 11:35:29 AM
Quote from: evil_night13 on October 19, 2008, 11:19:06 AM
Quote from: Punjabi on October 19, 2008, 10:48:48 AM
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, 12: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, 12:50:22 PM
Quote from: Knucis on October 19, 2008, 11:35:29 AM
Quote from: evil_night13 on October 19, 2008, 11:19:06 AM
Quote from: Punjabi on October 19, 2008, 10:48:48 AM
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, 01:15:11 PM
Quote from: evil_night13 on October 19, 2008, 12:50:22 PM
Quote from: Knucis on October 19, 2008, 11:35:29 AM
Quote from: evil_night13 on October 19, 2008, 11:19:06 AM
Quote from: Punjabi on October 19, 2008, 10:48:48 AM
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, 01: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 :

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, 09: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, 02: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, 09:27:08 AM
Quote from: Punjabi on October 20, 2008, 02:49:03 AM
Post ur command here !kill i will tell u where to paste it.. :P

nvm sorted it out!  ;D