![]() |
Donations..
How do u make a donations box.. so you can say Donate (ammount) and it saves and only one account (Kansuke) can withdraw from it..
|
if (startswith(Donation,#c)){tokenize #c;
setstring donation,#v(#s(donation)+#t(1)); setplayerprop #c, Thank you for Donating;} if (playersays(withdraw)&&strequals(#a,kansuke)){play errupees=playerrupees+strtofloat(#s(donation));set string donation,;} that should work i did it fast.. i think startswith is (partstr,fullstr) |
when i say donation 5 it doesn't take away 5 rupees from me but it donates 5g
|
should i use playerrupees-=#t;
?? |
Why are there two threads about this!?
|
lol sorry u said make it so it donates not does it all try this one
if (startswith(Donation,#c)){tokenize #c; if (playerrupees<=strtofloat(#t(1))){playerrupees=pla yerrupees-#t(1); setstring donation,#v(#s(donation)+#t(1)); setplayerprop #c, Thank you for Donating;} else setplayerprop #c, Sorry you do not have enough money;} try that one And the 2 forum thing.. because he messed up.. USE ONE FORUM OR DO NOT POST hope this helps |
Quote:
if (startswith(Donation,#c)){tokenize #c; if (playerrupees<=strtofloat(#t(1))){playerrupees=pla yerrupees-#t(1); setstring donation,#v(strtofloat(#s(donation))+strtofloat(#t (1))); setplayerprop #c, Thank you for Donating;} else setplayerprop #c, Sorry you do not have enough money;} |
| All times are GMT +2. The time now is 12:08 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.