How to convert house pickups to checkpoints (Only be seen if player is near checkpoint)
#1

Look, so I want to convert pickups to checkpoints only for houses. I know I can do that easily. But the problem is how to make them appear only when player is NEAR THE checkpoint..
Well here's my code under OnGameModeInit right now
pawn Код:
//^^OnGameModeInit shitt :P
    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
        if(HouseInfo[h][hOwned] == 0)
        {
            Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75,20.0,0,1);
            HouseInfo[h][hPickupID]=CreatePickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
            pickups++;
        }
        if(HouseInfo[h][hOwned] == 1)
        {
            Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75,20.0,0,1);
            HouseInfo[h][hPickupID]=CreatePickup(1239, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
            pickups++;
        }
    }
Um well also.. Should I put the checkpoint in OnPlayerUpdate or what..
Reply
#2

Same problem. Red checkpoints on house stand porch.
Reply
#3

If you're not using incognoto's streamer, you might want to start using it.
It's pretty simple, just replace CreatePickup with CreateDynamicCP:
pawn Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
    {
        if(HouseInfo[h][hOwned] == 0)
        {
            Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75,20.0,0,1);
        }
        if(HouseInfo[h][hOwned] == 1)
        {
            Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75,20.0,0,1);
        }
        HouseInfo[h][hPickupID]=CreateDynamicCP(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 2, -1, -1,-1, 10);
        pickups++;
    }
You might want to edit checkpoint's stream distance( last parameter )

Incognoto's streamer(Clicky)
Reply
#4

Orale, thank you! But what about that, if i stay at the front porch of the house and checkpoint doesen't dissapear? How i can make that?
Reply
#5

Quote:
Originally Posted by FinestCalis
Посмотреть сообщение
Orale, thank you! But what about that, if i stay at the front porch of the house and checkpoint doesen't dissapear? How i can make that?
What do you mean? Increase/decrease checkpoint's streaming distance?
Reply
#6

Nah, right now It's like umm.. if you step on the checkpoint it will dissapear, but how i can make that if you step in that checkpoint, then you can see it. ( if you stand on the checkpoint, then you can see it too. )
Reply
#7

Show me your OnPlayerEnterCheckpoint callback.
Reply
#8

Here comes me!
Well I made it to appear on house doors But I got the same problem as @FinestCalis..
My code - http://pastebin.com/1NpBMSZL
Reply
#9

Remove your OnPlayerEnterDynamicCheckpoint callback and remove OnPlayerEnterCheckpoint Callback. Then try
Reply
#10

I cannot remove the OnPlayerEnterCheckpoint(default sa-mp one) Because it will get my whole script bugged off.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)