if(strcmp(cmd,"/dartaxa",true)==0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pLider] != 7) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й o Prefeito !"); return true; } if(Tax < 1) { SendClientMessage(playerid, COLOR_GREY, " Nгo hб Dinheiro suficiente no banco de Impostos !"); return true; } new Cops = 0; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { Cops += 1; } } } if(Cops >= 1) { new price = Tax / Cops; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { SendClientMessage(playerid, COLOR_GREY, "Vocк deu a taxa para todos os policiais online!"); format(string, sizeof(string), "* Vocк recebeu R$%d do banco de Impostos pelo Prefeito.",price); SendClientMessage(i, COLOR_LIGHTBLUE, string); GivePlayerMoney(i, price); Tax = 0; } } } SaveStuff(); } else { SendClientMessage(playerid, COLOR_GREY, " Nгo hб nenhum Policial Online no Momento !"); return true; } } return true; }
if(strcmp(cmd,"/dartaxa",true)==0) { if(strval(params) < 0 || strval(params) > 9999999) return SendClientMessage(playerid, -1, "[ERRO] QuantiaInvбlida."); if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pLider] != 7) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й o Prefeito !"); return true; } if(IsPlayerConnected(i)) { for (new i = 0; i < MAX_PLAYERS; i++) { SendClientMessage(playerid, COLOR_GREY, "Vocк deu a taxa para todos os players!"); format(string, sizeof(string), "* Vocк recebeu R$%d do banco de Impostos pelo Prefeito.",price); SendClientMessage(i, COLOR_LIGHTBLUE, string); GivePlayerMoney(i, strval(params)); } } SaveStuff(); } } return true; }
if(strcmp(cmd,"/dartaxa",true)==0)
{
if(strval(params) < 0 || strval(params) > 9999999) return SendClientMessage(playerid, -1, " [ERRO] Quantia Invбlida.");
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLider] != 7)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й o Prefeito !");
return true;
}
if(IsPlayerConnected(i))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк deu a taxa para todos os players!");
format(string, sizeof(string), "* Vocк recebeu R$%d do banco de Impostos pelo Prefeito.",price);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
GivePlayerMoney(l, strval(params));
}
}
SaveStuff();
}
return true;
}
new bolsa = Tax/(aqui nгo sei o que coloca, mas й Tax dividido pelo nъmero de jogadores online); SendClientMessage(playerid, COLOR_GREY, "Vocк deu a taxa para todos os jogadores online!"); format(string, sizeof(string), "* Vocк recebeu R$%d do banco de Impostos pelo Prefeito.",bolsa); SendClientMessage(i, COLOR_LIGHTBLUE, string); GivePlayerMoney(i, bolsa);
Skull, seu cуdigo vai dar erros.
pawn Код:
|
GivePlayerMoney(l, strval(params));
if(strcmp(cmd,"/dartaxa",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLider] != 7)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й o Prefeito !");
return true;
}
if(IsPlayerConnected(i))
{
new price = Tax / Cops;
for(new i = 0; i < MAX_PLAYERS; i++)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк deu a taxa para todos os players!");
format(string, sizeof(string), "* Vocк recebeu R$%d do banco de Impostos pelo Prefeito.",price);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
GivePlayerMoney(i,price);
}
}
SaveStuff();
}
return true;
}
Nгo й assim, era tipo igual ao anterior, mнnimo de players online 15, e tem que ser o que tem dentro do impostфmetro dividido pelo nъmero de pessoas online.
Tipo assim: Код:
new bolsa = Tax/(aqui nгo sei o que coloca, mas й Tax dividido pelo nъmero de jogadores online); SendClientMessage(playerid, COLOR_GREY, "Vocк deu a taxa para todos os jogadores online!"); format(string, sizeof(string), "* Vocк recebeu R$%d do banco de Impostos pelo Prefeito.",bolsa); SendClientMessage(i, COLOR_LIGHTBLUE, string); GivePlayerMoney(i, bolsa); |
if(strcmp(cmd,"/dartaxa",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLider] != 7)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й o Prefeito !");
return true;
}
if(IsPlayerConnected(i))
{
new price = Tax / Cops;
for(new i = 0; i < MAX_PLAYERS; i++)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк deu a taxa para todos os players!");
format(string, sizeof(string), "* Vocк recebeu R$%d do banco de Impostos pelo Prefeito.",price);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
GivePlayerMoney(i,price);
}
}
SaveStuff();
}
return true;
}
if(strcmp(cmd,"/dartaxa",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLider] != 7)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й o Prefeito !");
return true;
}
if(ContarJogadores >= 15)
{
if(IsPlayerConnected(i))
{
new price = Tax / Cops;
for(new i = 0; i < MAX_PLAYERS; i++)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк deu a taxa para todos os players!");
format(string, sizeof(string), "* Vocк recebeu R$%d do banco de Impostos pelo Prefeito.",price);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
GivePlayerMoney(i,price);
}
}
SaveStuff();
}
return true;
}
Eu ia ajudar mais, sу que jб tinha gente ajudando u-u.
pawn Код:
|