2 pedidos dee ajuda
#1



Quando dф /equipar em um HQ, nгo ganho arma nenhuma..

Aqui o pawno.
Code:
if(strcmp(cmd, "/equipar", true) == 0)
	{
	    if(PlayerToPoint(10.0, playerid,246.6891,66.9642,1003.6406) || PlayerToPoint(10.0,playerid,229.9127,165.4368,1003.0234) || PlayerToPoint(10.0,playerid,1070.0883,-345.1344,73.9922) || PlayerToPoint(10.0,playerid,-1340.9329,491.8152,11.1953) || PlayerToPoint(10.0,playerid,242.3416,121.1088,1003.3275))
		{
	        GetPlayerName(playerid, sendername, sizeof(sendername));
	        if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)//Delegado
	        {
      			new x_equipar[256];
				x_equipar = strtok(cmdtext, idx);
				if(!strlen(x_equipar)) {
					SendClientMessage(playerid, COLOR_WHITE, "|__________________ EQUIPAR __________________|");
					SendClientMessage(playerid, COLOR_WHITE, "Use: /equipar [Numero do equipamento ]");
					SendClientMessage(playerid, COLOR_GREY, "Numeros: 1 - PM <|> 2 - PM Cargo 2");
					SendClientMessage(playerid, COLOR_GREY, "Numeros: 3 - PM Cargo 3 <|> 4 - GATE");
					SendClientMessage(playerid, COLOR_GREY, "Numeros: 5 - PM Lider <|> 6 - G.T.3");
					SendClientMessage(playerid, COLOR_GREY, "Numeros: 7 - Exercito <|> 8 - PC");
					SendClientMessage(playerid, COLOR_GREY, "Numeros: 9 - FAB");
					SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
					return 1; }
                if(strcmp(x_equipar,"1",true) == 0)
				{
				    if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)//Delegado
	        		{
			   	 		format(string, sizeof(string), "* %s Pegou Equipamento de COP Iniciante.", sendername);
						ProxDetector(50.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						ResetPlayerWeapons(playerid);
						SetPlayerArmour(playerid, 100);
						SetPlayerHealth(playerid, 100);
						GivePlayerWeapon(playerid, 24, 200);
		    			GivePlayerWeapon(playerid, 6, 1);
						SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento de COP Iniciante!");
			   	 		return 1;
					}
				}
				if(strcmp(x_equipar,"2",true) == 0)
				{
				    if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)//Delegado
	        		{
						if (PlayerInfo[playerid][pCargo] < 2)
						{
							SendClientMessage(playerid, COLOR_GREY, "Vocк precisa de cargo 2 para pegar este equipamento!");
							return 1;
							}
			   	 			format(string, sizeof(string), "* %s Pegou Equipamento de COP Em Treinamento.", sendername);
							ProxDetector(100.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							ResetPlayerWeapons(playerid);
		    				GivePlayerWeapon(playerid, 29, 200);
		 			 		GivePlayerWeapon(playerid, 24, 500);
				    		GivePlayerWeapon(playerid, 6, 1);
			   			 	SetPlayerArmour(playerid, 100);
							SetPlayerHealth(playerid, 100);
							SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento de COP em Treinamento!");
			   	 			return 1;

					}
				}
				if(strcmp(x_equipar,"3",true) == 0)
				{
				    if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)//Delegado
	        		{
						if(PlayerInfo[playerid][pCargo] < 3)
						{
			    			SendClientMessage(playerid, COLOR_GREY, "Vocк precisa de cargo 3 para pegar este equipamento!");
			    			return 1;
						}
							format(string, sizeof(string), "* %s Pegou Equipamento de COP Profissional.", sendername);
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							ResetPlayerWeapons(playerid);
							SetPlayerArmour(playerid, 100);
							SetPlayerHealth(playerid, 100);
							GivePlayerWeapon(playerid, 24, 300);
	    					GivePlayerWeapon(playerid, 31, 200);
		    				GivePlayerWeapon(playerid, 29, 200);
							SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento de COP Profissional!");
			   	 			return 1;

					}
				}
				if(strcmp(x_equipar,"4",true) == 0)
				{
					if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1)//Delegado
	        		{
						if(PlayerInfo[playerid][pCargo] < 5)
						{
			    			SendClientMessage(playerid, COLOR_GREY, "Vocк precisa ser da G.A.T.E. - Cargo 5");
			    			return 1;
						}
							format(string, sizeof(string), "* %s Pegou Equipamento Da G.A.T.E.", sendername);
							ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							SetPlayerArmour(playerid, 100);
							SetPlayerHealth(playerid, 100);
							SetPlayerSkin(playerid, 285);
							ResetPlayerWeapons(playerid);
							GivePlayerWeapon(playerid, 24, 300);
							GivePlayerWeapon(playerid, 29, 500);
		   					GivePlayerWeapon(playerid, 31, 500);
							//GivePlayerWeapon(playerid, 17, 100);
							GivePlayerWeapon(playerid, 25, 200);
		 			 		GivePlayerWeapon(playerid, 4, 1);
				    		GivePlayerWeapon(playerid, 34, 500);
							SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o equipamento da GATE!");
					   	 	return 1;

					}
				}
    			if(strcmp(x_equipar,"5",true) == 0)
				{
				    if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)//Delegado
	        		{
						if(PlayerInfo[playerid][pCargo] < 6)
						{
			    			SendClientMessage(playerid, COLOR_GREY, "Apenas Lideres ou Cargo 6 Pega Este Equipamento!!");
			    			return 1;
						}
							format(string, sizeof(string), "* %s Pegou Equipamento de Lider.", sendername);
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							SetPlayerArmour(playerid, 100);
							SetPlayerHealth(playerid, 100);
							ResetPlayerWeapons(playerid);
							GivePlayerWeapon(playerid, 24, 300);
							GivePlayerWeapon(playerid, 29, 500);
		   					GivePlayerWeapon(playerid, 31, 500);
							//GivePlayerWeapon(playerid, 17, 100);
							GivePlayerWeapon(playerid, 25, 200);
		 			 		GivePlayerWeapon(playerid, 4, 1);
				    		GivePlayerWeapon(playerid, 34, 500);
							SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento Lider!");
							return 1;

					}
				}
				if(strcmp(x_equipar,"6",true) == 0)
				{
					if(PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2)//Delegado
					{
						if(!IsACop(playerid))
	       				{
	           				SendClientMessage(playerid, COLOR_GREY, "   Voce nao e do G.T.3 !");
	           				return 1;
	       				}
							format(string, sizeof(string), "* %s Pegou Equipamento do G.T.3", sendername);
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							SetPlayerArmour(playerid, 100);
							SetPlayerHealth(playerid, 100);
							ResetPlayerWeapons(playerid);
							GivePlayerWeapon(playerid, 24, 500);
							GivePlayerWeapon(playerid, 25, 500);
							GivePlayerWeapon(playerid, 31, 500);
							GivePlayerWeapon(playerid, 29, 500);
		   					GivePlayerWeapon(playerid, 4, 1);
		   					GivePlayerWeapon(playerid, 34, 500);
							SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento do G.T.3!");
							return 1;

					}
				}
     			if(strcmp(x_equipar,"7",true) == 0)
				{
				if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)//Delegado
				{
   			 		if(!IsACop(playerid))
	        		{
	            	SendClientMessage(playerid, COLOR_GREY, "   Voce nao e do Exercito!");
	            	return 1;
	        		}
					format(string, sizeof(string), "* %s Pegou Equipamento do Exercito", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					SetPlayerArmour(playerid, 100);
					SetPlayerHealth(playerid, 100);
					ResetPlayerWeapons(playerid);
					GivePlayerWeapon(playerid, 24, 200);
   					GivePlayerWeapon(playerid, 31, 600);
				    GivePlayerWeapon(playerid, 29, 600);
				    GivePlayerWeapon(playerid, 34, 100);
					SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento do Exercito!");
					return 1;
					}
				}
    			if(strcmp(x_equipar,"8",true) == 0)
				{
				if(PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)//Delegado
				{
   			 		if(!IsACop(playerid))
	        		{
	            	SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й da Polнcia Civil!");
	            	return 1;
	        		}
					format(string, sizeof(string), "* %s pegou equipamento da Polнcia Cнvil", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					SetPlayerArmour(playerid, 100);
					SetPlayerHealth(playerid, 100);
					ResetPlayerWeapons(playerid);
					GivePlayerWeapon(playerid, 24, 300);
					GivePlayerWeapon(playerid, 29, 500);
					GivePlayerWeapon(playerid, 31, 500);
					//GivePlayerWeapon(playerid, 17, 100);
					GivePlayerWeapon(playerid, 25, 200);
		 			GivePlayerWeapon(playerid, 4, 1);
    				GivePlayerWeapon(playerid, 34, 500);
					SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento da PC!");
					return 1;
					}
				}
    			if(strcmp(x_equipar,"9",true) == 0)
				{
				if(PlayerInfo[playerid][pMembro] == 25 || PlayerInfo[playerid][pLider] == 25)//Delegado
				{
   			 		if(!IsACop(playerid))
	        		{
	            	SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й da Forзa Aerea Brasileira!");
	            	return 1;
	        		}
					format(string, sizeof(string), "* %s pegou equipamento da FAB", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					SetPlayerArmour(playerid, 100);
					SetPlayerHealth(playerid, 100);
					ResetPlayerWeapons(playerid);
					GivePlayerWeapon(playerid, 24, 200);
   					GivePlayerWeapon(playerid, 31, 600);
				    GivePlayerWeapon(playerid, 29, 600);
				    GivePlayerWeapon(playerid, 34, 100);
					SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento da FAB!");
					return 1;
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo й COP ou Nгo Existe o Numero.");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб na Delegacia.");
		}
	}


Quando digito /admins nгo aparece meu nick.
Bom..
Acho que й isso:

Code:
	/*if (strcmp(cmd, "/admins", true) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
			SendClientMessage(playerid, COLOR_GRAD1, "Admins Online:");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				    if(PlayerInfo[i][pAdmin] == 1)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 1]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 2)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 2]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 3)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 3]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 4)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 4]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 5)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 5]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 6)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 6]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] > 7)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin MASTER]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
				}
			}
		}
		return 1;
	}*/
____________

OBS - Nгo intendo quase NADA, sobre pawno, sу sei editar, entгo, por favor, dк uma ajuda mais simples.
Reply
#2

no /admins pode ser que seu level de admin estб mais alto do que no rank ai vc deve colocar seu level de admin no maximo 7 para aparecer na lista acima disso ele nгo aparecerб.

no /equipar basta vc adiciona as armas
Ex:
no..

pawn Code:
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)//Delegado
                    {
                        format(string, sizeof(string), "* %s Pegou Equipamento de COP Iniciante.", sendername);
                        ProxDetector(50.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        ResetPlayerWeapons(playerid);
                        SetPlayerArmour(playerid, 100);
                        SetPlayerHealth(playerid, 100);
                        GivePlayerWeapon(playerid, 24, 200);
                        GivePlayerWeapon(playerid, 6, 1);
                        SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento de COP Iniciante!");
                        return 1;
                    }
                }
