[Ajuda] Sistema Salario
#1

Nesse Codigo no lugar do numero 0 й o valor que o membro de cada Org ira ganhar por Salario

Код:
new OrgsSalaries[MAX_ORGS] = {

0,
5000,//PM
0,//FBI
0,//FA
0,//BOMBEIROS
0,//BALLAS
0,//GROVE
0,//POLITICO
0,//HITMAN
0,//SA NEWS
0,//LOWRIDER
0,//RIFFA
0,//VAGOS
0,//BIKERS
0,//GUARDA MUNICIPAL
0,//AZTECAS
0,//RUSSA
0,//YAKUZA
0,//DRIFTERS
0,//ComandoVermelho
0,//Pcc
0,//BOPE
0,//ALQAEDA
0,//PC
0,//KINGS
};
Nesse Codigo й oque aparece na hora do salario pro player

Код:
else if(Player[i][pMember] != 0)
				{ 
				  	format(string, sizeof(string), "  Salбrio:  [+]  R$%d", OrgsSalaries[Player[i][pMember]]);
     			    GivePlayerGP(i, OrgsSalaries[Player[i][pMember]]);
				}
Como voces podem ver esse codigo acima puxa o OrgsSalaries e informa que o Salбrio por exemplo da PM й 5000 e informa pros players que sгo da PM que eles receberam 5000, mais esse salario ai й pra todos membros, entao eu fiz um sistema em que cada Cargo da org ira receber certo salario e eu queria saber como eu faзo pra botar pra aparecer quando o player receber o salario


CODIGO Que eu fiz onde cada membro recebe o salario proporcional ao cargo



