Vehicle Impound
#1

No idea why this isn't working:

Код:
CMD:impound(playerid, params[])
{
    foreach(Player, x)
    {
		new playerTowTruck = GetPlayerVehicleID(playerid);

		if(IsTrailerAttachedToVehicle(playerTowTruck))
  		{
            if(IsPlayerInRangeOfPoint(playerid, -1515.78735352,746.20556641,6.83672571, 45.0))
			{
				if(impoundCar == 0)
				{
    				SendClientMessage(playerid, COLOR_GREY, "TEST TEST TEST");
				    new vid = GetVehicleTrailer(playerVariables[x][pCarID]);
				    GetPlayerVehicleID(vid);
     				DetachTrailerFromVehicle(playerTowTruck);
					playerVariables[vid][pCarPos][0] = -1515.32312012;
					playerVariables[vid][pCarPos][1] = 727.04193115;
					playerVariables[vid][pCarPos][2] = 6.83672571;
					playerVariables[vid][pCarPos][3] = 177.3687;
					impoundCar = 1;
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "Taken");
				}
			}
		}
	}
	return 1;
}
I'm trying to make it teleport the vehicle into the impound from the trailer of the tow truck but instead nothing is happening.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)