+Razer+ Posted June 27, 2013 Posted June 27, 2013 I don't know how to make 2 moving gate in 1 base i try to make it but there are some bugs pls teach me how to make 2 moving gates
Castillo Posted June 27, 2013 Posted June 27, 2013 You must use the function moveObject San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
+Razer+ Posted June 27, 2013 Author Posted June 27, 2013 i know that function but i can't make 2 moving gates object = createObject ( 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 88.886291503906) maker = createMarker ( 2910.5300292969, -683.94000244141, 9.4399995803833, "cylinder", 2, 0, 0, 0, 0 ) function gateo ( player ) local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object, 2500, 2910.4899902344, -683.85998535156, 17.200000762939, 0, 0, 0 ) else outputChatBox ( "", player, 255, 0, 0 ) end end addEventHandler ( "onMarkerHit", maker, gateo ) function getec ( player ) moveObject ( object, 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 0 ) end addEventHandler ( "onMarkerLeave", maker, getec ) object = createObject ( 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 88.907897949219) maker = createMarker ( 3026.7399902344, -686.38000488281, 20.290000915527, "cylinder", 2, 0, 0, 0, 0 ) function gateo ( player ) local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object, 2500, 3026.1298828125, -686.88000488281, 28.299999237061, 0, 0, 0 ) else outputChatBox ( "", player, 255, 0, 0 ) end end addEventHandler ( "onMarkerHit", maker, gateo ) function getec ( player ) moveObject ( object, 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 0 ) end addEventHandler ( "onMarkerLeave", maker, getec ) i try to make it but there are some bugs in this script
Castillo Posted June 27, 2013 Posted June 27, 2013 object = createObject ( 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 88.886291503906) maker = createMarker ( 2910.5300292969, -683.94000244141, 9.4399995803833, "cylinder", 2, 0, 0, 0, 0 ) object2 = createObject ( 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 88.907897949219) maker2 = createMarker ( 3026.7399902344, -686.38000488281, 20.290000915527, "cylinder", 2, 0, 0, 0, 0 ) function gateo ( player ) if ( source == maker ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object, 2500, 2910.4899902344, -683.85998535156, 17.200000762939, 0, 0, 0 ) else outputChatBox ( "", player, 255, 0, 0 ) end elseif ( source == maker2 ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object2, 2500, 3026.1298828125, -686.88000488281, 28.299999237061, 0, 0, 0 ) else outputChatBox ( "", player, 255, 0, 0 ) end end end addEventHandler ( "onMarkerHit", root, gateo ) function getec ( player ) if ( source == maker ) then moveObject ( object, 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 0 ) elseif ( source == maker2 ) then moveObject ( object2, 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 0 ) end end addEventHandler ( "onMarkerLeave", root, getec ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
+Razer+ Posted June 27, 2013 Author Posted June 27, 2013 that script was working but now when i edit that script and add 2 more gates it is not working i can't see any gates object = createObject ( 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 88.886291503906) maker = createMarker ( 2910.5300292969, -683.94000244141, 9.4399995803833, "cylinder", 2, 0, 0, 0, 0 ) object2 = createObject ( 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 88.907897949219) maker2 = createMarker ( 3026.7399902344, -686.38000488281, 20.290000915527, "cylinder", 2, 0, 0, 0, 0 ) object3 = createObject ( 980, 2914.8701171875, -608.76000976563, 11.210000038147, 0, 0, 89.231903076172) maker3 = createMarker ( 2914.7199707031, -608.51000976563, 8.539999961853, "cylinder", 2, 0, 0, 0, 0 ) object4 = createObject ( 980, 2951.8999023438, -608.34997558594, 8.6899995803833, 0, 0, 89.915710449219) maker4 = createMaker ( 2952, -608.52001953125, 6.0900001525879, "cylinder", 2, 0, 0, 0, 0 ) function gateo ( player ) if ( source == maker ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object, 2500, 2910.4899902344, -683.85998535156, 17.200000762939, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this base.", player, 255, 0, 0 ) end elseif ( source == maker2 ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object2, 2500, 3026.1298828125, -686.88000488281, 28.299999237061, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this base.", player, 255, 0, 0 ) end elseif ( sorce == maker3 ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object3, 2500, 2914.8701171875, -608.76000976563, 16.540000915527, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this area.", player, 255, 0, 0 ) end elseif (sorce == maker4 ) then local skin = getElementModel ( player ) if (skin == 164 ) then moveObject ( object4, 2500, 2951.8999023438, -608.34997558594, 13.699999809265, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this area.", player, 255, 0, 0 ) end end end addEventHandler ( "onMarkerHit", root, gateo ) function getec ( player ) if ( source == maker ) then moveObject ( object, 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 0 ) elseif ( source == maker2 ) then moveObject ( object2, 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 0 ) elseif ( source == maker3 ) then moveObject (object3, 980 , 2914.8701171875, -608.76000976563, 11.210000038147, 0, 0, 0 ) elseif (sorce == maker4 ) then moveObject (object4, 980 , 2951.8999023438, -608.34997558594, 8.6899995803833, 0, 0, 0) end end addEventHandler ( "onMarkerLeave", root, getec ) and thx for help
Castillo Posted June 27, 2013 Posted June 27, 2013 elseif (sorce == maker4 ) then You put 'sorce' but is 'source'. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted June 27, 2013 Posted June 27, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
+Razer+ Posted June 27, 2013 Author Posted June 27, 2013 ah the gate is not opeing for Cars only for bikes D'; how i can fix that ? i need to change size of that Marker ? or something else ? object = createObject ( 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 88.886291503906) maker = createMarker ( 2910.4299316406, -683.61999511719, 9.75, "cylinder", 2, 0, 0, 0, 0 ) object2 = createObject ( 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 88.907897949219) maker2 = createMarker ( 3026.1799316406, -687.07000732422, 21.129999160767, "cylinder", 2, 0, 0, 0, 0 ) object3 = createObject ( 980, 2914.8701171875, -608.76000976563, 11.210000038147, 0, 0, 89.231903076172) maker3 = createMarker ( 2914.7199707031, -608.51000976563, 8.539999961853, "cylinder", 2, 0, 0, 0, 0 ) object4 = createObject ( 980, 2951.8999023438, -608.34997558594, 8.6899995803833, 0, 0, 89.915710449219) maker4 = createMarker ( 2952, -608.52001953125, 6.0900001525879, "cylinder", 2, 0, 0, 0, 0 ) function gateo ( player ) if ( source == maker ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object, 2800, 2910.4899902344, -683.85998535156, 17.200000762939, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this base.", player, 255, 0, 0 ) end elseif ( source == maker2 ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object2, 2800, 3026.1298828125, -686.88000488281, 28.299999237061, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this base.", player, 255, 0, 0 ) end elseif ( source == maker3 ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object3, 2800, 2914.8701171875, -608.76000976563, 16.540000915527, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this area.", player, 255, 0, 0 ) end elseif (source == maker4 ) then local skin = getElementModel ( player ) if (skin == 164 ) then moveObject ( object4, 2800, 2951.8999023438, -608.34997558594, 13.699999809265, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this area.", player, 255, 0, 0 ) end end end addEventHandler ( "onMarkerHit", root, gateo ) function getec ( player ) if ( source == maker ) then moveObject ( object, 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 0 ) elseif ( source == maker2 ) then moveObject ( object2, 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 0 ) elseif ( source == maker3 ) then moveObject (object3, 980 , 2914.8701171875, -608.76000976563, 11.210000038147, 0, 0, 0 ) elseif (source == maker4 ) then moveObject (object4, 980 , 2951.8999023438, -608.34997558594, 8.6899995803833, 0, 0, 0) end end addEventHandler ( "onMarkerLeave", root, getec )
Castillo Posted June 27, 2013 Posted June 27, 2013 object = createObject ( 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 88.886291503906) maker = createMarker ( 2910.4299316406, -683.61999511719, 9.75, "cylinder", 2, 0, 0, 0, 0 ) object2 = createObject ( 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 88.907897949219) maker2 = createMarker ( 3026.1799316406, -687.07000732422, 21.129999160767, "cylinder", 2, 0, 0, 0, 0 ) object3 = createObject ( 980, 2914.8701171875, -608.76000976563, 11.210000038147, 0, 0, 89.231903076172) maker3 = createMarker ( 2914.7199707031, -608.51000976563, 8.539999961853, "cylinder", 2, 0, 0, 0, 0 ) object4 = createObject ( 980, 2951.8999023438, -608.34997558594, 8.6899995803833, 0, 0, 89.915710449219) maker4 = createMarker ( 2952, -608.52001953125, 6.0900001525879, "cylinder", 2, 0, 0, 0, 0 ) function gateo ( player ) if ( getElementType ( player ) == "vehicle" ) then player = getVehicleController ( player ) end if ( source == maker ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object, 2800, 2910.4899902344, -683.85998535156, 17.200000762939, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this base.", player, 255, 0, 0 ) end elseif ( source == maker2 ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object2, 2800, 3026.1298828125, -686.88000488281, 28.299999237061, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this base.", player, 255, 0, 0 ) end elseif ( source == maker3 ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object3, 2800, 2914.8701171875, -608.76000976563, 16.540000915527, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this area.", player, 255, 0, 0 ) end elseif (source == maker4 ) then local skin = getElementModel ( player ) if (skin == 164 ) then moveObject ( object4, 2800, 2951.8999023438, -608.34997558594, 13.699999809265, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this area.", player, 255, 0, 0 ) end end end addEventHandler ( "onMarkerHit", root, gateo ) function getec ( player ) if ( source == maker ) then moveObject ( object, 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 0 ) elseif ( source == maker2 ) then moveObject ( object2, 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 0 ) elseif ( source == maker3 ) then moveObject (object3, 980 , 2914.8701171875, -608.76000976563, 11.210000038147, 0, 0, 0 ) elseif (source == maker4 ) then moveObject (object4, 980 , 2951.8999023438, -608.34997558594, 8.6899995803833, 0, 0, 0) end end addEventHandler ( "onMarkerLeave", root, getec ) Try it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
+Razer+ Posted June 27, 2013 Author Posted June 27, 2013 here is the link of the base http://www.4shared.com/rar/JCid3Q-2/AIR-BASE5.html and here is the script object = createObject ( 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 88.886291503906) maker = createMarker ( 2910.4299316406, -683.61999511719, 9.75, "cylinder", 2, 0, 0, 0, 0 ) object2 = createObject ( 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 88.907897949219) maker2 = createMarker ( 3026.1799316406, -687.07000732422, 21.129999160767, "cylinder", 2, 0, 0, 0, 0 ) object3 = createObject ( 980, 2914.8701171875, -608.76000976563, 11.210000038147, 0, 0, 89.231903076172) maker3 = createMarker ( 2914.7199707031, -608.51000976563, 8.539999961853, "cylinder", 2, 0, 0, 0, 0 ) object4 = createObject ( 980, 2951.8999023438, -608.34997558594, 8.6899995803833, 0, 0, 89.915710449219) maker4 = createMarker ( 2952, -608.52001953125, 6.0900001525879, "cylinder", 2, 0, 0, 0, 0 ) function gateo ( player ) if ( getElementType ( player ) == "vehicle" ) then player = getVehicleController ( player ) end if ( source == maker ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object, 2800, 2910.4899902344, -683.85998535156, 17.200000762939, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this base.", player, 255, 0, 0 ) end elseif ( source == maker2 ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object2, 2800, 3026.1298828125, -686.88000488281, 28.299999237061, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this base.", player, 255, 0, 0 ) end elseif ( source == maker3 ) then local skin = getElementModel ( player ) if ( skin == 164 ) then moveObject ( object3, 2800, 2914.8701171875, -608.76000976563, 16.540000915527, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this area.", player, 255, 0, 0 ) end elseif (source == maker4 ) then local skin = getElementModel ( player ) if (skin == 164 ) then moveObject ( object4, 2800, 2951.8999023438, -608.34997558594, 13.699999809265, 0, 0, 0 ) else outputChatBox ( "sorry, you're not a British Armed Forces member, You can't enter in this area.", player, 255, 0, 0 ) end end end addEventHandler ( "onMarkerHit", root, gateo ) function getec ( player ) if ( source == maker ) then moveObject ( object, 980, 2910.4899902344, -683.85998535156, 12.270000457764, 0, 0, 0 ) elseif ( source == maker2 ) then moveObject ( object2, 980, 3026.1298828125, -686.88000488281, 23.39999961853, 0, 0, 0 ) elseif ( source == maker3 ) then moveObject (object3, 980 , 2914.8701171875, -608.76000976563, 11.210000038147, 0, 0, 0 ) elseif (source == maker4 ) then moveObject (object4, 980 , 2951.8999023438, -608.34997558594, 8.6899995803833, 0, 0, 0) end end addEventHandler ( "onMarkerLeave", root, getec ) pls anybody can fix that gate problem ? the gates are not opening for Cars D';
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