function fooditem3_init(e)
end
function fooditem3_main(e)
PlayerDX = g_Entity[e]['x'] - g_PlayerPosX;
PlayerDY = g_Entity[e]['y'] - g_PlayerPosY;
PlayerDZ = g_Entity[e]['z'] - g_PlayerPosZ;
PlayerDist = math.sqrt(math.abs(PlayerDX*PlayerDX)+math.abs(PlayerDY*PlayerDY)+math.abs(PlayerDZ*PlayerDZ));
if PlayerDist < 80 then
Prompt("Purple Herb = " .. fooditem3 .. " , press E to collect , charexp = " .. charexp)
if g_KeyPressE == 1 and pressed == 0 then
PlaySound(e,1);
fooditem3 = fooditem3 + 1
charexp = charexp + 10
pressed = 1
Destroy(e);
end
if g_KeyPressE == 0 then
pressed = 0
end
end
end
------Dead of Night----- Open World Zombie Horror!!
Youtube/ShakyShawn8151 > 10k Subs Celebration