Problem with car size (Vehicle Object)
#1

I'm trying to script something but I've face this problem, I have vehicle plus include for these makes, the problem is fX, fY, fZ being called every time even though the object is not overflow so I'm seeking around if someone may help me to solve this or give me some suggestions.

I have another question, is there any way to use 3D editor by scripting, instead of using a include?

Код:
CMD:bget(playerid, params[])
{
	if(!IsPlayerInAnyVehicle(playerid)) return 1;
    SetVehicleParamsEx(GetPlayerVehicleID(playerid),0,0,vAlarm,vDoors,vBonnet,vBoot,vObjective);
    
        vehicleobj[GetPlayerVehicleID(playerid)] = CreateObject(355, 0, 0, -1000, 0, 0, 0);
	EditVehicleObject(playerid, GetPlayerVehicleID(playerid), vehicleobj[GetPlayerVehicleID(playerid)]);
	return 1;
}

Код:
public OnPlayerEditVehicleObject(playerid, vehicleid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
	if(response == 2)
	{
		new Float:testPos[3];
		GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_SIZE, testPos[0], testPos[1], testPos[2]);

		if(fX>testPos[0])
		{
		    SendClientMessage(playerid, -1, "Object is out of X");
		}
		if(fY > testPos[1])
		{
		    SendClientMessage(playerid, -1, "Object is out of Y");
		}
		if(fZ > testPos[2])
		{
		    SendClientMessage(playerid, -1, "Object is out of Z");
		}
	}
	if(response == 1)
	{

	}
	else
	{

	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)