Код:
stock QuantiaRecebida(playerid)
{
	new Quantiax[48];
	if(Player[playerid][pMember] == TEAM_PM || Player[playerid][pLeader] == TEAM_PM)//PM Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "2000";
	    else if(Player[playerid][pRank] == 2)Quantiax = "2500";
	   	else if(Player[playerid][pRank] == 3)Quantiax = "3000";
	   	else if(Player[playerid][pRank] == 4)Quantiax = "3500";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "4000";
		else if(Player[playerid][pRank] == 6)Quantiax = "5000";
	  	//else  rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_PF || Player[playerid][pLeader] == TEAM_PF)//PF Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "2000";
	    else if(Player[playerid][pRank] == 2)Quantiax = "2500";
	   	else if(Player[playerid][pRank] == 3)Quantiax = "3000";
	   	else if(Player[playerid][pRank] == 4)Quantiax = "3500";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "4000";
		else if(Player[playerid][pRank] == 6)Quantiax = "5000";
		//else rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_FA || Player[playerid][pLeader] == TEAM_FA)//FA Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "3000";
	    else if(Player[playerid][pRank] == 2)Quantiax = "3500";
	   	else if(Player[playerid][pRank] == 3)Quantiax = "4000";
	   	else if(Player[playerid][pRank] == 4)Quantiax = "4500";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "5000";
		else if(Player[playerid][pRank] == 6)Quantiax = "7000";
		//else  rank = "Nenhum";
    }
    else if(Player[playerid][pMember] == TEAM_BOMBE || Player[playerid][pLeader] == TEAM_BOMBE)//FA Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "1500";
	    else if(Player[playerid][pRank] == 2)Quantiax = "1800";
	   	else if(Player[playerid][pRank] == 3)Quantiax = "2000";
	   	else if(Player[playerid][pRank] == 4)Quantiax = "2500";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "3000";
		else if(Player[playerid][pRank] == 6)Quantiax = "4000";
		//else  rank = "Nenhum";
    }
    else if(Player[playerid][pMember] == TEAM_BOPE || Player[playerid][pLeader] == TEAM_BOPE)//BOPE Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "2000";
	    else if(Player[playerid][pRank] == 2)Quantiax = "2500";
	   	else if(Player[playerid][pRank] == 3)Quantiax = "3000";
	   	else if(Player[playerid][pRank] == 4)Quantiax = "3500";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "4000";
		else if(Player[playerid][pRank] == 6)Quantiax = "5000";
		//else  rank = "Nenhum";
    }
	else if(Player[playerid][pMember] == TEAM_BALLAS || Player[playerid][pLeader] == TEAM_BALLAS || Player[playerid][pMember] == TEAM_GROOVE || Player[playerid][pLeader] == TEAM_GROOVE || Player[playerid][pMember] == TEAM_VAGOS || Player[playerid][pLeader] == TEAM_VAGOS || Player[playerid][pMember] == TEAM_AZTECAS || Player[playerid][pLeader] == TEAM_AZTECAS)//Grove/Ballas/Vagos/Aztecas Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "2000";
	   	else if(Player[playerid][pRank] == 2)Quantiax = "2500";
		else if(Player[playerid][pRank] == 3)Quantiax = "2700";
		else if(Player[playerid][pRank] == 4)Quantiax = "3000";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "3500";
  	   	else if(Player[playerid][pRank] == 6)Quantiax = "4000";
	   	//else  rank = "Nenhum";
    }
 	else if(Player[playerid][pMember] == TEAM_LOWRIDERS || Player[playerid][pLeader] == TEAM_LOWRIDERS || Player[playerid][pMember] == TEAM_DRIFTERS || Player[playerid][pLeader] == TEAM_DRIFTERS || Player[playerid][pMember] == TEAM_KINGS || Player[playerid][pLeader] == TEAM_KINGS)//Lowriders Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "2000";
	   	else if(Player[playerid][pRank] == 2)Quantiax = "2500";
		else if(Player[playerid][pRank] == 3)Quantiax = "2700";
		else if(Player[playerid][pRank] == 4)Quantiax = "3000";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "3500";
  	   	else if(Player[playerid][pRank] == 6)Quantiax = "4000";
		//else  rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_COMANDOVERMELHO || Player[playerid][pLeader] == TEAM_COMANDOVERMELHO || Player[playerid][pMember] == TEAM_PCC || Player[playerid][pLeader] == TEAM_PCC)//CV/PCC Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "2000";
	   	else if(Player[playerid][pRank] == 2)Quantiax = "2500";
		else if(Player[playerid][pRank] == 3)Quantiax = "2700";
		else if(Player[playerid][pRank] == 4)Quantiax = "3000";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "3500";
  	   	else if(Player[playerid][pRank] == 6)Quantiax = "4000";
		//else  rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_PREF || Player[playerid][pLeader] == TEAM_PREF)//Prefeito Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "1500";
		else if(Player[playerid][pRank] == 2)Quantiax = "2500";
	    else if(Player[playerid][pRank] == 3)Quantiax = "3000";
		else if(Player[playerid][pRank] == 4)Quantiax = "4000";
	    else if(Player[playerid][pRank] == 5)Quantiax = "5000";
		else if(Player[playerid][pRank] == 6)Quantiax = "5500";
		//else rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_HITMAN || Player[playerid][pLeader] == TEAM_HITMAN)//Hitman Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "2000";
	   	else if(Player[playerid][pRank] == 2)Quantiax = "2500";
		else if(Player[playerid][pRank] == 3)Quantiax = "2700";
		else if(Player[playerid][pRank] == 4)Quantiax = "3000";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "3500";
  	   	else if(Player[playerid][pRank] == 6)Quantiax = "4000";
		//else rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_MUNICIPAL || Player[playerid][pLeader] == TEAM_MUNICIPAL)//MUNICIPAL Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "1700";
	    else if(Player[playerid][pRank] == 2)Quantiax = "2000";
	   	else if(Player[playerid][pRank] == 3)Quantiax = "2500";
	   	else if(Player[playerid][pRank] == 4)Quantiax = "3000";
	   	else if(Player[playerid][pRank] == 5)Quantiax = "3500";
		else if(Player[playerid][pRank] == 6)Quantiax = "4000";
	   	//else rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_SANEWS || Player[playerid][pLeader] == TEAM_SANEWS)//Reporters Ranks
	{
		if(Player[playerid][pRank] == 1)Quantiax = "1500";
		else if(Player[playerid][pRank] == 2)Quantiax = "2000";
		else if(Player[playerid][pRank] == 3)Quantiax = "2500";
		else if(Player[playerid][pRank] == 4)Quantiax = "3000";
		else if(Player[playerid][pRank] == 5)Quantiax = "3200";
		else if(Player[playerid][pRank] == 6)Quantiax = "3500";
		//else rank = "Nenhum";
	}
    else if(Player[playerid][pMember] == TEAM_RUSSA || Player[playerid][pLeader] == TEAM_RUSSA || Player[playerid][pMember] == TEAM_YAKUZA || Player[playerid][pLeader] == TEAM_YAKUZA)// Russa/yakusa
	{
		if(Player[playerid][pRank] == 1)Quantiax = "2200";
		else if(Player[playerid][pRank] == 2)Quantiax = "2600";
		else if(Player[playerid][pRank] == 3)Quantiax = "3000";
		else if(Player[playerid][pRank] == 4)Quantiax = "3500";
		else if(Player[playerid][pRank] == 5)Quantiax = "4500";
	    else if(Player[playerid][pRank] == 6)Quantiax = "5000";
		//else rank = "Nenhum";
	}
	return Quantiax;
}
stock RecebeuCargo(playerid)
{
	if(Player[playerid][pMember] == TEAM_PM || Player[playerid][pLeader] == TEAM_PM)//PM Ranks
	{
		if(Player[playerid][pRank] == 1) return GivePlayerGP(playerid, 2000);
	    else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2500);
	   	else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 3000);
	   	else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3500);
	   	else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 4000);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 5000);
	  	//else  rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_PF || Player[playerid][pLeader] == TEAM_PF)//PF Ranks
	{
		if(Player[playerid][pRank] == 1) return GivePlayerGP(playerid, 2000);
	    else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2500);
	   	else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 3000);
	   	else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3500);
	   	else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 4000);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 5000);
		//else rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_FA || Player[playerid][pLeader] == TEAM_FA)//FA Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 3000);
	    else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 3500);
	   	else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 4000);
	   	else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 4500);
	   	else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 5000);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 7000);
		//else  rank = "Nenhum";
    }
    else if(Player[playerid][pMember] == TEAM_BOMBE || Player[playerid][pLeader] == TEAM_BOMBE)//FA Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 1500);
	    else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 1800);
	   	else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 2000);
	   	else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 2500);
	   	else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 3000);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 4000);
		//else  rank = "Nenhum";
    }
    else if(Player[playerid][pMember] == TEAM_BOPE || Player[playerid][pLeader] == TEAM_BOPE)//BOPE Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 2000);
	    else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2500);
	   	else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 3000);
	   	else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3500);
	   	else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 4000);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 5000);
		//else  rank = "Nenhum";
    }
	else if(Player[playerid][pMember] == TEAM_BALLAS || Player[playerid][pLeader] == TEAM_BALLAS || Player[playerid][pMember] == TEAM_GROOVE || Player[playerid][pLeader] == TEAM_GROOVE || Player[playerid][pMember] == TEAM_VAGOS || Player[playerid][pLeader] == TEAM_VAGOS || Player[playerid][pMember] == TEAM_AZTECAS || Player[playerid][pLeader] == TEAM_AZTECAS)//Grove/Ballas/Vagos/Aztecas Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 2000);
	   	else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2500);
		else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 2700);
		else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3000);
	   	else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 3500);
  	   	else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 4000);
	   	//else  rank = "Nenhum";
    }
 	else if(Player[playerid][pMember] == TEAM_LOWRIDERS || Player[playerid][pLeader] == TEAM_LOWRIDERS || Player[playerid][pMember] == TEAM_DRIFTERS || Player[playerid][pLeader] == TEAM_DRIFTERS || Player[playerid][pMember] == TEAM_KINGS || Player[playerid][pLeader] == TEAM_KINGS)//Lowriders Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 2000);
		else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2500);
		else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 2700);
		else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3000);
		else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 3500);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 4000);
		//else  rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_COMANDOVERMELHO || Player[playerid][pLeader] == TEAM_COMANDOVERMELHO || Player[playerid][pMember] == TEAM_PCC || Player[playerid][pLeader] == TEAM_PCC)//CV/PCC Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 2000);
		else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2500);
		else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 2700);
		else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3000);
		else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 3500);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 4000);
		//else  rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_PREF || Player[playerid][pLeader] == TEAM_PREF)//Prefeito Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 1500);
		else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2500);
	    else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 3000);
		else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 4000);
	    else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 5000);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 5500);
		//else rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_HITMAN || Player[playerid][pLeader] == TEAM_HITMAN)//Hitman Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 2000);
		else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2500);
		else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 2700);
		else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3000);
		else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 3500);
	  	else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 4000);
		//else rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_MUNICIPAL || Player[playerid][pLeader] == TEAM_MUNICIPAL)//MUNICIPAL Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 1700);
	   	else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2000);
	   	else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 2500);
	   	else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3000);
	   	else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 3500);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 4000);
	   	//else rank = "Nenhum";
	}
	else if(Player[playerid][pMember] == TEAM_SANEWS || Player[playerid][pLeader] == TEAM_SANEWS)//Reporters Ranks
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 1500);
		else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2000);
		else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 2500);
		else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3000);
		else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 3200);
		else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 3500);
		//else rank = "Nenhum";
	}
    else if(Player[playerid][pMember] == TEAM_RUSSA || Player[playerid][pLeader] == TEAM_RUSSA || Player[playerid][pMember] == TEAM_YAKUZA || Player[playerid][pLeader] == TEAM_YAKUZA)// Russa/yakusa
	{
		if(Player[playerid][pRank] == 1)return GivePlayerGP(playerid, 2200);
		else if(Player[playerid][pRank] == 2)return GivePlayerGP(playerid, 2600);
		else if(Player[playerid][pRank] == 3)return GivePlayerGP(playerid, 3000);
		else if(Player[playerid][pRank] == 4)return GivePlayerGP(playerid, 3500);
		else if(Player[playerid][pRank] == 5)return GivePlayerGP(playerid, 4500);
	    else if(Player[playerid][pRank] == 6)return GivePlayerGP(playerid, 5000);
		//else rank = "Nenhum";
	}
	return 1;
}
Reply
#2

