[Ajuda] /Destruirid
#5

Код:
if(!strcmp("/destruirid", cmdtext, true))
	{
		if(IsPlayerConnected(playerid))
	    {
        	if(PlayerInfo[playerid][pAdmin] < 3)
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo estб autorizado a usar este comando !");
			    return 1;
			}
			if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
				return 1;
			}
			new counter = 0;
			new result;
			new plyName[MAX_PLAYER_NAME];
			GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
			for(new i; i != MAX_VEHICLES; i++)
			{
				new dist = ChecarveiculoBMG(5, playerid, i);
				if(dist)
				{
					result = i;
					counter++;
				}
			}
			switch(counter)
			{
				case 0:
				{
					SendClientMessage(playerid, COLOR_GREY, "   Nгo hб nenhum carro nesse raio!");
				}
				case 1:
				{
				    if(result < CAR_AMOUNT)
				    {
				    	SendClientMessage(playerid, COLOR_GREY, "Vocк sу pode destruir veнculos criados");
				    	return 1;
				    }
					new name[MAX_PLAYER_NAME];
				    GetPlayerName(playerid, name, sizeof(name));
					DestroyVehicle(result);
				    format(string, sizeof(string), "Vocк destruiu o veнculo ID:[%d]", result);
				    SendClientMessage(playerid, COLOR_GREY, string);
				    if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
				    {
						format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi destruido Por: Chuck_Norris", result);
						ABroadCast(COLOR_YELLOW,string,1);
					}
					else
					{
						format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi destruido Por: %s", result, name);
						ABroadCast(COLOR_YELLOW,string,1);
					}
				}
				default:
				{
					SendClientMessage(playerid, COLOR_GREY, "   Foram encontrados mais de um carro nesse raio");
				}
			}
		}
		return 1;
	}
Reply


Messages In This Thread
/Destruirid - by Wendell - 22.09.2012, 18:57
Re: /Destruirid - by dimmy_ - 22.09.2012, 18:58
Re: /Destruirid - by -Don Corleone - 22.09.2012, 18:59
Re: /Destruirid - by FeelLikeASir_ - 22.09.2012, 19:02
Re: /Destruirid - by Wendell - 22.09.2012, 19:19
Re: /Destruirid - by -Don Corleone - 22.09.2012, 19:40
Re: /Destruirid - by Wendell - 22.09.2012, 19:42
Re: /Destruirid - by -Don Corleone - 22.09.2012, 19:44

Forum Jump:


Users browsing this thread: 3 Guest(s)