Pickups
#1

How do I make it so that you can see a pickup icon IG (I would want an info icon) and it says some text above it?
Reply
#2

pawn Код:
//Put this somewhere at the top of your script.
new informationpickup;
 
public OnGameModeInit()
{
    Create3DTextLabel("Information", -1, 0, 0,10, 50, 0, 0);
    informationpickup = CreatePickup(1239, 1, 0, 0, 10, -1);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == informationpickup)
    {
        //Put here what you want this pickup to do.
    }
    return 1;
}
Edit the coordinates, etc, to suit your needs.
Reply
#3

Quote:
Originally Posted by Banana_Ghost
Посмотреть сообщение
pawn Код:
//Put this somewhere at the top of your script.
new informationpickup;
 
public OnGameModeInit()
{
    Create3DTextLabel("Information", -1, 0, 0,10, 50, 0, 0);
    informationpickup = CreatePickup(1239, 1, 0, 0, 10, -1);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == informationpickup)
    {
        //Put here what you want this pickup to do.
    }
    return 1;
}
Edit the coordinates, etc, to suit your needs.
Can you please explain it to me, I don't just want to copy and paste.
Reply
#4

pawn Код:
new pickup; // variable for pickup !
 
public OnGameModeInit()
{
    Create3DTextLabel("Text", -1, X, Y,Z, 50, 0, 20); // This will make a Label with name "Text"
    pickup = CreatePickup(1239, 1, X, Y, Z); // Will create the pickup !
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickup) // if enter in your pickup !
    {
        // Your codes here !
    }
    return 1;
}
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)