SendClientMessage(playerid, COR, "Mensagem");
Reply
#3

Nгo nгo vini, tipo assim, й que tinha 2 lugares definindo o salario das orgs, ai la onde mostra o SALARIO de tal org ele ta puxando da new OrgsSalaries e eu quero que ele puxe desse novo codigo qeu eu fiz onde o salario nгo й unico pra todos membros da org
Reply
#4

Код:
SendClientMessage(i, COLOR_WHITE, "|_________ EXTRATO DO BANCO _________|");
				if(rent >= 0)
				{
					format(string, sizeof(string), "  Aluguel:  [-]  R$%d", rent);
					SendClientMessage(i, COLOR_GREY, string);
					GivePlayerGP(i, -rent);
				}
				if(Player[i][pMember] == 0 && Player[i][pJob] != DESEMPREGADO)
				{
				    format(string, sizeof(string), "  Salбrio:  [+]  R$%d", JOB_SAL);
					GivePlayerGP(i, JOB_SAL);
				}
				else if(Player[i][pMember] != 0)
				{ 
				  	format(string, sizeof(string), "  Salбrio:  [+]  R$%d", OrgsSalaries[Player[i][pMember]]);
     			    GivePlayerGP(i, OrgsSalaries[Player[i][pMember]]);
				}
  			 	SendClientMessage(i, COLOR_GREY, string);
  			 	Player[i][pBank] -= Tax;

                if(Player[i][pJob] == DESEMPREGADO && Player[i][pMember] == 0)
				{
				    GivePlayerGP(i, 500);
				    SendClientMessage(i, COLOR_GREY, "  Seguro Desemprego:   [+]  R$500");
                }
                if(Player[i][pMember] == TEAM_BOPE || Player[i][pMember] == TEAM_FA || Player[i][pMember] == TEAM_PM || Player[i][pMember] == TEAM_PF || Player[i][pMember] == TEAM_PREF || Player[i][pMember] == TEAM_MUNICIPAL)
				{
					GivePlayerGP(i, 900);
				    SendClientMessage(i, COLOR_GREY, "  Seguro Governo:   [+]  R$900");
                }
