z24d Posted August 3, 2015 Share Posted August 3, 2015 السلام عليكم ورحمة الله وبركاتة هذا الكود اذا جا عند الماركر وماهو كونسل مايفتح واذا طلع من الماركر يكتب بالشات الكونسل طلع من الماركر ! وش الغلط طيب ؟ local x1, y1, z1 = 1275.3000488281 , -783.79998779297 , 1091.6999511719 local x2, y2, z2 = 1282.4000244141 , -784.5 , 1091.6999511719 , 0 , 0 , 100 local TheMarker = createMarker ( 1455.8000488281, 2773.3999023438, 11.800000190735, "arrow", 1.2, 255, 255, 0, 150 ) local newmarker = createMarker ( 1260.6999511719, -785.40002441406, 1092.8270263672, "arrow", 1.2, 254, 120, 0, 150 ) local gatemarker = createMarker ( 1282.47302, -783.39587, 1089.93750 ,"corona", 1.2, 254, 120, 0, 0 ) local myObjects = createObject ( 980, 1283.1999511719, -783.79998779297, 1091.6999511719 ) setElementDimension ( gatemarker, 20 ) setElementInterior ( gatemarker , 5 ) setElementDimension ( myObjects, 20 ) setElementInterior ( myObjects , 5 ) setElementDimension ( newmarker, 20 ) setElementInterior ( newmarker , 5 ) addEventHandler ( "onMarkerHit", resourceRoot, function ( player ) if ( getPlayerAccount ( player ) and not isGuestAccount ( getPlayerAccount ( player ) ) ) then if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup( "Console" ) ) ) then removeEventHandler ( "onMarkerLeave", root, markergo ) return exports ["guimessages"] : outputServer (player, "*Your Not Console !!" , math.random(255), math.random(255), math.random(255)) end if ( getElementType ( player ) == "player" ) then if ( isPedInVehicle ( player ) ) then return end if ( source == TheMarker ) then setElementDimension ( player, 20 ) setElementInterior ( player, 5, 1263.53699, -785.45905 ,1091.90625 ) outputChatBox ( "* Welcome To Home Console", player, 255, 0, 0, true ) elseif ( source == newmarker ) then setElementPosition ( player, 1456.13135 ,2773.33740 ,11.68110 ) setElementInterior ( player, 0 ) setElementDimension ( player, 0 ) outputChatBox ( "*Console Is Out the House !!", player, 255, 0, 0, true ) elseif ( source == gatemarker ) then outputChatBox( "*Console Has Been Opened the Gate", root, 254, 120, 0,false) moveObject ( myObjects, 300, math.random( x1, y1 ,z1 ),math.random( x2, y2, z2 ) ) end end end end ) function markergo( leaveElement , matchingDimension ) if getElementType( leaveElement ) == "player" then exports ["guimessages"] : outputServer (root, "*Console Left The Marker" , math.random(255), math.random(255), math.random(255)) moveObject ( myObjects, 3000, 1283.1999511719, -783.79998779297, 1091.6999511719 ) end end addEventHandler( "onMarkerLeave", gatemarker, markergo ) Link to comment
#Wizard Posted August 3, 2015 Share Posted August 3, 2015 local x1, y1, z1 = 1275.3000488281 , -783.79998779297 , 1091.6999511719 local x2, y2, z2 = 1282.4000244141 , -784.5 , 1091.6999511719 , 0 , 0 , 100 local TheMarker = createMarker ( 1455.8000488281, 2773.3999023438, 11.800000190735, "arrow", 1.2, 255, 255, 0, 150 ) local newmarker = createMarker ( 1260.6999511719, -785.40002441406, 1092.8270263672, "arrow", 1.2, 254, 120, 0, 150 ) local gatemarker = createMarker ( 1282.47302, -783.39587, 1089.93750 ,"corona", 1.2, 254, 120, 0, 0 ) local myObjects = createObject ( 980, 1283.1999511719, -783.79998779297, 1091.6999511719 ) setElementDimension ( gatemarker, 20 ) setElementInterior ( gatemarker , 5 ) setElementDimension ( myObjects, 20 ) setElementInterior ( myObjects , 5 ) setElementDimension ( newmarker, 20 ) setElementInterior ( newmarker , 5 ) addEventHandler ( "onMarkerHit", resourceRoot, function ( player ) if ( getPlayerAccount ( player ) and not isGuestAccount ( getPlayerAccount ( player ) ) ) then if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup( "Console" ) ) ) then return exports ["guimessages"] : outputServer (player, "*Your Not Console !!" , math.random(255), math.random(255), math.random(255)) end if ( getElementType ( player ) == "player" ) then if ( isPedInVehicle ( player ) ) then return end if ( source == TheMarker ) then setElementDimension ( player, 20 ) setElementInterior ( player, 5, 1263.53699, -785.45905 ,1091.90625 ) outputChatBox ( "* Welcome To Home Console", player, 255, 0, 0, true ) elseif ( source == newmarker ) then setElementPosition ( player, 1456.13135 ,2773.33740 ,11.68110 ) setElementInterior ( player, 0 ) setElementDimension ( player, 0 ) outputChatBox ( "*Console Is Out the House !!", player, 255, 0, 0, true ) elseif ( source == gatemarker ) then outputChatBox( "*Console Has Been Opened the Gate", root, 254, 120, 0,false) moveObject ( myObjects, 300, math.random( x1, y1 ,z1 ),math.random( x2, y2, z2 ) ) end end end end ) function markergo( leaveElement , matchingDimension ) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup( "Console" ) ) ) then if getElementType( leaveElement ) == "player" then exports ["guimessages"] : outputServer (root, "*Console Left The Marker" , math.random(255), math.random(255), math.random(255)) moveObject ( myObjects, 3000, 1283.1999511719, -783.79998779297, 1091.6999511719 ) end end end addEventHandler( "onMarkerLeave", gatemarker, markergo ) 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