[Help] How to get offset for AttachObjectToPlayer
#1

I have a submarine object. I made a code to drive the submarine by using a boat, and the object. Its like this.

Код:
Sub4 = CreateObject(9958, -1268.290894, 424.869446, 6.485734, 0.0000, 0.0000, 86.5623);

------------------------

	if(strcmp(cmdtext, "/sail1", true) == 0)
    {
        if(Sailing[playerid] == true) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You are already in the sub!");
      if(ShipTaken == 1) return SendClientMessage(playerid, COLOR_BRIGHTRED, "Someone else is already in the sub!");
        Sailing[playerid] = true;
        ShipTaken = 1;
        SailBoat[playerid] = CreateVehicle(430, -1324.9653,427.6149,-0.3219, 271.2040, 0, 0, 15000);
      LinkVehicleToInterior(SailBoat[playerid], 10);
      PutPlayerInVehicle(playerid, SailBoat[playerid], 0);
        AttachObjectToPlayer(Sub4, playerid, 10.0, 15.0, -0.87, 5.0, 5.0, 10.0);
        return 1;
    }

Код:
It works but the offset is messed up. The sub isnt straight with the boat. 
My question: How do you find the offset of the object?
Reply
#2

Help please!
Reply
#3

You have to do it manually, i suggest you to make /offsetx, /offsety and /offsetz (or /offset x y z) commands, if you know what i mean.
Reply
#4

Where can i get those commands, cause i dont know how to make them xD
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)