Tete omar Posted June 19, 2012 Share Posted June 19, 2012 local thegate = createObject ( 3095, 1125.5, 1285.0999755859, 12.800000190735, 270, 179.87524414063, 179.87524414063 ) local Marker = createMarker ( 1125.9000244141, 1285.0999755859, 9.8000001907349, "cylinder", 6, 255, 0, 0, 255 ) function hitmyelement(hitPlayer) if (hitPlayer == localPlayer) then moveObject ( thegate, 10000, 1125.5, 1285.0999755859, 20.799999237061 ) end end addEventHandler('onMarkerHit', Marker, hitmyelement) function leavedoor(leavePlayer) moveObject ( thegate, 10000, 1125.9000244141, 1285.0999755859, 9.8000001907349 ) end addEventHandler('onMarkerLeave', getRootElement(), leavedoor) if i leaved the marker only move it but when i hit it doesn't move ?? Link to comment
-ffs-Sniper Posted June 19, 2012 Share Posted June 19, 2012 Where is localPlayer declared? Hint: onMarkerHit and onMarkerLeave are available server side only. Link to comment
TAPL Posted June 19, 2012 Share Posted June 19, 2012 local thegate = createObject(3095, 1125.5, 1285.0999755859, 12.800000190735, 270, 179.87524414063, 179.87524414063) local Marker = createMarker(1125.9000244141, 1285.0999755859, 9.8000001907349, "cylinder", 6, 255, 0, 0, 255) function hitmyelement(hitPlayer) moveObject(thegate, 10000, 1125.5, 1285.0999755859, 20.799999237061) end addEventHandler('onMarkerHit', Marker, hitmyelement) function leavedoor(leavePlayer) moveObject(thegate, 10000, 1125.9000244141, 1285.0999755859, 9.8000001907349) end addEventHandler('onMarkerLeave', Marker, leavedoor) Link to comment
-ffs-Sniper Posted June 19, 2012 Share Posted June 19, 2012 (edited) @TAPL: That does not necessarily do what teteomar wants to. @teteomar: Is this script supposed to be client or server side? Edited June 19, 2012 by Guest Link to comment
TAPL Posted June 19, 2012 Share Posted June 19, 2012 This was simple script and it's server side, making it client side it may not synced anyway. 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