[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


Messages In This Thread
Sistema Salario - by LucasHammes - 19.07.2014, 02:41
Re: Sistema Salario - by ViniBorn - 19.07.2014, 03:16
Re: Sistema Salario - by LucasHammes - 19.07.2014, 03:31
Re: Sistema Salario - by LucasHammes - 19.07.2014, 03:34
Re: Sistema Salario - by ViniBorn - 19.07.2014, 03:51
Re: Sistema Salario - by LucasHammes - 19.07.2014, 03:54
Re: Sistema Salario - by ViniBorn - 19.07.2014, 04:04
Re: Sistema Salario - by LucasHammes - 19.07.2014, 04:28
Re: Sistema Salario - by ViniBorn - 19.07.2014, 04:41
Re: Sistema Salario - by LucasHammes - 19.07.2014, 04:44

Forum Jump:


Users browsing this thread: 1 Guest(s)