15.07.2010, 23:03
(
Последний раз редактировалось jorambo; 16.07.2010 в 08:05.
)
Heey guys
I made a payday myself and I just made a bank system but now I want that every payday you get tax of some part of the bank(I dont know that english word for but in dutch: procent).
Further I want also a line for interest of the bank money.
I have looked the forum but couldn't find anything only from the GF but I dont want to steal things.
I hope someone can help me
EDIT: Is something wrong with it? if you need more information please ask cause I realy hoped that you could help me
I made a payday myself and I just made a bank system but now I want that every payday you get tax of some part of the bank(I dont know that english word for but in dutch: procent).
Further I want also a line for interest of the bank money.
I have looked the forum but couldn't find anything only from the GF but I dont want to steal things.
Код:
public PayDay() { new string[50]; for(new i; i<MAX_PLAYERS; i++) if(logged[i] == 1) { if(!dini_Exists(udb_encode(playername))) { dini_Create(udb_encode(playername)); } SecondsPlayed[i] = dini_Int(udb_encode(playername), "secondsplayed"); SecondsPlayed[i]++; if(SecondsPlayed[i] == 30) { { if(exp[i] <=4) { exp[i] +=1; GivePlayerMoney(i, 1000); format(string, sizeof(string), " ___________________UD_STATEMENT_________________"); SendClientMessage(i, COLOR_BLUE, string); format(string, sizeof(string), "Congratulations, you have now one more experience "); SendClientMessage(i, COLOR_BLUE, string); format(string, sizeof(string), "Your pocket money is $%d your new exp: %d ", GetPlayerMoney(i), exp[i]); SendClientMessage(i, COLOR_BLUE, string); format(string, sizeof(string), "Your bank money is $%d", PlayerInfo[i][Banka]); SendClientMessage(i, COLOR_BLUE, string); format(string, sizeof(string), "Type /stats to see your updates stats"); SendClientMessage(i, COLOR_BLUE, string); continue; } GivePlayerMoney(i, 1000); SetPlayerScore(i, GetPlayerScore(i) + 1); exp[i] = 0; Score[i] = GetPlayerScore(i); format(string, sizeof(string), " ___________________UD_STATEMENT_________________"); SendClientMessage(i, COLOR_BLUE, string); format(string, sizeof(string), "Congratulations, you have now one more experience "); SendClientMessage(i, COLOR_BLUE, string); format(string, sizeof(string), "Your pocket money is $%d your new exp: %d ", GetPlayerMoney(i), exp[i]); SendClientMessage(i, COLOR_BLUE, string); format(string, sizeof(string), "Your bank money is $%d", PlayerInfo[i][Banka]); SendClientMessage(i, COLOR_BLUE, string); if(DoesPlayerOwnBusiness(i) == 1) { new biz[50]; for(new b=0; b<MAX_BUSINESS; b++) format(biz,sizeof(biz),"%iCash",b); new cash = dini_Int("Business.ini",biz); format(biz,sizeof(biz),"Your business contains $%i",cash); SendClientMessage(i,COLOR_WHITE,biz); } format(string, sizeof(string), "Congratulations, it is your birthday "); SendClientMessage(i, COLOR_BLUE, string); format(string, sizeof(string), "You are now %d year's old ", Score[i]); SendClientMessage(i, COLOR_BLUE, string); format(string, sizeof(string), "Type /stats to see your updates stats"); SendClientMessage(i, COLOR_BLUE, string); SecondsPlayed[i] = 0; continue; } } dini_IntSet(udb_encode(playername), "secondsplayed", SecondsPlayed[i]); } else { SendClientMessage(i, COLOR_GREENBLUE,"You are not yet logged in, so you wont get payday!"); } return 1; }
EDIT: Is something wrong with it? if you need more information please ask cause I realy hoped that you could help me