Command bug.
#1

Fixed it only issue now if the object offset i need to on the players arms. when Carrying.

Код:
CMD:getcrate(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 8.0, 2208.4307, -2292.6611, 14.0459))
	{
		new JobObject;
		SendClientMessage(playerid, COLOR_GRAD1, "You have picked up a crate load it on to the truck.");
		JobObject = CreateObject(2969, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
		AttachObjectToPlayer(JobObject, playerid, 0.0, 0.0, 0.0, 0.0, 1.7, 0);
		SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
		ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
	}
	else
	{
		SendClientMessage(playerid, COLOR_GRAD1,"ERROR: You are not near the crate zone!");
	}
	return 1;
}
Reply
#2

I'm not sure if you would want to use AttachObjectToPlayer, instead try this:https://sampwiki.blast.hk/wiki/SetPlayerAttachedObject

And a small tutorial on how to use it:
https://sampforum.blast.hk/showthread.php?tid=281448
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)