Posts: 87
Threads: 34
Joined: Sep 2013
Reputation:
0
How can you pick up an object? I made a command where you spawn a crate, and I'm trying to figure out how to pick it up and walk around with it with a proper animation.
Posts: 1,168
Threads: 60
Joined: Dec 2016
Reputation:
0
You could do it like this:
When you drop/spawn the object, add it in a variable.
e.g. Item[i] = CreateDynamicObject(objectid, X, Y, Z,0,0,0, world);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0, 1,0,0,1,1,1);
SetPlayerAttachedObject(playerid, 2, objectid,3,0.13,-0.32,-0.26,0.0,0.0,0.0,1.00,1.00,1.00);
DestroyDynamicObject(Item[i]);