SA-MP Forums Archive
Need Help With a Pickup issue ..Pls.. - 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: Need Help With a Pickup issue ..Pls.. (/showthread.php?tid=379310)



Need Help With a Pickup issue ..Pls.. - JJohnson1 - 21.09.2012

I was wondering if somebody might help me with how to add the "bribe" star pickups on my server like they are in single-player?I have tried a couple of methods(from tutorials) but unsuccessfully. Is there a FS for this?? Any help on this would most appreciated guys. Thanx in advance...


Re: Need Help With a Pickup issue ..Pls.. - Babul - 21.09.2012

this might help you, i used the bribestar below the roads...
http://forum.sa-mp.com/showthread.ph...ighlight=droll


Re: Need Help With a Pickup issue ..Pls.. - JJohnson1 - 21.09.2012

Was able to create bribe star however it is not pickup-able any thoughts anyone?

Quote:

new pickup;

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);

pickup = CreatePickup(1247, 23, 2096.569091, 1286.821655, 10.820312 -1);
return 1;



}




Re: Need Help With a Pickup issue ..Pls.. - Red_Dragon. - 21.09.2012

Look in the filterscripts section for a PICKUP CREATOR you will find many that can help you


Re: Need Help With a Pickup issue ..Pls.. - JJohnson1 - 22.09.2012

Thanx for the reply Red_Dragon.Problem is not the making of the pickup now but when i enter it ,it does nothing .I have a couple PickupCreator scripts but I must be missing something when i add the code that they give into my script.I'll keep playing 'round with it.If anyone else wants to chime in pls do so ...Thanx again.


Re: Need Help With a Pickup issue ..Pls.. - clarencecuzz - 22.09.2012

Read this:
https://sampwiki.blast.hk/wiki/PickupTypes

And it works with this:
https://sampwiki.blast.hk/wiki/CreatePickup

This code will help you.

pawn Code:
new pickup; //Define our Pickup name/ID

public OnGameModeInit()
{
    pickup = CreatePickup(1247, 2, 2096.569091, 1286.821655, 10.820312 -1); //Create our Pickup called 'pickup'
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickup) //If they have picked up our 'pickup' Pickup.
    {
        //Your code here - Put what you want to happen when they pick up your pickup here.
    }
    return 1; //They picked up a pickup.
}



Re: Need Help With a Pickup issue ..Pls.. - JJohnson1 - 22.09.2012

Ty clarencecuzz for the reply. I will give that a try


Re: Need Help With a Pickup issue ..Pls.. - Babul - 22.09.2012

ah, maybe its of interest for you: as long you use the bribe star (id 1247), you WILL be able to pick it up in any vehicle (didnt test all, but a fistful pickup types), i used it accidently for my PD interior entrance, and found myself spawn inside after pressing the "enter" key - what a rare coincidence - instead of need to be on foot, it worked in a car! give it a try


Re: Need Help With a Pickup issue ..Pls.. - JJohnson1 - 22.09.2012

Thanx Babul thats good to know.Im just working on the OnPlayerPickUpPickup(playerid, pickupid) part now when im wanted it works however instead of counting down from say 5 stars to 4 when i pass through a ster it makes me from 5 to 0 ??Obviously I'm a newbie to this but do ii need something besides GetPlayerWantedLevel()
& SetPlayerWantedLevel() under OnPlayerPickUpPickup ?/


Re: Need Help With a Pickup issue ..Pls.. - XtremeR - 22.09.2012

See my Signature and get the Pickup maker in game its easy to use..