06.04.2017, 15:57
PHP код:
forward payday();
public payday()
{
new savingsmoney,Text[200],bankmoney;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (!INGAME[i][LOGIN]) {
format(Text,sizeof(Text),"You Need To Login Before Doing Anything.");
SendClientMessage(i,COLOR_RED,Text);
}
else {
USER[i][EXP] = USER[i][EXP]+1;
savingsmoney = (USER[i][SAVINGS]/100)*5;
bankmoney = (USER[i][BANK]/100)*2;
USER[i][SAVINGS] = USER[i][SAVINGS]+savingsmoney;
USER[i][BANK] = USER[i][BANK]+bankmoney;
format(Text,sizeof(Text),"---------------------------------------------");
SendClientMessage(i, -1, Text);
format(Text,sizeof(Text),"You Have Earned 1 Experience Point On PayDay");
SendClientMessage(i, -1, Text);
format(Text,sizeof(Text),"Your New Bank Balance Is: %d",USER[i][BANK]);
SendClientMessage(i, -1, Text);
format(Text,sizeof(Text),"Your New Savings Balance Is: %d",USER[i][SAVINGS]);
SendClientMessage(i, -1, Text);
format(Text,sizeof(Text),"---------------------------------------------");
SendClientMessage(i, -1, Text);
}
}
}
return 1;
}