Problem with OnPlayerPickUpDynamicPickup
#1

I have a problem with OnPlayerPickUpDynamicPickup

When a player is in a Dynamic PickUp, its show this message

Код:
PlayerTextDrawShow(playerid, td1[playerid]);
		PlayerTextDrawSetString(playerid, td1[playerid], "Here you can type /exam to start.");
The problem is, when he leave the pickup the textdraw doesn't disappear, how can i fix?

Same with OnPlayerPickUpPickup.
Reply
#2

I wrote an include for this very problem.

https://pastebin.com/BCkeqTmd

It uses the SA-MP pickup system however, not the streamer. You just need to change the functions and callbacks to the streamer ones.

Example code:
pawn Код:
new myPickup;

public OnGameModeInit()
{
    myPickup = ELP_CreatePickup(...);
    return 1;
}

public OnEnterLeavePickup(playerid, pickupid, enterleave)
{
    if(pickupid == myPickup)
    {
        if(enterleave)
        {
            // Player entered pickup - show textdraw
        }
        else
        {
            // Player left pickup - destroy textdraw
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)