adicionar o
Code:
GivePlayerWeapon
abaixo veja como ficaria
pawn Code:
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)//Delegado
                    {
                        format(string, sizeof(string), "* %s Pegou Equipamento de COP Iniciante.", sendername);
                        ProxDetector(50.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 25, 50);
                        GivePlayerWeapon(playerid, 24, 80);
                        GivePlayerWeapon(playerid, 3, 0);
                        GivePlayerWeapon(playerid, 31, 100);
                        SetPlayerArmour(playerid, 100.0);
                        SetPlayerHealth(playerid, 100.0);
                        SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamento de COP Iniciante!");
                        return 1;
                    }
                }
Code:
GivePlayerWeapon
й presiso saber o ID de cada arma e adicionar assim

pawn Code:
GivePlayerWeapon(playerid, 24, 80);
no numero 24 seria o ID da arma e no numero 80 a quantia de ballas.
Reply
#3

O problema no admins parece ser, na verdade, porque vc colocoua o cmd entre /* */, fazendo ele ser ignorado na hora da compilaзгo e portanto nгo funciona
Reply
#4

Vai onde voce quer que equipe da /save me manda a coordenada me fala a org que й pra equipar que fasso para voce
Reply
#5

Code:
if (strcmp(cmd, "/admins", true) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
			SendClientMessage(playerid, COLOR_GRAD1, "Admins Online:");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				    if(PlayerInfo[i][pAdmin] == 1)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 1]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 2)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 2]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 3)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 3]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 4)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 4]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 5)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 5]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] == 6)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin level 6]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
					else if(PlayerInfo[i][pAdmin] > 7)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s [Admin MASTER]", sendername);
						SendClientMessage(playerid, COLOR_GRAD2, string);
					}
				}
			}
		}
		return 1;
	}
Reply
#6

Obrigado pela ajuda de todos!

___

Agora sу estou com uma dъvida.
Antes, estava tudo certo, porйm, sem o /equipar e sem o /admins funcionando.
Mas.. agora, olhe:




Algumaaa resposta em relaзгo а isso?
Reply
#7

Vбrias funзхes que vocк deveria ter em seu gamemode e nгo tem, procure por elas e coloque-as no gamemode.
Reply
#8

Ok, manolo.
=]

Vou tentar.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)