SetPlayerAttachedObject with Timer
#1

is there anyway to make a Timer for SetPlayerAttachedObject then it Destroys ?

I Did this :

PHP код:
        GameTextForPlayer(playerid, "~w~You have Bought a Pizza", 5000, 3);
        
SetPlayerAttachedObject( playerid, 0, 1582, 1, -0.064613, 0.520760, 0.000000, 0.000000, 84.217391, 0.000000, 1.000000, 1.000000, 1.000000 );
        
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,6000,1); 
But the Attached Object don't get remove cause there is no timer for it - anyway...How to make a Timer for it ?

And also - How to make the Animation doesn't stop BUT in the same time the player can control his moves ?
Reply
#2

for the object problem:
this below your current code:
pawn Код:
SetTimerEx("MyRemoveFunc", X * 1000, false, "i", playerid); //replace X with the amount of seconds before the object should be removed
and this somewhere out of any callback
pawn Код:
forward MyRemoveFunc(playerid);
public MyRemoveFunc(playerid)
{
  RemovePlayerAttachedObject(playerid, 0);
  return 1;
}
Reply
#3

Delete
Reply
#4

Mhmm , How to use it ? And thanks Sacha - i will try it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)