[Ajuda] bug no imposto: /setartaxa
#1

Galera, algem pode me ajuda ?
assim, toda vez que o pref seta taxa:


Aparece tudo certinho que o prefeito seto a taxa, pra XxX de grana e tals
sу que quando da o salario:


Dai o imposto fica -0$
ou seja, nao ta cobrando nada, vc pode setar 500 de taxa sempre o imposto vai ficar 0
Alguem me ajuda ?


ta ae o coodico completo do payday
Код:
public PayDay()
{
	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 = 3; }
			    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];
				    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: {FF6347}-R$%d", checks, TaxValue);
					SendClientMessage(i, COLOR_GRAD1, gstring);
					SendClientMessage(i, COLOR_GRAD1, "  Mйdico: {FF6347}-R$100");
					if(PlayerInfo[i][pPHousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
					{
					    format(gstring, sizeof(gstring), "  Taxa de Iluminaзгo Pъblica: {FF6347}-R$%d", ebill);
						SendClientMessage(i, COLOR_GRAD1, gstring);
					}
					format(gstring, sizeof(gstring), "  Banco: {FF6347}R$%d", Conta);
					SendClientMessage(i, COLOR_GRAD1, gstring);
					format(gstring, sizeof(gstring), "  Juros: {FF6347}0.%d  por cento",tmpintrate);
					SendClientMessage(i, COLOR_GRAD2, gstring);
					SendClientMessage(i, COLOR_GRAD4, "|_______________________________________|");
					format(gstring, sizeof(gstring), "  Novo Saldo: {FF6347}R$%d", PlayerInfo[i][pConta]);
					SendClientMessage(i, COLOR_GRAD5, gstring);
					format(gstring, sizeof(gstring), "  Aluguel: {FF6347}-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);
					rent = 0;
					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);
		}
	}
	Avisouc = 0;
	OOCNews(COLOR_WHITE, "Loteria: Ja comecou a loteria.");
	new rand = random(80);
	if(rand < 77) { rand += 3; }
	Lotto(rand);
	Checkprop();
	//return true;
}

stock strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}
	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}
stock strtokEx(const string[], &index)
{
	new length = strlen(string);
 	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}
	new offset = index;
	new result[64];
	while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}
public split(const strsrc[], strdest[][], delimiter)
{
	new i, li;
	new aNum;
	new len;
	while(i <= strlen(strsrc)){
	    if(strsrc[i]==delimiter || i==strlen(strsrc)){
	        len = strmid(strdest[aNum], strsrc, li, i, 128);
	        strdest[aNum][len] = 0;
	        li = i+1;
	        aNum++;
		}
		i++;
	}
	return true;
}
Codico do /setartaxa

Код:
	if(strcmp(cmd,"/setartaxa",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pLider] != 7)
	        {
				SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й o Prefeito !");
				return true;
	        }
	        tmp = strtok(cmdtext, idx);
	        if(!strlen(tmp)) {
				SendClientMessage(playerid, COLOR_WHITE, "USE: /setartaxa [quantidade]");
				return true;
			}
			moneys = strval(tmp);
			if(moneys < 1 || moneys > 10000) { SendClientMessage(playerid, COLOR_GREY, "   O Dinheiro da Taxa nгo pode ser menor que 1 ou maior que 10000 !"); return true; }
			Tax = moneys;
			SaveStuff();
			format(string, sizeof(string), "* Cada Jogador vai pagar uma taxa de R$%d, apartir de agora!", Tax);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
			format(string, sizeof(string), "Notнcias: O Prefeito acaba de mudar a Taxa por Pessoa para: R$%d.", Tax);
			SendClientMessageToAll(COLOR_LIGHTBLUE, string);
	    }
	    return true;
	}
Reply
#2

da o cуdigo do PayDay nй
Reply
#3

Poste o cуdigo .pwn (pawno) do seu gamemode.
Reply
#4

Posta o payday como o JF disse. Talvez seja problema com strings...
Reply
#5

O Codigo completo do payday:
Код:
public PayDay()
{
	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 = 3; }
			    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];
				    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: {FF6347}-R$%d", checks, TaxValue);
					SendClientMessage(i, COLOR_GRAD1, gstring);
					SendClientMessage(i, COLOR_GRAD1, "  Mйdico: {FF6347}-R$100");
					if(PlayerInfo[i][pPHousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
					{
					    format(gstring, sizeof(gstring), "  Taxa de Iluminaзгo Pъblica: {FF6347}-R$%d", ebill);
						SendClientMessage(i, COLOR_GRAD1, gstring);
					}
					format(gstring, sizeof(gstring), "  Banco: {FF6347}R$%d", Conta);
					SendClientMessage(i, COLOR_GRAD1, gstring);
					format(gstring, sizeof(gstring), "  Juros: {FF6347}0.%d  por cento",tmpintrate);
					SendClientMessage(i, COLOR_GRAD2, gstring);
					SendClientMessage(i, COLOR_GRAD4, "|_______________________________________|");
					format(gstring, sizeof(gstring), "  Novo Saldo: {FF6347}R$%d", PlayerInfo[i][pConta]);
					SendClientMessage(i, COLOR_GRAD5, gstring);
					format(gstring, sizeof(gstring), "  Aluguel: {FF6347}-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);
					rent = 0;
					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);
		}
	}
	Avisouc = 0;
	OOCNews(COLOR_WHITE, "Loteria: Ja comecou a loteria.");
	new rand = random(80);
	if(rand < 77) { rand += 3; }
	Lotto(rand);
	Checkprop();
	//return true;
}

