Why ClearAnimations and RemovePlayerAttachedObject don't work?
#1

Here I attached the object
Код:
  		if(NaPos(playerid, 2.0, -368.7406,-1412.4456,25.7266))
		{
 			if(PlayerInfo[playerid][pRabota] == 10)
   			{
				imagajba[playerid] = 1;
   				SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
				ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
				SetPlayerAttachedObject(playerid, 0, 1355, 1, 0.162864, 0.403240, -0.008182, 5.772127, 89.982292, 356.481140, 1.000000, 1.000000, 1.000000); // CJ_FRUITCRATE1 - gajba
				SendClientMessage(playerid, -1, "{00FFFF}(DWIG){FF5300}Zedovte gajba.Odete berete jabolka");
			}
		}
Here I wan't to deattach object and stop animation but don't working
Код:
		if(NaPos(playerid, 2.0, -364.3782,-1412.7043,25.7266))
		{
 			if(PlayerInfo[playerid][pRabota] == 10)
   			{
				new zarabotka = jabulki[playerid]*200;
   				SCMF(playerid, -1, "{00FFFF}(DWIG){FF5300}Prodadovte %d parcinja jabolka za %d$.", jabulki[playerid], zarabotka);
				SendClientMessage(playerid, -1, "{00FFFF}(DWIG){FF5300}1 parce jabolka 200$");
				imagajba[playerid] = 0;
				ClearAnimations(playerid);
				RemovePlayerAttachedObject(playerid, 1);
			}
		}
Reply
#2

Код:
SetPlayerAttachedObject(playerid, 0
In this code, the "index" is 0.

Код:
RemovePlayerAttachedObject(playerid, 1);
In this code the "index" is 1, they're not the same that's why it isn't removing it.
Reply
#3

Thanks for this but can I stop the animation SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
with SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)