05.03.2015, 22:37
Exemplo:
PHP код:
public PayCheck()
{
for(new i = 0; i < MAX_PLAYERS; i++) //loop para "correr" todos os jogadores
{
if(gPlayerInfo[i][player_empBank] == true) //verifica se fez um emprestimo
{
if((dinheiro - (gPlayerInfo[i][player_empValue]/gPlayerInfo[i][player_empTime])) < 0 )
{
//caso o dinheiro seja menor que 0, ou seja, o jogador nгo tem dinheiro para pagar o emprestimo faz se algo
} else {
gPlayerInfo[i][player_paycheck] = dinheiro - (gPlayerInfo[i][player_empValue]/gPlayerInfo[i][player_empTime]); //calcula o dinheiro
//salбrio = dinheiro_ganho - (emprestimo/duraзгo)
}
}
}
}