stock strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}
	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}
stock strtokEx(const string[], &index)
{
	new length = strlen(string);
 	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}
	new offset = index;
	new result[64];
	while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}
public split(const strsrc[], strdest[][], delimiter)
{
	new i, li;
	new aNum;
	new len;
	while(i <= strlen(strsrc)){
	    if(strsrc[i]==delimiter || i==strlen(strsrc)){
	        len = strmid(strdest[aNum], strsrc, li, i, 128);
	        strdest[aNum][len] = 0;
	        li = i+1;
	        aNum++;
		}
		i++;
	}
	return true;
}
Reply
#6

pawn Код:
public PayDay()
{
    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 = 3; }
                else if(PlayerInfo[i][pVIP] == 2) { tmpintrate = 4; }
                else { tmpintrate = 1; }
                if(PlayerInfo[i][pPayDay] >= 3)
                {
                    new TaxValue;
                    PlayerInfo[i][pConta] -= TaxValue - Tax;
                    new checks = PlayerInfo[i][pSalario];
                    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: {FF6347}-R$%d", checks, Tax);
                    SendClientMessage(i, COLOR_GRAD1, gstring);
                    SendClientMessage(i, COLOR_GRAD1, "  Mйdico: {FF6347}-R$100");
                    if(PlayerInfo[i][pPHousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
                    {
                        format(gstring, sizeof(gstring), "  Taxa de Iluminaзгo Pъblica: {FF6347}-R$%d", ebill);
                        SendClientMessage(i, COLOR_GRAD1, gstring);
                    }
                    format(gstring, sizeof(gstring), "  Banco: {FF6347}R$%d", Conta);
                    SendClientMessage(i, COLOR_GRAD1, gstring);
                    format(gstring, sizeof(gstring), "  Juros: {FF6347}0.%d  por cento",tmpintrate);
                    SendClientMessage(i, COLOR_GRAD2, gstring);
                    SendClientMessage(i, COLOR_GRAD4, "|_______________________________________|");
                    format(gstring, sizeof(gstring), "  Novo Saldo: {FF6347}R$%d", PlayerInfo[i][pConta]);
                    SendClientMessage(i, COLOR_GRAD5, gstring);
                    format(gstring, sizeof(gstring), "  Aluguel: {FF6347}-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);
                    rent = 0;
                    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);
        }
    }
    Avisouc = 0;
    OOCNews(COLOR_WHITE, "Loteria: Ja comecou a loteria.");
    new rand = random(80);
    if(rand < 77) { rand += 3; }
    Lotto(rand);
    Checkprop();
    //return true;
}

stock strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
stock strtokEx(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[64];
    while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
public split(const strsrc[], strdest[][], delimiter)
{
    new i, li;
    new aNum;
    new len;
    while(i <= strlen(strsrc)){
        if(strsrc[i]==delimiter || i==strlen(strsrc)){
            len = strmid(strdest[aNum], strsrc, li, i, 128);
            strdest[aNum][len] = 0;
            li = i+1;
            aNum++;
        }
        i++;
    }
    return true;
}
Reply
#7

Deu aviso:
Код:
C:\Users\Felipe\Desktop\GTA server\gamemodes\LoL.pwn(12960) : warning 219: local variable "TaxValue" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          11836 bytes
Code size:          2254328 bytes
Data size:          2213060 bytes
Stack/heap size:      16384 bytes; estimated max. usage=7008 cells (28032 bytes)
Total requirements: 4495608 bytes

1 Warning.
Mas Funfo, vllww ae



Foi nessa linha (1260):
Код:
(1258)                if(PlayerInfo[i][pPayDay] >= 3)
(1259)                {
(1260)                    new TaxValue;
(1261)                    PlayerInfo[i][pConta] -= TaxValue - Tax;
(1262)                    new checks = PlayerInfo[i][pSalario];
(1263)                    new ebill = (PlayerInfo[i][pConta]/30000)*(PlayerInfo[i][pLevel]);
(1264)                    ConsumingMoney[i] = 1;
(1265)                    GivePlayerMoneyEx(i, checks);
Reply
#8

Ve se nгo tem uma variavel global com o mesmo nome!
Reply
#9

Ai se tiver, й sу mudar para qualquer nome mau.tito ? vou colocar aki tbm pois estou com o msm problema !
Reply
#10

Quote:
Originally Posted by _LorD_
Посмотреть сообщение
Ai se tiver, й sу mudar para qualquer nome mau.tito ? vou colocar aki tbm pois estou com o msm problema !
Vocк vai trocar a variбvel por outro nome ou excluir ela. Isso acontece quando ela й definida duas vezes ou mais.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)