how to remove pickup of wepons after death which came i want to remove it after 30secs please will you guys help me please explain in detail i read old topic but didnt understand
Just create a pickup on playerdeath and add newtimer of 30sec ifnobody claims it use pickup.Remove();
Well, use a timer, find the pickup and then remove it.
off:
Quote from: Finch Real on Jun 25, 2016, 06:39 AMJust create a pickup on playerdeath and add newtimer of 30sec ifnobody claims it use pickup.Remove();
he will get a new error: The index 'pickup' doesn't exist.
Quote from: KAKAN on Jun 25, 2016, 07:04 AMWell, use a timer, find the pickup and then remove it.
off:
Quote from: Finch Real on Jun 25, 2016, 06:39 AMJust create a pickup on playerdeath and add newtimer of 30sec ifnobody claims it use pickup.Remove();
he will get a new error: The index 'pickup' doesn't exist.
I think no
Function remover( pickup )
Quote from: Finch Real on Jun 25, 2016, 07:29 AMQuote from: KAKAN on Jun 25, 2016, 07:04 AMWell, use a timer, find the pickup and then remove it.
off:
Quote from: Finch Real on Jun 25, 2016, 06:39 AMJust create a pickup on playerdeath and add newtimer of 30sec ifnobody claims it use pickup.Remove();
he will get a new error: The index 'pickup' doesn't exist.
I think no
Function remover( pickup )
you know that you can't pass instances using timers?
:edit: Here's an example for you,
@Herculeslocal pickup = CreatePickup(...);
NewTimer("remove",1000,1,pickup.ID);
function remove( pID )
{
local p = FindPickup( pID );
if( p ) p.Remove(); //or whatever it is.
}
@KAKAN , you did not define "pickup" as a variable.
Quote from: Xmair on Jun 25, 2016, 07:46 AM@KAKAN , you did not define "pickup" as a variable.
Thanks for telling. Edited.