SA-MP Forums Archive
Problem about pickups - 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: Problem about pickups (/showthread.php?tid=353819)



Problem about pickups - Nightmare[TR] - 24.06.2012

Hi guys,i integrated a farm system into my gamemode.But there is a problem.
pawn Код:
Farms[f][farmPickup] = CreatePickup(1239, 1, Farms[f][farmPos][0], Farms[f][farmPos][1], Farms[f][farmPos][2], 0);
This is farm's pickup code.Pickup type is 1,it's unpickupable.But when i go to it,i can pickup it :S
Is there a solution for this?


Re: Problem about pickups - Nightmare[TR] - 25.06.2012

Bump.


Re: Problem about pickups - JonnyDeadly - 25.06.2012

That should work. I'm not sure what the problem is. Do you get any warnings?


Re: Problem about pickups - Nightmare[TR] - 25.06.2012

Quote:
Originally Posted by JonnyDeadly
Посмотреть сообщение
That should work. I'm not sure what the problem is. Do you get any warnings?
Nope.But i saw this on sa-mp wiki.
(https://sampwiki.blast.hk/wiki/CreatePickup)

Note: While you will get a OnPlayerPickUpPickup triggered when a player picks up a pickup, keep in mind that several players can pick up same pickup, or that a player can pick up a pickup without the pickup being removed on all clients, if you want to reliably detect weapon pickups, you should use weapon type 1, and manually give weapons and destroy them when they are picked up. Don't forget to handle cases where several players pick up same pickup id aswell.

And i destroyed and recreated pickup after onplayerpickuppickup.