DYNAMO Posted July 28, 2013 Share Posted July 28, 2013 function createTheGate () myGate = createObject ( 971 ,-3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 90.78617095947, 0, 0, 90 ) setTimer ( movingMyGateBack, 5000, 1 ) end addCommandHandler("swat",openMyGate) function movingMyGateBack () moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end I tried this , but not working . please help any admin , moderator , or any who know about it. Link to comment
iMr.3a[Z]eF Posted July 28, 2013 Share Posted July 28, 2013 It shall work, what is debug says? Link to comment
DYNAMO Posted July 28, 2013 Author Share Posted July 28, 2013 what? , I don't understand? Link to comment
-.Paradox.- Posted July 28, 2013 Share Posted July 28, 2013 Mm try this. function createTheGate30 () myGate30 = createObject ( 971, -3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate30 ) function openMyGate30 () moveObject ( myGate30, 5000, -3258.5517578125, 751.85546875, 90.78617095947 ) end addCommandHandler("swat1",openMyGate30) function movingMyGateBack30 () moveObject ( myGate30, 5000, -3258.5517578125, 751.85546875, 116.78617095947 ) end addCommandHandler("swat2",movingMyGateBack30) Link to comment
EstrategiaGTA Posted July 28, 2013 Share Posted July 28, 2013 Type /debugscript 3 in-game and tell us the errors which you got. Link to comment
iMr.3a[Z]eF Posted July 28, 2013 Share Posted July 28, 2013 Mm try this. function createTheGate30 () myGate30 = createObject ( 971, -3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate30 ) function openMyGate30 () moveObject ( myGate30, 5000, -3258.5517578125, 751.85546875, 90.78617095947 ) end addCommandHandler("swat1",openMyGate30) function movingMyGateBack30 () moveObject ( myGate30, 5000, -3258.5517578125, 751.85546875, 116.78617095947 ) end addCommandHandler("swat2",movingMyGateBack30) He don't want to close the gate by command, he wants to close by timer Try this function createTheGate () myGate = createObject ( 971 ,-3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 90.78617095947, 0, 0, 90 ) setTimer ( moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ), 5000, 1 ) end addCommandHandler("swat",openMyGate) Link to comment
-.Paradox.- Posted July 28, 2013 Share Posted July 28, 2013 Mm try this. function createTheGate30 () myGate30 = createObject ( 971, -3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate30 ) function openMyGate30 () moveObject ( myGate30, 5000, -3258.5517578125, 751.85546875, 90.78617095947 ) end addCommandHandler("swat1",openMyGate30) function movingMyGateBack30 () moveObject ( myGate30, 5000, -3258.5517578125, 751.85546875, 116.78617095947 ) end addCommandHandler("swat2",movingMyGateBack30) He don't want to close the gate by command, he wants to close by timer Try this function createTheGate () myGate = createObject ( 971 ,-3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 90.78617095947, 0, 0, 90 ) setTimer ( moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ), 5000, 1 ) end addCommandHandler("swat",openMyGate) Open and close with one command? Link to comment
iMr.3a[Z]eF Posted July 28, 2013 Share Posted July 28, 2013 No, open the gate and close it after 5 seconds in one command. Link to comment
TAPL Posted July 28, 2013 Share Posted July 28, 2013 (edited) Mm try this. function createTheGate30 () myGate30 = createObject ( 971, -3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate30 ) function openMyGate30 () moveObject ( myGate30, 5000, -3258.5517578125, 751.85546875, 90.78617095947 ) end addCommandHandler("swat1",openMyGate30) function movingMyGateBack30 () moveObject ( myGate30, 5000, -3258.5517578125, 751.85546875, 116.78617095947 ) end addCommandHandler("swat2",movingMyGateBack30) He don't want to close the gate by command, he wants to close by timer Try this function createTheGate () myGate = createObject ( 971 ,-3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 90.78617095947, 0, 0, 90 ) setTimer ( moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ), 5000, 1 ) end addCommandHandler("swat",openMyGate) Wrong timer. @Just make sure you have it server side. Edited July 28, 2013 by Guest Link to comment
iMr.3a[Z]eF Posted July 28, 2013 Share Posted July 28, 2013 (edited) Lol Why? Edited July 28, 2013 by Guest Link to comment
DYNAMO Posted July 28, 2013 Author Share Posted July 28, 2013 can anyone send me the correct script? Link to comment
TAPL Posted July 28, 2013 Share Posted July 28, 2013 can anyone send me the correct script? Your script is work, MAKE SURE IT SERVER SIDE NOT CLIENT SIDE. Link to comment
DYNAMO Posted July 28, 2013 Author Share Posted July 28, 2013 ok , I had put it I client side , now I will take it to serer side Link to comment
iMr.3a[Z]eF Posted July 28, 2013 Share Posted July 28, 2013 ok , I had put it I client side, now I will take it to serer side So, that's mean you solved the problem. And all thanks to TAPL too. Link to comment
DYNAMO Posted July 28, 2013 Author Share Posted July 28, 2013 yes! , its solved. but I was to move it down but it roatates. Link to comment
iMr.3a[Z]eF Posted July 28, 2013 Share Posted July 28, 2013 Try if the first one is rotates try the second one function createTheGate () myGate = createObject ( 971 ,-3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 9 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 90.78617095947 ) setTimer ( movingMyGateBack, 5000, 1 ) end addCommandHandler("swat",openMyGate) function movingMyGateBack () moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 116.78617095947 ) end the second one function createTheGate () myGate = createObject ( 971 ,-3258.5517578125, 751.85546875, 116.78617095947 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 90.78617095947 ) setTimer ( movingMyGateBack, 5000, 1 ) end addCommandHandler("swat",openMyGate) function movingMyGateBack () moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 116.78617095947 ) end Link to comment
DYNAMO Posted July 28, 2013 Author Share Posted July 28, 2013 if I don't wright rotation in z , then the gate will come open already , because to fix it I have moved it 90. 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