10-11-2015, 10:41 PM
Ti sei dimenticato tutti gli "end" alla fine degli if. Se non conosci il LUA, ti consiglio di spulciare la documentazione ufficiale.
Prova cosi:
Prova cosi:
Codice:
function libro_init(e)
LoadImages("cartella",0)
end
function libro_main(e)
if GetPlayerDistance(e) < 50 then
SetImagePosition(50,50)
ShowImage(0) //pagina 1
PromptTextSize(5)
Prompt ("Premi E per sfogliarlo" )
end
if g_KeyPressE == 1 then //pagina 2
ShowImage(1)
end
if g_KeyPressE == 1 then //pagina 3
ShowImage(2)
end
if g_KeyPressE == 1 then //pagina 4
ShowImage(3)
end
if g_KeyPressE == 1 then //pagina 5
ShowImage(4)
else
HideImage(i)
end
end