14.02.2014, 05:53
pawn Код:
public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
new Float:x1,Float:y1,Float:z1;
GetVehiclePos(lastveh[playerid],x1, y1, z1);
new Float:vx = x - x1;
new Float:vy = y - y1;
new Float:vz = z - z1;
if(response == 1)
{
if(vInSlot[playerid][0] == 1)
{
AttachDynamicObjectToVehicle(vObj[playerid][0], lastveh[playerid], vx, vy, vz, rx,ry,rz);
vSlots[playerid][0] = 1;
printf("%f, %f, %f", vx,vy,vz);
}
}
return 1;
}