SA-MP Forums Archive
Pick-up - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pick-up (/showthread.php?tid=267879)



Pick-up - romanzi - 10.07.2011

I am made pich-up (weapons),but whan I give pich-up - no bullets.
Код:
AddStaticPickup(351,23,332.2947,-1482.3806,76.5391);



Re: Pick-up - iJumbo - 10.07.2011

try use this https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup


Re: Pick-up - park4bmx - 10.07.2011

like jumbo sad
you will need OnPlayerPickUpPickup

Becouse when you do AddStaticPickup it will just add it and when u go over it
it will not know what to do so thats what OnPlayerPickUpPickup is for

EXAMPLE how to use it
pawn Код:
//have your pickup created
new pickup1;
pickup1 = AddStaticPickup(351,23,332.2947,-1482.3806,76.5391);

//then this is what you need
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickup1)
     {
          GivePlayerWeapon(playerid,GetPlayerWeapon(playerid),400);//Thats is +400 amo
     }
     return 1;
}