GoldRupert Posted March 30, 2014 Share Posted March 30, 2014 (edited) Всем привет ребят вот создал скрипт ворот с открыванием по скину ворота создаются но по скину не открываются помогите пожалуйста вот скрипт который я создал: local gate = createObject(8210,2497.8999023438,2769.3999023438,12.89999961853, 0, 0, 270.25 ) function openagates(thePlayer) if getElementModel( thePlayer ) == 217 then --Will open only if the player is in the male staff skin moveObject ( gate, 6000, 2497.8999023438, 2769.3999023438, 4.0999999046326 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. end end addEventHandler( "onColShapeHit", gatecol, openagates ) function closeagates(thePlayer) if getElementModel( thePlayer ) == 217 then --Will close only if the player is in the male staff skin moveObject (gate1, 6000, 2497.8999023438, 2769.3999023438, 12.89999961853) --The speed in which 7000 is slow and 1000 is fast to open, Co-Ordinates for the gate to close. end end Edited March 30, 2014 by Guest Link to comment
Elengar Posted March 30, 2014 Share Posted March 30, 2014 Всем привет ребят вот создал скрипт ворот с открыванием по скину ворота создаются но по скину не открываются помогите пожалуйста вот скрипт который я создал: local gate = createObject(8210,2497.8999023438,2769.3999023438,12.89999961853, 0, 0, 270.25 ) function openagates(thePlayer) if getElementModel( thePlayer ) == 217 then --Will open only if the player is in the male staff skin moveObject ( gate, 6000, 2497.8999023438, 2769.3999023438, 4.0999999046326 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. end end addEventHandler( "onColShapeHit", gatecol, openagates ) function closeagates(thePlayer) if getElementModel( thePlayer ) == 217 then --Will close only if the player is in the male staff skin moveObject (gate1, 6000, 2497.8999023438, 2769.3999023438, 12.89999961853) --The speed in which 7000 is slow and 1000 is fast to open, Co-Ordinates for the gate to close. end end У тебя нету колшейпа gatecol. И ворота у тебя откроются, но не закроются. На closeagates повесь ивент onColShapeLeave Link to comment
GoldRupert Posted March 30, 2014 Author Share Posted March 30, 2014 А что писать в gatecol те еж кординаты? Link to comment
GoldRupert Posted March 30, 2014 Author Share Posted March 30, 2014 Прописал gatecol все как ты сказал все ровно не открываются( Link to comment
GoldRupert Posted March 30, 2014 Author Share Posted March 30, 2014 Прописал gatecol все как ты сказал все ровно не открываются( local gate = createObject(8210,2497.8999023438,2769.3999023438,12.89999961853, 0, 0, 270.25 ) gatecol = createColCircle ( 8210,2497.8999023438, 2769.3999023438, 25 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default. function openagates(thePlayer) if getElementModel( thePlayer ) == 217 then --Will open only if the player is in the male staff skin moveObject ( gate, 6000, 2497.8999023438, 2769.3999023438, 4.0999999046326 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. end end addEventHandler( "onColShapeHit", gatecol, openagates ) function closeagates(thePlayer) if getElementModel( thePlayer ) == 217 then --Will close only if the player is in the male staff skin moveObject (gate1, 6000, 2497.8999023438, 2769.3999023438, 12.89999961853) --The speed in which 7000 is slow and 1000 is fast to open, Co-Ordinates for the gate to close. end end Link to comment
GoldRupert Posted March 30, 2014 Author Share Posted March 30, 2014 Была одна ошибка а теперь ура все работает спасибо чувак!) Link to comment
Elengar Posted March 30, 2014 Share Posted March 30, 2014 Была одна ошибка а теперь ура все работает спасибо чувак!) А они у тебя закрываются ? Или ты просто не весь код скинул ? Link to comment
GoldRupert Posted March 31, 2014 Author Share Posted March 31, 2014 Да но пришлось там дописать ивент и еще там одно) Link to comment
GoldRupert Posted April 1, 2014 Author Share Posted April 1, 2014 а как сделать что бы было на несколько скинов?( Link to comment
GoldRupert Posted April 1, 2014 Author Share Posted April 1, 2014 Решил проблему сам) 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