SA-MP Forums Archive
Pickups - 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: Pickups (/showthread.php?tid=544920)



Pickups - mkmk - 04.11.2014

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?


Re: Pickups - Banana_Ghost - 05.11.2014

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.


Re: Pickups - mkmk - 05.11.2014

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.


Re: Pickups - HY - 05.11.2014

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