This script works fine offline, however online you can only deposit or withdrawl in multiples if 5 if you say deposit 10 you deposit 50 ext. why would it do that?
NPC Code:
if(created)
{
setshape 1,64,32;
}
if(actionmoney)
{
if(strequals(#p(0),deposit))
{
setstring clientr.balance,#v(strtofloat(#s(clientr.balance)) +strtofloat(#s(client.deposit)));
playerrupees=playerrupees-strtofloat(#s(client.deposit));
setplayerprop #c,Deposited #s(client.deposit);
}
if(strequals(#p(0),withdraw))
{
setstring clientr.balance,#v(strtofloat(#s(clientr.balance))-strtofloat(#s(client.withdraw)));
playerrupees=playerrupees+strtofloat(#s(client.wit hdraw));
setplayerprop #c,Withdrew #s(client.withdraw);
}
}
//#CLIENTSIDE
if(playerchats)
{
if(strequals(#c,balance))
{
setplayerprop #c,Balance: #s(clientr.balance);
}
if(startswith(deposit,#c))
{
setstring client.deposit,#T(#e(7,-1,#c));
if(playerrupees>=strtofloat(#s(client.deposit)))
{
triggeraction x,y,money,deposit;
}
}
if(startswith(withdraw,#c))
{
setstring client.withdraw,#T(#e(9,-1,#c));
if(strtofloat(#s(client.withdraw))<=strtofloat(#s( clientr.balance)))
{
triggeraction x,y,money,withdraw;
}
}
}
if(playertouchsme)
{
say2 Banking commangs:#b
deposit amount#b
withdraw amount#b
balance-check balance;
}