SA-MP Forums Archive
How make with time gone pickup - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How make with time gone pickup (/showthread.php?tid=630615)



How make with time gone pickup - Pokemon64 - 16.03.2017

Hi i have variable of pickup it called
Код:
meatDrops
How need make it destroy if passed 20 seconds?


Re: How make with time gone pickup - lackmail - 16.03.2017

set a 20 second timer when you create the pickup

Код:
SetTimer("Destroypickup", 20000, false) //creating 20 second timer 


forward Destroypickup();
public Destroypickup()
{
    DestroyPickup(meatDrops); // destroying pickup after 20 second
}



Re: How make with time gone pickup - Pokemon64 - 16.03.2017

Quote:
Originally Posted by lackmail
Посмотреть сообщение
set a 20 second timer when you create the pickup

Код:
SetTimer("Destroypickup", 20000, false) //creating 20 second timer 


forward Destroypickup();
public Destroypickup()
{
    DestroyPickup(meatDrops); // destroying pickup after 20 second
}
error 035: argument type mismatch (argument 1)
Line
DestroyPickup(meatDrops); // destroying pickup after 20 second


Re: How make with time gone pickup - lackmail - 16.03.2017

Код:
new meatDrops;
not

Код:
new meatDrops[128];



Re: How make with time gone pickup - Pokemon64 - 16.03.2017

Quote:
Originally Posted by lackmail
Посмотреть сообщение
Код:
new meatDrops;
not

Код:
new meatDrops[128];
Well thanks fixed problem bat i use
Код:
forward Destroypickup(playerid);
public Destroypickup(playerid)
{
    DestroyPickup(meatDrops[playerid]); // destroying pickup after 20 second
}