Pick-Up Check
#1

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

Refer to this; https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
Reply
#3

EDIT: Yeah, well, it was confusing, follow the link below.
Reply
#4

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)