[Ajuda] Comando /algemar
#1

Boa tarde, alguйm poderia me ajudar com esse comando ? o problema й que ele funciona com qualquer user, gostaria que ele funcionasse somente com procurados, deixarei o Cmd para anбlise.

Thanks.


Код:
	CMD:algemar(playerid, params[])
	{
	    	if(!IsACop(playerid))
			{
			    SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й um policial!");
			    return true;
			}
			if(OnDuty[playerid] != 1)
			{
			    SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo Bateu o cartгo!");
			    return true;
			}
			if(sscanf(params, "u", giveplayerid))
			{
				SendClientMessage(playerid, COLOR_WHITE, "Use: /algemar [ID do Player]");
				return true;
			}
		    if(IsPlayerInAnyVehicle(playerid))
		    {
		        SendClientMessage(playerid, COLOR_GREY, "   Nгo й possivel algemar de dentro do carro !");
		        return true;
		    }
			if(IsPlayerConnected(giveplayerid))
			{
        	    new string[128];
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			    
			        if(IsACop(giveplayerid))
			        {
           				SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo pode algemar COPs !");
       					return true;
			        }
           
				    if(IsPlayerInAnyVehicle(giveplayerid))
				    {
				        SendClientMessage(playerid, COLOR_GREY, "   Nгo й possivel algemar um player dentro do carro !");
				        return true;
				    }
					if (ProxDetectorS(8.0, playerid, giveplayerid))
					{
					    if(giveplayerid == playerid)
						{
							SendClientMessage(playerid, COLOR_GREY, "Vocк nao pode se algemar!");
							return true;
						}
						new skin = GetPlayerSkin(giveplayerid);
      					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
      					format(string, sizeof(string), "* Vocк foi algemado pelo: %s.", PlayerName(playerid));
						SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "* Vocк algemou %s.", giveplayer);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "* Oficial %s algemou %s.", sendername ,giveplayer);
						SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						GameTextForPlayer(giveplayerid, "~r~Algemado", 2500, 3);
						PlayerCuffed[giveplayerid] = 2;
						antihands[giveplayerid] = 1;


						SetPlayerAttachedObject(giveplayerid, 4, 19418, 6,
						CUFF_CuffObjectOffsets[skin][0], CUFF_CuffObjectOffsets[skin][1], CUFF_CuffObjectOffsets[skin][2],
						CUFF_CuffObjectOffsets[skin][3], CUFF_CuffObjectOffsets[skin][4], CUFF_CuffObjectOffsets[skin][5],
						CUFF_CuffObjectOffsets[skin][6], CUFF_CuffObjectOffsets[skin][7], CUFF_CuffObjectOffsets[skin][8]);

						SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
			   		}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "   O Jogador estб longe de Vocк !");
					    return true;
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   O Jogador Estб Offline !");
			    return true;
			}
			return true;
	}
Reply


Messages In This Thread
Comando /algemar - by Japis - 09.04.2017, 19:38
Re: Comando /algemar - by HoodScript - 09.04.2017, 19:45
Re: Comando /algemar - by Jelly23 - 09.04.2017, 19:49
Re: Comando /algemar - by HoodScript - 09.04.2017, 19:50
Re: Comando /algemar - by Jelly23 - 09.04.2017, 19:52
Re: Comando /algemar - by HoodScript - 09.04.2017, 19:53

Forum Jump:


Users browsing this thread: 3 Guest(s)