public void Check() { if (EventAction != null && PickupProp != null && Math.Sqrt(Game.PlayerPed.Position.DistanceToSquared(PickupProp.Position)) < 1.5) { EventAction.Draw(); if (EventAction.CheckPickupControl(NetHandle) && DeleteOnAction) { Delete(); } } }
public bool Check() { if (EventAction != null && Exist && Math.Sqrt(Game.PlayerPed.Position.DistanceToSquared(API.GetEntityCoords(PickupProp, false))) < 1.5) { EventAction.Draw(); if (EventAction.CheckPickupControl(NetHandle) && DeleteOnAction) { Delete(); } return(true); } return(false); }