05.01.2011, 16:10
My question is; How will I make a system when player put's money in bank they will get interest by every 10 mins
blackwave: has used the command /deposit 2000 !
forward GiveBack(playerid); // script top
new array,interest; // Recommended to be on top
array = 2000 // On the /deposit command
interest = array * 20 // Depending value. In this case it's 2000 x 20
SetTimerEx("GiveBack",600000,false,"i",playerid); // 600000ms = 10min
public GiveBack(playerid)
{
GivePlayerMoney(playerid, interest);
// Depending a string, you might create one to check the interest value
return 1;
I put 20 $ on my bank account. The intereset will be 20x20 = 400
#define CB:%0(%1) forward %0(%1); public %0(%1)
CB:GiveBack(playerid)
{
// Do something
return 1;
}
forward GiveBack(playerid);
public GiveBack(playerid)
{
// Do something
return 1;
}