Breaking into cars..
#3

Quote:
Originally Posted by Andregood
Посмотреть сообщение
Get the ID with a loop (loop through MAX_VEHICLES, I think I saw you had that)

new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(i, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParams or w/e the function is.

I finds the closest vehicle so yes you do have the ID
I had

Код:
native IsValidVehicle(vehicleid);

CMD:carbreakin(playerid, params[])
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
	new
		Float: vX,
		Float: vY,
		Float: vZ
	;

   	for(new i = 0; i != MAX_VEHICLES; i++)
	{
		if (!IsValidVehicle(i))
			continue;

		GetVehiclePos(i, vX, vY, vZ);
  		if(IsPlayerInRangeOfPoint(playerid, 5.0, vX, vY, vZ))
    	{
        	SendClientMessage(playerid, COLOR_LIGHTRED, "You're near a car and the breakin bit needs adding");
        	break;
    	}
    	else
    	{

    	}
	}
	return 1;
}
But setting if I used 'i' to set vehicle params would it not set all the vehicle params?
Reply


Messages In This Thread
Breaking into cars.. - by izeatfishz - 09.04.2015, 11:28
Re: Breaking into cars.. - by Andregood - 09.04.2015, 11:35
Re: Breaking into cars.. - by izeatfishz - 09.04.2015, 11:37
Re: Breaking into cars.. - by Andregood - 09.04.2015, 11:39
Re: Breaking into cars.. - by izeatfishz - 09.04.2015, 11:42
Re: Breaking into cars.. - by Andregood - 09.04.2015, 11:46
Re: Breaking into cars.. - by izeatfishz - 09.04.2015, 11:49
Re: Breaking into cars.. - by Andregood - 09.04.2015, 11:54
Re: Breaking into cars.. - by izeatfishz - 09.04.2015, 11:59
Re: Breaking into cars.. - by Andregood - 09.04.2015, 12:00

Forum Jump:


Users browsing this thread: 2 Guest(s)