Help Create Pickup ...
#1

hey ... can i know .. how can i make like this ?? if i get the pickup ... gametext will out ...

>>>>>

Reply
#2

On top add
pawn Code:
new police;//Pickup Id
Create Pickup
pawn Code:
public OnGameModeInit()
{
    police = CreatePickup(id,1,x,y,z,-1);//Replace id, x,y,z with id of pickup and it's location
    return 1;
}
Show GameText
pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == police)
    {
    //Show Gametext here
    }
    return 1;
}
Usefull Links :
https://sampwiki.blast.hk/wiki/CreatePickup How to create a pickup
https://sampwiki.blast.hk/wiki/PickupTypes Types of Pickup
https://sampwiki.blast.hk/wiki/Game_Object_ID_List Object ID's
https://sampwiki.blast.hk/wiki/GameTextForPlayer Game Text

I think it would be better to use textdraw instead of GameText
Reply
#3

oh .. ty very much man ...
Reply
#4

I would suggest putting all of your pickups inside an array, for example:

pawn Code:
new policepickup[10];
When you create the pickup you do the same except:

pawn Code:
public OnGameModeInit()
{
    policepickup[1] = CreatePickup(id,1,x,y,z,-1);//Replace id, x,y,z with id of pickup and it's location
    return 1;
}
That way, you can save yourself a lot of code when you do this:

pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    switch(policepickup[])
    {
        case 0:
        {
            //
        }
        case 1:
        {
            //
        }
        case 2:
        {
            //
        }
    }
    return 1;
}
Just saves space, time, effort and processing power when you are using multiple pickups.
Reply


Forum Jump:


Users browsing this thread: