SA-MP Forums Archive
Pickup Problems - 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: Pickup Problems (/showthread.php?tid=72344)



Pickup Problems - aaronishello - 07.04.2009

I created a few pickups. I get no errors but when I pick them up IG, thats when it all goes wrong.

When I pick up my money I dont get it....

pawn Код:
new Money1;
new Money2;

    Money1 = CreatePickup(1274, 2, -2221.3013,2318.2876,7.5469);
    Money2 = CreatePickup(1274, 2, 2179.6826,1679.2031,11.0469);


    else if (pickupid == Money1)
    {
    GivePlayerMoney(playerid, 500);
    }
   
    else if (pickupid == Money2)
    {
    GivePlayerMoney(playerid, 500);
    }
    return 1;
}
And My AK47 pickup only gives me 80 ammo, it mean to be 150!

pawn Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
    if (pickupid == AK47)
    {
        GivePlayerWeapon(playerid, 30, 150);
    }
Thanks in advance for any help.


Re: Pickup Problems - aaronishello - 08.04.2009




Re: Pickup Problems - basker - 10.04.2009

Hmm i Think Delete The else From The Fist Money Pick up like this

Код:
if (pickupid == Money1)
{
GivePlayerMoney(playerid, 500);
}
And add It under OnPlayerPickupPickup

Hmm That One whit the ammo i cant see whats wong ?

Did you define it like the money pickups ?


Re: Pickup Problems - GTA_Rules - 10.04.2009

Hmmm maybe you use:

GivePlayerWeapon(playerid, 30, 75);
GivePlayerWeapon(playerid, 30, 75);