OnPlayerPickUpPickup Help
#1

Please delete
Reply
#2

pawn Код:
new blah;

blah = CreatePickup(..., ..., ..., ..., ...);

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid = blah)
    {
        // Do something
    }
    return 1;
}
Reply
#3

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.
Reply
#4

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
Reply
#5

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?
Reply
#6

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
Reply
#7

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.
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)