ID:266388
 
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
mob
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]!"
In response to English
:) it works Thanks!