DYNAMO Posted July 28, 2013 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.
-.Paradox.- Posted July 28, 2013 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)
EstrategiaGTA Posted July 28, 2013 Posted July 28, 2013 Type /debugscript 3 in-game and tell us the errors which you got.
iMr.3a[Z]eF Posted July 28, 2013 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)
-.Paradox.- Posted July 28, 2013 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?
iMr.3a[Z]eF Posted July 28, 2013 Posted July 28, 2013 No, open the gate and close it after 5 seconds in one command.
TAPL Posted July 28, 2013 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
iMr.3a[Z]eF Posted July 28, 2013 Posted July 28, 2013 (edited) Lol Why? Edited July 28, 2013 by Guest
TAPL Posted July 28, 2013 Posted July 28, 2013 can anyone send me the correct script? Your script is work, MAKE SURE IT SERVER SIDE NOT CLIENT SIDE.
DYNAMO Posted July 28, 2013 Author Posted July 28, 2013 ok , I had put it I client side , now I will take it to serer side
iMr.3a[Z]eF Posted July 28, 2013 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.
DYNAMO Posted July 28, 2013 Author Posted July 28, 2013 yes! , its solved. but I was to move it down but it roatates.
iMr.3a[Z]eF Posted July 28, 2013 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
DYNAMO Posted July 28, 2013 Author 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.
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