Pick-Up Check - 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: Pick-Up Check (
/showthread.php?tid=398334)
Pick-Up Check -
nicholas1 - 09.12.2012
Did I do this correctly?
new cash;
new pickup; // Create a variable to store the pickup ID in
public OnGameModeInit()
{
cash = CreatePickup(1212, 2, 0.0, 0.0, 9.0);
pickup = CreatePickup(1242, 3, 1503.3359, 1432.3585, 10.1191, -1);
// Create an armor pickup and store the ID in 'pickup'
// Later..
DestroyPickup(pickup); // Example of using the pickup ID
Also,check this please
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == cash) GivePlayerMoney(playerid,10000);
return 1;
}
I got no errors.But,what I want is when player die the armor and cash both pop up.That what I was trying to get.
So,if ya tested this and tried it and no money or armor pop-up.Please fix this for me.
Re: Pick-Up Check - Guest9328472398472 - 09.12.2012
Refer to this;
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
Re: Pick-Up Check -
RajatPawar - 09.12.2012
EDIT: Yeah, well, it was confusing, follow the link below.
Re: Pick-Up Check - Guest9328472398472 - 09.12.2012
Quote:
Originally Posted by Rajat_Pawar
So you want it for people, for indivisual people? Like, one person dies, and he comes there, and sees both pickups and another person who picked the pickups shouldn't see them, right? If yes, make the pickup[MAX_PLAYERS] and OnPlayerPickUpPickup destroy them, and OnPlayerDeath, pickup[playerid] = CreatePickup again.
|
It looks as if your confusing him (you confused me)
OT: View this document,
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup - it tells you exactly what needs to be done.
Re: Pick-Up Check -
nicholas1 - 09.12.2012
Quote:
Originally Posted by Rajat_Pawar
So you want it for people, for indivisual people? Like, one person dies, and he comes there, and sees both pickups and another person who picked the pickups shouldn't see them, right? If yes, make the pickup[MAX_PLAYERS] and OnPlayerPickUpPickup destroy them, and OnPlayerDeath, pickup[playerid] = CreatePickup again.
|
Can you post it here for I can see where to put at?
Like an example.
Re: Pick-Up Check - Guest9328472398472 - 09.12.2012
pawn Код:
new cash;
public OnGameModeInit()
{
cash = CreatePickup(1274, 2, 0.0, 0.0, 9.0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == cash) GivePlayerMoney(playerid,10000);
return 1;
}
Simple.