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"50003);
        
SetPlayerAttachedObjectplayerid015821, -0.0646130.5207600.0000000.00000084.2173910.0000001.0000001.0000001.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)