|
"Os Hitmans e os Triads concluiram o mesmo nъmero de contratos." "Loterica: Hoje o numero sorteado foi o nє %d." "Loterica: O prкmio acumulou para: R$%d." |
|
"Os Hitmans e os Triads concluiram o mesmo nъmero de contratos." "Loterica: Hoje o numero sorteado foi o nє %d." "Loterica: O prкmio acumulou para: R$%d." "Os Hitmans e os Triads concluiram o mesmo nъmero de contratos." "Loterica: Hoje o numero sorteado foi o nє %d." "Loterica: O prкmio acumulou para: R$%d." "Os Hitmans e os Triads concluiram o mesmo nъmero de contratos." "Loterica: Hoje o numero sorteado foi o nє %d." "Loterica: O prкmio acumulou para: R$%d." |
public PayDay()
{
new players = 0;for(new i; i <MAX_PLAYERS; i++){ if(IsPlayerConnected(i)) { players++;}}
new Conta,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
if(PlayerInfo[i][pLevel] > 0)
{
if(MoneyMessage[i]==1)
{
SendClientMessage(i, COR_TRIADS, "Vocк devia ter debitado suas dнvidas, lhe enviaram um pedido de prisгo.");
GameTextForPlayer(i, "~r~apreendido !", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
format(gstring, sizeof(gstring), "Vocк foi preso por %d segundos. Fianзa: Desativada", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, gstring);
}
if(Multa[i] > 1)
{
SendClientMessage(i, COR_TRIADS, "Vocк devia ter debitado suas dнvidas, lhe enviaram um pedido de prisгo.");
GameTextForPlayer(i, "~r~apreendido !", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
format(gstring, sizeof(gstring), "Vocк foi preso por %d segundos. Fianзa: Desativada", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, gstring);
}
if(MoneyMessage[i]==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "Vocк nгo pagou a sua dнvida e foi preso.");
GameTextForPlayer(i, "~r~Preso!", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeaponsEx(i);
WantedPoints[i] = 0;
SetPlayerWantedLevel(i, 0);
PlayerInfo[i][pJailTime] = 600;
format(gstring, sizeof(gstring), "Vocк foi preso por %d segundos.", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, gstring);
}
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
Conta = PlayerInfo[i][pConta];
new key = PlayerInfo[i][pPHousekey];
if(key != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoneyEx(i))
{
PlayerInfo[i][pPHousekey] = 255;
SendClientMessage(i, COLOR_WHITE, "Vocк foi expulso(a).");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if(PlayerInfo[i][pVIP] == 1) { tmpintrate = 2; }
else if(PlayerInfo[i][pVIP] == 2) { tmpintrate = 4; }
else { tmpintrate = 1; }
if(PlayerInfo[i][pPayDay] >= 3)
{
//Tax += TaxValue;//Shorld work for every player online
//PlayerInfo[i][pConta] -= TaxValue;
new checks = PlayerInfo[i][pSalario]/5;
new ebill = (PlayerInfo[i][pConta]/30000)*(PlayerInfo[i][pLevel]);
ConsumingMoney[i] = 1;
GivePlayerMoneyEx(i, checks);
if(PlayerInfo[i][pConta] > 0)
{
PlayerInfo[i][pConta] -= ebill;
SBizzInfo[4][sbTill] += ebill;
}
else
{
ebill = 0;
}
if(CHitman == CTriad && Avisouc == 0)
{
SendClientMessageToAll(COLOR_LIGHTBLUE, "Os Hitmans e os Triads concluiram o mesmo nъmero de contratos.");
Avisouc = 1;
}
if(CHitman > CTriad && Avisouc == 0)
{
SendClientMessageToAll(COLOR_LIGHTBLUE, "Os Hitmans concluiram um maior nъmero de contratos do que os Triads e ganharam um Bфnus Especial.");
CHitman = 0;
CTriad = 0;
Avisouc = 1;
GanhouArmamento = 8;
}
if(CTriad > CHitman && Avisouc == 0)
{
SendClientMessageToAll(COLOR_LIGHTBLUE, "Os Triads concluiram um maior nъmero de contratos do que os Hitmans e ganharam um Bфnus Especial.");
CHitman = 0;
CTriad = 0;
Avisouc = 1;
GanhouArmamento = 26;
}
interest = (PlayerInfo[i][pConta]/1000)*(tmpintrate);
PlayerInfo[i][pExp]++;
PlayerPlayMusic(i);
PlayerInfo[i][pConta] = Conta+interest;
SendClientMessage(i, COLOR_WHITE, "|_____ Mensagem do Banco _____|");
format(gstring, sizeof(gstring), " Salario: {33AA33}R$%d {FFFFFF}Imposto: {33AA33}-R$%d", checks, Tax);
SendClientMessage(i, COLOR_GRAD1, gstring);
SendClientMessage(i, COLOR_GRAD1, " Mйdico: {33AA33}-R$100");
if(PlayerInfo[i][pPHousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
{
format(gstring, sizeof(gstring), " Taxa de Iluminaзгo Pъblica: {33AA33}-R$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, gstring);
}
format(gstring, sizeof(gstring), " Banco: {33AA33}R$%d", Conta);
SendClientMessage(i, COLOR_GRAD1, gstring);
format(gstring, sizeof(gstring), " Juros: {33AA33}0.%d por cento",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, gstring);
SendClientMessage(i, COLOR_GRAD4, "|_______________________________________|");
format(gstring, sizeof(gstring), " Novo Saldo: {33AA33}R$%d", PlayerInfo[i][pConta]);
SendClientMessage(i, COLOR_GRAD5, gstring);
format(gstring, sizeof(gstring), " Aluguel: {33AA33}-R$%d", rent);
SendClientMessage(i, COLOR_GRAD5, gstring);
PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0);
format(gstring, sizeof(gstring), "~p~-==- ~g~Salario ~p~ -==-");
GameTextForPlayer(i, gstring, 5000, 1);
GivePlayerMoney(i,- 100);
GivePlayerMoney(i,- Tax);
TaxValue += (Tax*players)/2;
rent = 0;
Avisouc = 0;
OOCNews(COLOR_WHITE, "Loteria: Ja comecou a loteria.");
SaveStuff();
new rand = random(80);
if(rand < 77) { rand += 3; }
Lotto(rand);
Checkprop();
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pSalario] = 0;
PlayerInfo[i][pConnectTime] += 1;
PlayerInfo[i][pCaixinha] = 0;
pban[i] = 0;
if(PlayerInfo[i][pEmprego] > 0)
{
if(PlayerInfo[i][pContractTime] < 25)
{
PlayerInfo[i][pContractTime] ++;
}
}
}
else
{
SendClientMessage(i, COLOR_LIGHTRED, "* Vocк nгo jogou tempo suficiente para receber salбrio!.");
}
}
}
new lolbagui;
lolbagui = PlayerInfo[i][pExp];
new nxtlevel = PlayerInfo[i][pLevel]+1;
if(lolbagui >= nxtlevel*levelexp)
{
GameTextForPlayer(i, "~g~Respeito Adquirido!~n~~r~Digite /comprarnivel!", 5000, 1);
}
}
return true;
}
public Lotto(number)
{
new JackpotFallen = 0;
format(gstring, sizeof(gstring), "Loterica: Hoje o numero sorteado foi o nє %d.", number);
OOCNews(COLOR_WHITE, gstring);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLottoNr] > 0)
{
if(PlayerInfo[i][pLottoNr] == number)
{
JackpotFallen = 1;
format(gstring, sizeof(gstring), "Loterica: %s ganhou R$%d com seu bilhete.", PlayerName(i), Jackpot);
OOCNews(COLOR_WHITE, gstring);
format(gstring, sizeof(gstring), "* Vocк ganhou R$%d com seu bilhete de loteria.", Jackpot);
SendClientMessage(i, COLOR_YELLOW, gstring);
ConsumingMoney[i] = 1;
GivePlayerMoney(i, Jackpot);
}
else
{
SendClientMessage(i, COLOR_GREY, " Vocк nгo tem um bilhete.");
}
}
PlayerInfo[i][pLottoNr] = 0;
}
}
if(JackpotFallen)
{
new rand = random(125000); rand += 15789;
Jackpot = rand;
SaveStuff();
format(gstring, sizeof(gstring), "Loterica: O prкmio acumulou para: R$%d.", Jackpot);
OOCNews(COLOR_WHITE, gstring);
}
else
{
new rand = random(15000); rand += 2158;
Jackpot += rand;
SaveStuff();
format(gstring, sizeof(gstring), "Loterica: O prкmio acumulou para: R$%d.", Jackpot);
OOCNews(COLOR_WHITE, gstring);
}
return true;
}
|
SendClientMessage(i, COR, "mensagem"); |
|
for(new i; i <MAX_PLAYERS; i++) |
public Lotto(number)
{
new JackpotFallen = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(i, COLOR_WHITE, "Loterica: Hoje o numero sorteado foi o nє %d.", number);
{
if(PlayerInfo[i][pLottoNr] > 0)
{
if(PlayerInfo[i][pLottoNr] == number)
{
JackpotFallen = 1;
SendClientMessage(i, COLOR_WHITE, "Loterica: %s ganhou R$%d com seu bilhete.", PlayerName(i), Jackpot);
SendClientMessage(i, COLOR_WHITE, "* Vocк ganhou R$%d com seu bilhete de loteria.", Jackpot);
ConsumingMoney[i] = 1;
GivePlayerMoney(i, Jackpot);
}
else
{
SendClientMessage(i, COLOR_GREY, " Vocк nгo tem um bilhete.");
}
}
PlayerInfo[i][pLottoNr] = 0;
}
}
if(JackpotFallen)
{
new rand = random(125000); rand += 15789;
Jackpot = rand;
SaveStuff();
SendClientMessage(i, COLOR_WHITE, "Loterica: O prкmio acumulou para: R$%d.", Jackpot);
}
else
{
new rand = random(15000); rand += 2158;
Jackpot += rand;
SaveStuff();
SendClientMessage(i, COLOR_WHITE, "Loterica: O prкmio acumulou para: R$%d.", Jackpot);
}
}
return true;
}
SendClientMessage(i, COLOR_WHITE, "Loterica: %s ganhou R$%d com seu bilhete.", PlayerName(i), Jackpot);
SendClientMessage(i, COLOR_WHITE, "* Vocк ganhou R$%d com seu bilhete de loteria.", Jackpot);
public Lotto(number)
{
new JackpotFallen = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
format(gstring, sizeof(gstring), "Loterica: Hoje o numero sorteado foi o nє %d.", number);
SendClientMessage(i, COLOR_WHITE, gstring);
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLottoNr] > 0)
{
if(PlayerInfo[i][pLottoNr] == number)
{
JackpotFallen = 1;
format(gstring, sizeof(gstring), "Loterica: %s ganhou R$%d com seu bilhete.", PlayerName(i), Jackpot);
SendClientMessage(i, COLOR_WHITE, gstring);
format(gstring, sizeof(gstring), "* Vocк ganhou R$%d com seu bilhete de loteria.", Jackpot);
SendClientMessage(i, COLOR_YELLOW, gstring);
ConsumingMoney[i] = 1;
GivePlayerMoney(i, Jackpot);
}
else
{
SendClientMessage(i, COLOR_GREY, " Vocк nгo tem um bilhete.");
}
}
PlayerInfo[i][pLottoNr] = 0;
}
}
if(JackpotFallen)
{
new rand = random(125000); rand += 15789;
Jackpot = rand;
SaveStuff();
format(gstring, sizeof(gstring), "Loterica: O prкmio acumulou para: R$%d.", Jackpot);
SendClientMessage(i, COLOR_WHITE, gstring);
}
else
{
new rand = random(15000); rand += 2158;
Jackpot += rand;
SaveStuff();
format(gstring, sizeof(gstring), "Loterica: O prкmio acumulou para: R$%d.", Jackpot);
SendClientMessage(i, COLOR_WHITE, gstring);
}
}
return true;
}
public PayDay()
{
new players = 0;for(new i; i <MAX_PLAYERS; i++){ if(IsPlayerConnected(i)) { players++;}}
new Conta,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
if(PlayerInfo[i][pLevel] > 0)
{
if(MoneyMessage[i]==1)
{
SendClientMessage(i, COR_TRIADS, "Vocк devia ter debitado suas dнvidas, lhe enviaram um pedido de prisгo.");
GameTextForPlayer(i, "~r~apreendido !", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
format(gstring, sizeof(gstring), "Vocк foi preso por %d segundos. Fianзa: Desativada", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, gstring);
}
if(Multa[i] > 1)
{
SendClientMessage(i, COR_TRIADS, "Vocк devia ter debitado suas dнvidas, lhe enviaram um pedido de prisгo.");
GameTextForPlayer(i, "~r~apreendido !", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
format(gstring, sizeof(gstring), "Vocк foi preso por %d segundos. Fianзa: Desativada", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, gstring);
}
if(MoneyMessage[i]==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "Vocк nгo pagou a sua dнvida e foi preso.");
GameTextForPlayer(i, "~r~Preso!", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeaponsEx(i);
WantedPoints[i] = 0;
SetPlayerWantedLevel(i, 0);
PlayerInfo[i][pJailTime] = 600;
format(gstring, sizeof(gstring), "Vocк foi preso por %d segundos.", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, gstring);
}
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
Conta = PlayerInfo[i][pConta];
new key = PlayerInfo[i][pPHousekey];
if(key != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoneyEx(i))
{
PlayerInfo[i][pPHousekey] = 255;
SendClientMessage(i, COLOR_WHITE, "Vocк foi expulso(a).");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if(PlayerInfo[i][pVIP] == 1) { tmpintrate = 2; }
else if(PlayerInfo[i][pVIP] == 2) { tmpintrate = 4; }
else { tmpintrate = 1; }
if(PlayerInfo[i][pPayDay] >= 3)
{
//Tax += TaxValue;//Shorld work for every player online
//PlayerInfo[i][pConta] -= TaxValue;
new checks = PlayerInfo[i][pSalario]/5;
new ebill = (PlayerInfo[i][pConta]/30000)*(PlayerInfo[i][pLevel]);
ConsumingMoney[i] = 1;
GivePlayerMoneyEx(i, checks);
if(PlayerInfo[i][pConta] > 0)
{
PlayerInfo[i][pConta] -= ebill;
SBizzInfo[4][sbTill] += ebill;
}
else
{
ebill = 0;
}
if(CHitman == CTriad && Avisouc == 0)
{
SendClientMessageToAll(COLOR_LIGHTBLUE, "Os Hitmans e os Triads concluiram o mesmo nъmero de contratos.");
Avisouc = 1;
}
if(CHitman > CTriad && Avisouc == 0)
{
SendClientMessageToAll(COLOR_LIGHTBLUE, "Os Hitmans concluiram um maior nъmero de contratos do que os Triads e ganharam um Bфnus Especial.");
CHitman = 0;
CTriad = 0;
Avisouc = 1;
GanhouArmamento = 8;
}
if(CTriad > CHitman && Avisouc == 0)
{
SendClientMessageToAll(COLOR_LIGHTBLUE, "Os Triads concluiram um maior nъmero de contratos do que os Hitmans e ganharam um Bфnus Especial.");
CHitman = 0;
CTriad = 0;
Avisouc = 1;
GanhouArmamento = 26;
}
interest = (PlayerInfo[i][pConta]/1000)*(tmpintrate);
PlayerInfo[i][pExp]++;
PlayerPlayMusic(i);
PlayerInfo[i][pConta] = Conta+interest;
SendClientMessage(i, COLOR_WHITE, "|_____ Mensagem do Banco _____|");
format(gstring, sizeof(gstring), " Salario: {33AA33}R$%d {FFFFFF}Imposto: {33AA33}-R$%d", checks, Tax);
SendClientMessage(i, COLOR_GRAD1, gstring);
SendClientMessage(i, COLOR_GRAD1, " Mйdico: {33AA33}-R$100");
if(PlayerInfo[i][pPHousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
{
format(gstring, sizeof(gstring), " Taxa de Iluminaзгo Pъblica: {33AA33}-R$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, gstring);
}
format(gstring, sizeof(gstring), " Banco: {33AA33}R$%d", Conta);
SendClientMessage(i, COLOR_GRAD1, gstring);
format(gstring, sizeof(gstring), " Juros: {33AA33}0.%d por cento",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, gstring);
SendClientMessage(i, COLOR_GRAD4, "|_______________________________________|");
format(gstring, sizeof(gstring), " Novo Saldo: {33AA33}R$%d", PlayerInfo[i][pConta]);
SendClientMessage(i, COLOR_GRAD5, gstring);
format(gstring, sizeof(gstring), " Aluguel: {33AA33}-R$%d", rent);
SendClientMessage(i, COLOR_GRAD5, gstring);
PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0);
format(gstring, sizeof(gstring), "~p~-==- ~g~Salario ~p~ -==-");
GameTextForPlayer(i, gstring, 5000, 1);
GivePlayerMoney(i,- 100);
GivePlayerMoney(i,- Tax);
TaxValue += (Tax*players)/2;
rent = 0;
Avisouc = 0;
OOCNews(COLOR_WHITE, "Loteria: Ja comecou a loteria.");
SaveStuff();
new rand = random(80);
if(rand < 77) { rand += 3; }
Lotto(rand);
Checkprop();
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pSalario] = 0;
PlayerInfo[i][pConnectTime] += 1;
PlayerInfo[i][pCaixinha] = 0;
pban[i] = 0;
if(PlayerInfo[i][pEmprego] > 0)
{
if(PlayerInfo[i][pContractTime] < 25)
{
PlayerInfo[i][pContractTime] ++;
}
}
}
else
{
SendClientMessage(i, COLOR_LIGHTRED, "* Vocк nгo jogou tempo suficiente para receber salбrio!.");
}
}
}
new lolbagui;
lolbagui = PlayerInfo[i][pExp];
new nxtlevel = PlayerInfo[i][pLevel]+1;
if(lolbagui >= nxtlevel*levelexp)
{
GameTextForPlayer(i, "~g~Respeito Adquirido!~n~~r~Digite /comprarnivel!", 5000, 1);
}
}
return true;
}
public Lotto(number)
{
new JackpotFallen = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
format(gstring, sizeof(gstring), "Loterica: Hoje o numero sorteado foi o nє %d.", number);
SendClientMessage(i, COLOR_WHITE, gstring);
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLottoNr] > 0)
{
if(PlayerInfo[i][pLottoNr] == number)
{
JackpotFallen = 1;
format(gstring, sizeof(gstring), "Loterica: %s ganhou R$%d com seu bilhete.", PlayerName(i), Jackpot);
SendClientMessage(i, COLOR_WHITE, gstring);
format(gstring, sizeof(gstring), "* Vocк ganhou R$%d com seu bilhete de loteria.", Jackpot);
SendClientMessage(i, COLOR_YELLOW, gstring);
ConsumingMoney[i] = 1;
GivePlayerMoney(i, Jackpot);
}
else
{
SendClientMessage(i, COLOR_GREY, " Vocк nгo tem um bilhete.");
}
}
PlayerInfo[i][pLottoNr] = 0;
}
}
if(JackpotFallen)
{
new rand = random(125000); rand += 15789;
Jackpot = rand;
SaveStuff();
format(gstring, sizeof(gstring), "Loterica: O prкmio acumulou para: R$%d.", Jackpot);
SendClientMessage(i, COLOR_WHITE, gstring);
}
else
{
new rand = random(15000); rand += 2158;
Jackpot += rand;
SaveStuff();
format(gstring, sizeof(gstring), "Loterica: O prкmio acumulou para: R$%d.", Jackpot);
SendClientMessage(i, COLOR_WHITE, gstring);
}
}
return false;
}