pickup remove

Started by Cool, Jun 25, 2016, 04:07 AM

Previous topic - Next topic

Cool

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

Finch Real

Just create a pickup on playerdeath and add newtimer of 30sec ifnobody claims it use pickup.Remove();
My Snipet Showroom

http://pastebin.com/5KKuU5cg

KAKAN

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.
oh no

Finch Real

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 )
My Snipet Showroom

http://pastebin.com/5KKuU5cg

KAKAN

#4
Quote from: Finch Real on Jun 25, 2016, 07:29 AM
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 )
you know that you can't pass instances using timers?
:edit: Here's an example for you, @Hercules
local pickup = CreatePickup(...);
NewTimer("remove",1000,1,pickup.ID);
function remove( pID )
{
 local p = FindPickup( pID );
 if( p ) p.Remove(); //or whatever it is.
}
oh no

Xmair

@KAKAN , you did not define "pickup" as a variable.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

KAKAN

Quote from: Xmair on Jun 25, 2016, 07:46 AM@KAKAN , you did not define "pickup" as a variable.
Thanks for telling. Edited.
oh no