Jacobob14 Posted June 9, 2014 Share Posted June 9, 2014 as I can make the door can not be opened or closed if moving help pliz ;( local objeto5 = createObject ( 6959, -2038.5999755859, -81.400001525879, 90, 0, 90, 90 ) local objeto6 = createObject ( 6959, -2074.8999023438, -81.400001525879, 90, 0, 90, 90 ) local state1 = false function Funcion ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "|FEDG|" ) ) then if ( not state1 ) then moveObject ( objeto5, 2000, -2038.5999755859, -81.400001525879, 110, 0, 0, 0) state1 = true moveObject ( objeto6, 2000, -2074.8999023438, -81.400001525879, 110, 0, 0, 0) state1 = true outputChatBox ( "#0000ff[base FEDG] => #ffffffAbriendo #00ff00Aereo", thePlayer, 255, 255, 255, true ) else moveObject ( objeto5, 2000, -2038.5999755859, -81.400001525879, 90, 0, 0, 0) state1 = false moveObject ( objeto6, 2000, -2074.8999023438, -81.400001525879, 90, 0, 0, 0) state1 = false outputChatBox ( "#0000ff[base FEDG] => #ffffffCerrando #ff0000Aereo", thePlayer, 255, 255, 255, true ) end else outputChatBox ( "No perteneces al clan FEDG", thePlayer, 255, 0, 0, true ) end end addCommandHandler ( "fedgaereo", Funcion ) Link to comment
Price. Posted June 9, 2014 Share Posted June 9, 2014 what are the errors? anything in debug? Link to comment
Price. Posted June 9, 2014 Share Posted June 9, 2014 (edited) wrong post. Edited June 10, 2014 by Guest Link to comment
Moderators Citizen Posted June 9, 2014 Moderators Share Posted June 9, 2014 as I can ... It's => "How can I ..." (please remember it) as I can make the door can not be opened or closed if moving By learning how to code ! You server is 80% made by others, so please learn ! And what would be a better way to learn than reading a working scripts with comments: local objeto5 = createObject ( 6959, -2038.5999755859, -81.400001525879, 90, 0, 90, 90 ) local objeto6 = createObject ( 6959, -2074.8999023438, -81.400001525879, 90, 0, 90, 90 ) local state1 = false local moving1 = false --We will use it to know if the gate is moving or not function Funcion ( thePlayer ) -- Please rename that function ! if moving1 then return end --If the gate is moving, cancel the function immediatly local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "|FEDG|" ) ) then if not state1 and then state1 = true moving1 = true -- the gate is moving setTimer(function () moving1 = false end, 2000, 1) -- gate is not moving after 2000ms moveObject ( objeto5, 2000, -2038.5999755859, -81.400001525879, 110, 0, 0, 0) moveObject ( objeto6, 2000, -2074.8999023438, -81.400001525879, 110, 0, 0, 0) outputChatBox ( "#0000ff[base FEDG] => #ffffffAbriendo #00ff00Aereo", thePlayer, 255, 255, 255, true ) else state1 = false moving1 = true -- the gate is moving setTimer(function () moving1 = false end, 2000, 1) -- gate is not moving after 2000ms moveObject ( objeto5, 2000, -2038.5999755859, -81.400001525879, 90, 0, 0, 0) moveObject ( objeto6, 2000, -2074.8999023438, -81.400001525879, 90, 0, 0, 0) outputChatBox ( "#0000ff[base FEDG] => #ffffffCerrando #ff0000Aereo", thePlayer, 255, 255, 255, true ) end else outputChatBox ( "No perteneces al clan FEDG", thePlayer, 255, 0, 0, true ) end end addCommandHandler ( "fedgaereo", Funcion ) -- If you renamed the function, change it here too 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