this script will create always new pickup when eny script start.
use this to fix it:
local resroot = getResourceRootElement(getThisResource())
local root = getRootElement()
addEventHandler("onResourceStart", resroot,
function()
a = createPickup (-707, 973, 12, 0, 0, 0)
end
)
addEventHandler("onPickupUse", root,
function( thePlayer )
if (source == a) then
local health = getElementHealth(thePlayer)
if (health >=5 and health <= 100) then
local money = getPlayerMoney(thePlayer)
if (money >= 100) then
takePlayerMoney(thePlayer, 100)
setElementHealth ( thePlayer, 100 )
outputChatBox("* A hot nurse gave you a nice healing process!", thePlayer)
else
outputChatBox("* You dont have enough money!", thePlayer )
end
else
outputChatBox("*You are healhty enough to be alife", thePlayer)
end
end
end
)