Update Pickup Problem - 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: Update Pickup Problem (
/showthread.php?tid=541528)
Update Pickup Problem -
VivianKris - 12.10.2014
Hi guys, just get a problem.
Код:
new pickup;
pickup = CreatePickup(.....);
DestroyPickup(pickup);
pickup = CreatePickup(.....);
will creat two pickup.....
how to fix it?
I guess the problem is that CreatePickup is fater than DetroyPickup, like Kick faster than others.
Re: Update Pickup Problem -
MasonSFW - 12.10.2014
pawn Код:
new pickup[3]; // Max pick = 3
pickup[0] = CreatePickup(.....); // 1
DestroyPickup(pickup);
pickup[1] = CreatePickup(.....); // 2
DestroyPickup(pickup[1]);
pickup[2] = CreatePickup(.....); // 3
DestroyPickup(pickup[2]);
You can make more if you want 10 pickup:
pawn Код:
new pickup[10]; // Max 10 pickup
Re: Update Pickup Problem -
Abagail - 12.10.2014
Use a timer then. For example using your code,
pawn Код:
new pickup;
pickup = CreatePickup(.....);
DestroyPickup(pickup);
SetTimerEx("ReloadPickup", 2500, false, "d", pickup);
You'd need to also store the pickup information though to replicate it. See,
wiki.sa-mp.com/wiki/createpickup
Re: Update Pickup Problem -
VivianKris - 12.10.2014
OH!!! Nice.
Thank you .
Re: Update Pickup Problem -
VivianKris - 12.10.2014
No effect....