sckatchof Posted January 22, 2012 Share Posted January 22, 2012 hello all why this script dont work ! and thankdor help local Marcklbara = createMarker(1367.8377685547, -1279.7449951172, 14.446875, 'arrow', 1.5, 255, 255, 0, 150) local Marcklde5el = createMarker(285.8000, -86.5470, 1002.6390, 'arrow', 1.5, 255, 255, 0, 150) setElementInterior(Marcklde5el, 4) function Entrer(hitPlayer, matchingDimension) local tns = getLocalPlayer() if not (hitElement == tns) then return end fadeCamera(false) setElementInterior(hitPlayer, 4, 287.8000, -84.5470, 1001.5390) end ) addEventHandler("onMarkerHit", Marcklbara, Entrer) function Sortie(hitPlayer, matchingDimension) local tns = getLocalPlayer() if not (hitElement == tns) then return end fadeCamera(false) setElementInterior(hitPlayer,0,1363.8331298828,-1280.0424804688,13.546875) end ) addEventHandler("onMarkerHit", Marcklde5el, Sortie) Link to comment
Kenix Posted January 22, 2012 Share Posted January 22, 2012 (edited) Server local Marcklbara = createMarker( 1367.8377685547, -1279.7449951172, 14.446875, 'arrow', 1.5, 255, 255, 0, 150 ) local Marcklde5el = createMarker( 285.8000, -86.5470, 1002.6390, 'arrow', 1.5, 255, 255, 0, 150 ) setElementInterior( Marcklde5el, 4 ) function Entrer( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then fadeCamera( hitElement,false ) setElementInterior( hitElement, 4, 287.8000, -84.5470, 1001.5390 ) end end addEventHandler( "onMarkerHit", Marcklbara, Entrer ) function Sortie( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then fadeCamera( hitElement,false ) setElementInterior( hitElement,0,1363.8331298828,-1280.0424804688,13.546875 ) end end addEventHandler( "onMarkerHit", Marcklde5el, Sortie ) https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/manual/5.1/ Learn it. P.S Tabulate code in next time. P.S I update code. Edited January 22, 2012 by Guest Link to comment
sckatchof Posted January 22, 2012 Author Share Posted January 22, 2012 Server local Marcklbara = createMarker( 1367.8377685547, -1279.7449951172, 14.446875, 'arrow', 1.5, 255, 255, 0, 150 ) local Marcklde5el = createMarker( 285.8000, -86.5470, 1002.6390, 'arrow', 1.5, 255, 255, 0, 150 ) setElementInterior( Marcklde5el, 4 ) function Entrer( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then fadeCamera( hitElement,false ) setElementInterior( hitElement, 4, 287.8000, -84.5470, 1001.5390 ) end end addEventHandler( "onMarkerHit", Marcklbara, Entrer ) function Sortie( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then fadeCamera( hitElement,false ) setElementInterior( hitElement,0,1363.8331298828,-1280.0424804688,13.546875 ) end end addEventHandler( "onMarkerHit", Marcklde5el, Sortie ) https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/manual/5.1/ Learn it. P.S Tabulate code in next time. P.S I update code. thanx for help but ,it stays black screen when i enter WARING :TNS/server.lua:8: Bad argument @'setElementInterior' Link to comment
Kenix Posted January 22, 2012 Share Posted January 22, 2012 Because you create it in code. fadeCamera( hitElement,false ) Learn please https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/manual/5.1/ WARING :TNS/server.lua:8: Bad argument @'setElementInterior' It should work,you create error maybe. Link to comment
sckatchof Posted January 22, 2012 Author Share Posted January 22, 2012 Because you create it in code. fadeCamera( hitElement,false ) Learn please https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/manual/5.1/ WARING :TNS/server.lua:8: Bad argument @'setElementInterior' It should work,you create error maybe. Im new in scripting but how to fix it ? Link to comment
Kenix Posted January 22, 2012 Share Posted January 22, 2012 You not know what you creating. Read please https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/manual/5.1/ And learn local Marcklbara = createMarker( 1367.8377685547, -1279.7449951172, 14.446875, 'arrow', 1.5, 255, 255, 0, 150 ) local Marcklde5el = createMarker( 285.8000, -86.5470, 1002.6390, 'arrow', 1.5, 255, 255, 0, 150 ) setElementInterior( Marcklde5el, 4 ) function Entrer( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then ---fadeCamera( hitElement,false ) -- idk why you create it setElementInterior( hitElement, 4, 287.8000, -84.5470, 1001.5390 ) end end addEventHandler( "onMarkerHit", Marcklbara, Entrer ) function Sortie( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then --fadeCamera( hitElement,false ) -- idk why you create it setElementInterior( hitElement,0,1363.8331298828,-1280.0424804688,13.546875 ) end end addEventHandler( "onMarkerHit", Marcklde5el, Sortie ) P.S I tested it now. Link to comment
sckatchof Posted January 22, 2012 Author Share Posted January 22, 2012 You not know what you creating.Read please https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/manual/5.1/ And learn local Marcklbara = createMarker( 1367.8377685547, -1279.7449951172, 14.446875, 'arrow', 1.5, 255, 255, 0, 150 ) local Marcklde5el = createMarker( 285.8000, -86.5470, 1002.6390, 'arrow', 1.5, 255, 255, 0, 150 ) setElementInterior( Marcklde5el, 4 ) function Entrer( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then ---fadeCamera( hitElement,false ) -- idk why you create it setElementInterior( hitElement, 4, 287.8000, -84.5470, 1001.5390 ) end end addEventHandler( "onMarkerHit", Marcklbara, Entrer ) function Sortie( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then --fadeCamera( hitElement,false ) -- idk why you create it setElementInterior( hitElement,0,1363.8331298828,-1280.0424804688,13.546875 ) end end addEventHandler( "onMarkerHit", Marcklde5el, Sortie ) P.S I tested it now. thanks its work and this for this You not know what you creating.Read please https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/manual/5.1/ And learn Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now