OnPlayerPickUpPickup Help - 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: OnPlayerPickUpPickup Help (
/showthread.php?tid=79308)
Please delete -
Jakku - 27.05.2009
Please delete
Re: OnPlayerPickUpPickup Help -
SpiderPork - 27.05.2009
pawn Код:
new blah;
blah = CreatePickup(..., ..., ..., ..., ...);
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid = blah)
{
// Do something
}
return 1;
}
Re: OnPlayerPickUpPickup Help -
Weirdosport - 27.05.2009
What he's trying to say is that the pickup ID is not the object you sued, but the value returned when you create the pickup. So you need to save it to a variable as shown.
Re: OnPlayerPickUpPickup Help -
Jakku - 27.05.2009
Quote:
Originally Posted by Weirdosport
What he's trying to say is that the pickup ID is not the object you sued, but the value returned when you create the pickup. So you need to save it to a variable as shown.
|
Pickup, Lol
Re: OnPlayerPickUpPickup Help -
Weirdosport - 27.05.2009
Quote:
Originally Posted by Jakku
Quote:
Originally Posted by Weirdosport
What he's trying to say is that the pickup ID is not the object you sued, but the value returned when you create the pickup. So you need to save it to a variable as shown.
|
Pickup, Lol
|
Errrrr, what?
Re: OnPlayerPickUpPickup Help -
Jakku - 27.05.2009
Quote:
Originally Posted by Weirdosport
Quote:
Originally Posted by Jakku
Quote:
Originally Posted by Weirdosport
What he's trying to say is that the pickup ID is not the object you sued, but the value returned when you create the pickup. So you need to save it to a variable as shown.
|
Pickup, Lol
|
Errrrr, what?
|
IDK what are you talking about..... Give me the right code or then just stop spamming
Re: OnPlayerPickUpPickup Help -
Djiango - 27.05.2009
His not spamming! He's telling you how to do it.
SpiderPork showed you the "code" Weirdosport explained why yours wouldn't work, and what to do.
Re: OnPlayerPickUpPickup Help -
SpiderPork - 27.05.2009
I recommend you read
this.
AddStaticPickup doesn't return the pickup ID. You will have to create pickups with CreatePickup. Put the code under OnPlayerConnect, because AFAIK, CreatePickup doesn't work under OnGameModeInit.