[Ajuda] Comando estб funcionando sу com os carros
#1

Pq esse comando nгo estб funcionando com os carros prуprios? (carros de player)
Carro proprio:
Onplayerconnect
Код:
carro[playerid] = CreateVehicle(carid[playerid], carpos[playerid][0], carpos[playerid][1], carpos[playerid][2], carpos[playerid][3], 0, 1, 0);
Esse comando sу ta funcionando com os carros que sгo criados ongamemodeinit
Код:
// DP LS
	CreateVehicle(523,1586.3691,-1671.4324,5.6137,272.5536,0,1,300); // moto 1 [41]
Comando:
Код:
	CMD:rcar(playerid) {
		if(admin[playerid] < 6) return 0;
		new string[128];
		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 = Checarveiculoportamala(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:
			{
				new name[MAX_PLAYER_NAME];
				GetPlayerName(playerid, name, sizeof(name));
				format(string, sizeof(string), "Vocк reparou o carro ID:[%d]", result);
				SendClientMessage(playerid, COLOR_GREY, string);
				format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi reparado Por: %s", result, name);
				ABroadCast(COLOR_YELLOW,string,1);
				RepairVehicle(result);
			}
			default:
			{
				SendClientMessage(playerid, COLOR_GREY, "   Foram encontrados mais de um carro nesse raio");
			}
		}

		return 1;
	}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)