OnPlayerPickupDynamicPickup help
#1

Hello all

Umm i got lil problem. So far i have this code which works (opens the textdraw when i reach the pdenter pickup)

pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == pdenter)
    {
        TextDrawShowForPlayer(playerid, Textdraw0);
    }
  }
However, i would like to close the textdraw automatically when player leaves far enough from the pickup. I guess this should be done somehow with IsPlayerInRangeOfPoint & TextDrawHideForPlayer? Tried already some ways to fix, however the textdraw keeps staying on the window.
Reply
#2

You need a thing like OnPlayerLeaveDynamicPickup, so you Goto your on OnPlayerPickUpDynamicPickup set a repetitive timer for and check if(!IsPlayerInRangeOfPoint(playerid)).
Reply
#3

Thanks alot for your help m8, got it working now , Rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)