-- Assign this script for a collectable objective to show up on the radar. -- This script will hide the entity once the objective is completed and also remove it from the radar. -- Created by perelect. 07/12/2015 haveAddedObjective = {} function collectable_objective_init(e) haveAddedObjective[e] = 0 end function collectable_objective_main(e) if haveAddedObjective[e] == 0 then addObjective(e) haveAddedObjective[e] = 1 end PlayerDist = GetPlayerDistance(e) if PlayerDist < 100 and g_Entity[e]['collected'] == 0 then Prompt("Press E to complete the objective") if g_KeyPressE == 1 then PromptDuration("Objective completed",2000) PlaySound(e,0) Collected(e) ActivateIfUsed(e) CollisionOff(e) Hide(e) if GetTimer(e) > GetTimer(e) + 2000 then Destroy(e) end end end end