I have trobule making a give money verb.They can give as much money as they want to the user.If you know the code,please tell me.Thanks!
-Kappa the Imp
Copyright © 2024 BYOND Software.
All rights reserved.
ID:266388
Feb 18 2002, 12:38 pm
|
|
I have trobule making a give money verb.They can give as much money as they want to the user.If you know the code,please tell me.Thanks!
-Kappa the Imp |
In response to English
|
|
:) it works Thanks!
|
verb
Give_Money(var/mob/M in oview(1))
if(!M) //make sure a mob was targetted
src << "Give money to who??"
return
var/give = input("Give how much?","Give") as num
if(give <= 0) //make sure no negative money
src << "Enter a valid amount"
return
if(give <= src.money) //make sure player has enough money to give
src.money -= give //take money from player
M.money += give //give money to other player
M << "[src] gave you [give]!"
src << "You gave [M] [give]!"