Код:
for(new i; i <= HighestID; i++)
{
if(IsPlayerConnected(i))
{
if(Player[i][pLogged] == true)
{
if(GetPlayerMoney(i) <= 0)
{
ResetPlayerMoney(i);
}
if(Player[i][DelayNick] > 0)
{
Player[i][DelayNick] --;
}
new var10[128], interest, tmpintrate, conta, salario;
SendClientMessage(i, 0xE3E3E3FF, " ");
SendClientMessage(i, TEXTO, "{e8e8e8}|-------------{b4e657}[ PAY DAY ]{e8e8e8}--------------|");
PlayerPlaySound(i,1057,0.0,0.0,0.0);
if(Player[i][pVip] == 1){salario = SALARIO_VIP; tmpintrate = JUROS_VIP;} else {salario = SALARIO; tmpintrate = JUROS;}
format(var10, 256, "{b4e657}Salбrio:{e8e8e8} R$%d", salario);
SendClientMessage(i, 0xE3E3E3FF, var10);
GivePlayerMoney(i, salario);
interest = (Player[i][pBanco]/1000)*(tmpintrate);
conta = Player[i][pBanco];
Player[i][pBanco] += interest;
SetPlayerScore(i, GetPlayerScore(i) + 1);
Player[i][Coins] ++;
format(var10, 256, "{b4e657}Saldo do Banco:{e8e8e8} R$%d", conta);
SendClientMessage(i, 0xE3E3E3FF, var10);
format(var10, 256, "{b4e657}Taxa de Juros {e8e8e8}0.%d", tmpintrate);
SendClientMessage(i, 0xE3E3E3FF, var10);
format(var10, 256, "{b4e657}Total Ganho {e8e8e8}R$%d", interest);
SendClientMessage(i, 0xE3E3E3FF, var10);
SendClientMessage(i, 0xE3E3E3FF, "{b4e657}Coins Ganho: {e8e8e8}1");
SendClientMessage(i, 0xFFFFFFAA, "|------------------------------------------|");
format(var10, 256, "{b4e657}Novo Saldo: {e8e8e8}R$%d", Player[i][pBanco]);
SendClientMessage(i, 0xE3E3E3FF, var10);
format(var10, 256, "{b4e657}Vocк foi para o level {e8e8e8}%d!", GetPlayerScore(i));
SendClientMessage(i, 0xE3E3E3FF, var10);
SendClientMessage(i, 0xFFFFFFAA, "|------------------------------------------|");
SalvarPlayer(i);
}
}
}
}
PHP код:
CMD:payday(playerid)
{
for(new i; i <= HighestID; i++)
{
if(IsPlayerConnected(i))
{
if(Player[i][pLogged] == true)
{
if(GetPlayerMoney(i) <= 0)
{
ResetPlayerMoney(i);
}
if(Player[i][DelayNick] > 0)
{
Player[i][DelayNick] --;
}
new var10[128], interest, tmpintrate, conta, salario;
SendClientMessage(i, 0xE3E3E3FF, " ");
SendClientMessage(i, TEXTO, "{e8e8e8}|-------------{b4e657}[ PAY DAY ]{e8e8e8}--------------|");
PlayerPlaySound(i,1057,0.0,0.0,0.0);
if(Player[i][pVip] == 1){salario = SALARIO_VIP; tmpintrate = JUROS_VIP;} else {salario = SALARIO; tmpintrate = JUROS;}
format(var10, 256, "{b4e657}Salбrio:{e8e8e8} R$%d", salario);
SendClientMessage(i, 0xE3E3E3FF, var10);
GivePlayerMoney(i, salario);
interest = (Player[i][pBanco]/1000)*(tmpintrate);
conta = Player[i][pBanco];
Player[i][pBanco] += interest;
SetPlayerScore(i, GetPlayerScore(i) + 1);
Player[i][Coins] ++;
format(var10, 256, "{b4e657}Saldo do Banco:{e8e8e8} R$%d", conta);
SendClientMessage(i, 0xE3E3E3FF, var10);
format(var10, 256, "{b4e657}Taxa de Juros {e8e8e8}0.%d", tmpintrate);
SendClientMessage(i, 0xE3E3E3FF, var10);
format(var10, 256, "{b4e657}Total Ganho {e8e8e8}R$%d", interest);
SendClientMessage(i, 0xE3E3E3FF, var10);
SendClientMessage(i, 0xE3E3E3FF, "{b4e657}Coins Ganho: {e8e8e8}1");
SendClientMessage(i, 0xFFFFFFAA, "|------------------------------------------|");
format(var10, 256, "{b4e657}Novo Saldo: {e8e8e8}R$%d", Player[i][pBanco]);
SendClientMessage(i, 0xE3E3E3FF, var10);
format(var10, 256, "{b4e657}Vocк foi para o level {e8e8e8}%d!", GetPlayerScore(i));
SendClientMessage(i, 0xE3E3E3FF, var10);
SendClientMessage(i, 0xFFFFFFAA, "|------------------------------------------|");
SalvarPlayer(i);
}
}
}
}
return 1;
}