I need 2 help on my Business Rob script, here is the problem
Problem 1
How to make the script bellow will be warned like "You have already robbed a business in this week" ? Because the /robbus cmd can be used again in the next day, i wont that happen. I want make player can only rob a business for every 7 days or 1 weeks ? Please help
Problem 2
What is that meaning of random money setting ? i dont know as well what is the minimum or maximun of money will player got. Please help
Thanks :D
Problem 1
How to make the script bellow will be warned like "You have already robbed a business in this week" ? Because the /robbus cmd can be used again in the next day, i wont that happen. I want make player can only rob a business for every 7 days or 1 weeks ? Please help
Code:
new year, month, day;
getdate(year, month, day);
if (month < 10) year *= 10;
if (day < 10) month *= 10;
format(tmp, 9, "%d%d%d", year, month, day);
new temp1 = strval(tmp);
if (temp1 == dini_Int(AddDirFile(dir_userfiles, playername), "robbedbus")) return SendClientMessage2(playerid, COLOR_RED, "Your have already robbed a business today.");
What is that meaning of random money setting ? i dont know as well what is the minimum or maximun of money will player got. Please help
Code:
temp1 = MRandom(35001)+5000;
GivePlayerMoney(playerid, temp1);