Ai й todo o codigo que mostra pros players o salarios deles, ai ondem tem format
Код:
else if(Player[i][pMember] != 0)
				{ 
				  	format(string, sizeof(string), "  Salбrio:  [+]  R$%d", OrgsSalaries[Player[i][pMember]]);
     			    GivePlayerGP(i, OrgsSalaries[Player[i][pMember]]);
				}
Eu quero que esse codigo ai puxe os salarios que eu defini ali pra cada membro saco ?

Sabes me informar como ou mostrar um exemplo pra mim testa ?
Reply
#5

Acho mais simples transformar OrgsSalaries em uma matriz parecida com essa :

pawn Код:
new OrgsSalaries[MAX_ORGS][6] = {

{1000, 2000, 3000, 4000, 5000, 6000}, // PM
Assim vocк saberia o valor do cargo de cada organizaзгo.
Reply
#6

Se eu fizer uma matriz igual vocк fez ai, daria certo para cada cargo receber cada salario ? ou teria que definir outra coisa na matriz ?

E Lб onde informa o salario teria que mudar algo ?
Reply
#7

Na hora de receber o salбrio ficaria mais ou menos assim :
pawn Код:
format(string, sizeof(string), "  Salбrio:  [+]  R$%d", OrgsSalaries[Player[i][pMember]-1][Player[i][pRank]-1]);
GivePlayerGP(i, OrgsSalaries[Player[i][pMember]-1][Player[i][pRank]-1]);
Reply
#8

Код:
format(string, sizeof(string), "  Salбrio:  [+]  R$%d", OrgsSalaries[Player[i][pMember]-1][Player[i][pRank]-1]);
GivePlayerGP(i, OrgsSalaries[Player[i][pMember]-1][Player[i][pRank]-1]);
Esse codigo ai ele serve pra todas orgs jб serviria pra todas orgs ou teria que fazer 1 pra cada org ? O.o


Seguinte erro
Код:
.pwn(665) : error 029: invalid expression, assumed zero
.pwn(665) : error 008: must be a constant expression; assumed zero
Linha 665 й
Код:
new OrgsSalaries[MAX_ORGS][6] = {

{0, 0, 0, 0, 0, 0},
{1000, 2000, 3000, 4000, 5000, 6000}, // PM
{1000, 2000, 3000, 4000, 5000, 6000}, // PF
};
Reply
#9

Faz atй o final, vocк colocou sу 3, mas MAX_ORGS tem muito mais que isso.

No ъltimo campo nгo precisa de vнrgula no final.

Se vocк colocar o primeiro campo como 0, 0, 0, 0, 0, 0 nгo precisa do -1.
Aquele cуdigo jб dб o salбrio correto pra todo mundo.
Reply
#10

Vou tentar aqui, qualquer coisa falo aqui.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)