SphereCommunity
Getting money in players bank - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Getting money in players bank (/Thread-Getting-money-in-players-bank)



Getting money in players bank - TigerBlitz - 09-18-2013 06:00 AM

Hi Community

i have another problem. Actualy its not problem but i want to learn its how to ?

Criminal or PK'ing players when enter guards zone, players encounter with guards after guards, send them a small jail.
you can only go out with pay bail in this jail.

Bails are as follows:
option to reduce little bit stat
option to reduce little bit skill
and pay with money

I want to tell here, stat and skill works well.
But about the money, the players when there is no money on them own backpack.

Code:
there is no money in his backpack, > check bank > if his have money in own bank get it. and release him
like that.

Here is the part of gump i want to learn it.
This button only money section

Code:
ON=3
// Bail with Money Button
IF <SRC.restest 5000 i_gold>
    src.consume=i_gold 5000
    SRC.SYSMESSAGE @060 Bail was accepted. Now you are free.
    src.go somewhere in the world
    RETURN 1
ELSE
SRC.SYSMESSAGE @060 You are not have money. Choose another bail
ENDIF

help me plz.

sry for google bad english Smile


RE: Getting money in players bank - darksun84 - 09-18-2013 06:06 AM

PHP Code:
ON=3
// Bail with Money Button 
IF <SRC.restest 5000 i_gold>
    
src.consume=i_gold 5000
    SRC
.SYSMESSAGE @060 Bail was acceptedNow you are free.
    
src.go somewhere in the world
    
RETURN 1
ELSEIF <BANKBALANCE> >= 5000   //Bankbalance = money in bank
    
GOLD -= 5000  //Gold = Money in Bank + Money in Backpack
    
SRC.SYSMESSAGE @060 Bail was acceptedNow you are free.
    
src.go somewhere in the world
    
RETURN 1
SRC
.SYSMESSAGE @060 You are not have moneyChoose another bail
ENDIF 



RE: Getting money in players bank - TigerBlitz - 09-18-2013 06:16 AM

darksun

update script but i see this error in console.

Code:
23:14:ERROR:(bailsystem.scp,84)Can't resolve <BANKBALANCE>
23:14:ERROR:(bailsystem.scp,84)Undefined symbol ''



RE: Getting money in players bank - darksun84 - 09-18-2013 06:34 AM

Ahh sorry i forgot the src in bankbalance and gold
PHP Code:
ON=3
// Bail with Money Button 
IF <SRC.restest 5000 i_gold>
    
src.consume=i_gold 5000
    SRC
.SYSMESSAGE @060 Bail was acceptedNow you are free.
    
src.go somewhere in the world
    
RETURN 1
ELSEIF <SRC.BANKBALANCE> >= 5000   //Bankbalance = money in bank
    
SRC.GOLD -= 5000  //Gold = Money in Bank + Money in Backpack
    
SRC.SYSMESSAGE @060 Bail was acceptedNow you are free.
    
src.go somewhere in the world
    
RETURN 1
SRC
.SYSMESSAGE @060 You are not have moneyChoose another bail
ENDIF 



RE: Getting money in players bank - TigerBlitz - 09-18-2013 06:55 AM

thx for helping darksun pls stay always HELP FLAG Wink


RE: Getting money in players bank - Extreme - 09-18-2013 07:26 AM

PHP Code:
ON=3
// Bail with Money Button 
IF <SRC.GOLD> >= 5000
 SRC
.GOLD -= 5000
 SRC
.SYSMESSAGE @060 Bail was acceptedNow you are free.
 
src.go somewhere in the world
 
RETURN 1
ELSE
 
SRC.SYSMESSAGE @060 You are not have moneyChoose another bail
 
RETURN 1
ENDIF 



RE: Getting money in players bank - TigerBlitz - 09-18-2013 07:30 AM

Good Extreme you choose easy way
thx to you rep in case Wink