public PayDay(playerid) { if (PlayerInfo[playerid][pCellplan] == 2) { new string [128]; new payday = 100*PlayerInfo[playerid][pLevel]; new plan = 10; new total = payday-plan; PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]+total; PlayerInfo[playerid][pExp]++; SendClientMessageToAll(COLOR_RED,"|_______________ __Pago_Diario_________________|"); format(string, sizeof(string), "|Pago del estado: $%d Balance de cuenta: %d", payday, PlayerInfo[playerid][pAccount]); SendClientMessageToAll(COLOR_RED, string); format(string, sizeof(string), "|Plan celular: $-10 Total: $%d", total); SendClientMessageToAll(COLOR_RED, string); PlayerPlayMusic(playerid); } else { new string [128]; new payday = 100*PlayerInfo[playerid][pLevel]; PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]+payday; PlayerInfo[playerid][pExp]++; SendClientMessageToAll(COLOR_RED,"|_______________ __Pago_Diario_________________|"); format(string, sizeof(string), "|Pago del estado: $%d |Cuenta bancaria: %d", payday, PlayerInfo[playerid][pAccount]); SendClientMessageToAll(COLOR_RED, string); format(string, sizeof(string), "|Total: $%d", payday); SendClientMessageToAll(COLOR_RED, string); PlayerPlayMusic(playerid); } } |
public PayDay()
{
new string [128];
for(new i; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i)) {
if(PlayerInfo[i][pCellplan] == 2){
new payday = 100*PlayerInfo[i][pLevel];
new plan = 10;
new total = payday-plan;
PlayerInfo[i][pAccount]=PlayerInfo[i][pAccount]+total;
PlayerInfo[i][pExp]++;
SendClientMessage(i, COLOR_RED,"|_______________ __Pago_Diario_________________|");
format(string, sizeof(string), "|Pago del estado: $%d Balance de cuenta: %d", payday, PlayerInfo[i][pAccount]);
SendClientMessage(i, COLOR_RED, string);
format(string, sizeof(string), "|Plan celular: $-10 Total: $%d", total);
SendClientMessage(i, COLOR_RED, string);
PlayerPlayMusic(i);
}
else
{
new payday = 100*PlayerInfo[i][pLevel];
PlayerInfo[i][pAccount]=PlayerInfo[i][pAccount]+payday;
PlayerInfo[i][pExp]++;
SendClientMessage(i, COLOR_RED,"|_______________ __Pago_Diario_________________|");
format(string, sizeof(string), "|Pago del estado: $%d |Cuenta bancaria: %d", payday, PlayerInfo[i][pAccount]);
SendClientMessage(i, COLOR_RED, string);
format(string, sizeof(string), "|Total: $%d", payday);
SendClientMessage(i, COLOR_RED, string);
PlayerPlayMusic(i);
}
}
}
new PayDayFinish = 0;
public PayDay()
{
if(PayDayFinish == 1)
{
PayDayFinish = 0;
return 0;
}
PayDayFinish=1;
new string [128];
for(new i; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i)) {
if(PlayerInfo[i][pCellplan] == 2){
new payday = 100*PlayerInfo[i][pLevel];
new plan = 10;
new total = payday-plan;
PlayerInfo[i][pAccount]=PlayerInfo[i][pAccount]+total;
PlayerInfo[i][pExp]++;
SendClientMessage(i, COLOR_RED,"|_______________ __Pago_Diario_________________|");
format(string, sizeof(string), "|Pago del estado: $%d Balance de cuenta: %d", payday, PlayerInfo[i][pAccount]);
SendClientMessage(i, COLOR_RED, string);
format(string, sizeof(string), "|Plan celular: $-10 Total: $%d", total);
SendClientMessage(i, COLOR_RED, string);
PlayerPlayMusic(i);
}
else
{
new payday = 100*PlayerInfo[i][pLevel];
PlayerInfo[i][pAccount]=PlayerInfo[i][pAccount]+payday;
PlayerInfo[i][pExp]++;
SendClientMessage(i, COLOR_RED,"|_______________ __Pago_Diario_________________|");
format(string, sizeof(string), "|Pago del estado: $%d |Cuenta bancaria: %d", payday, PlayerInfo[i][pAccount]);
SendClientMessage(i, COLOR_RED, string);
format(string, sizeof(string), "|Total: $%d", payday);
SendClientMessage(i, COLOR_RED, string);
PlayerPlayMusic(i);
}
}
}