Faw[Ful] Posted September 8, 2010 Share Posted September 8, 2010 I fellow the wiki and I make this script : addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) function resource_starts () object1 = createObject ( 2053, 5041.107421875, 2517.9289550781, 35.989669799805, 33.997192382813, 179.99450683594, 179.99450683594 ) object2 = createObject ( 2053, 5098.576171875, 2517.919921875, 35.989669799805, 33.99169921875, 179.99450683594, 179.99450683594 ) object3 = createObject ( 2053, 5155.91015625, 2517.9384765625, 35.989669799805, 33.99169921875, 179.99450683594, 179.99450683594 ) move1_1 () end function move1_1 () moveObject ( object1, 2000, 0, 0, 0, 360, 0, 0 ) moveObject ( object2, 2000, 0, 0, 0, 360, 0, 0 ) moveObject ( object3, 2000, 0, 0, 0, 360, 0, 0 ) setTimer ( move1_1, 2000, 0 ) end You will say " ID its a hat ", yes, but I replace it with a working custom model, so the script just dont work I cant see the created objects and of course they dont move, I dont forget the meta and additionaly I try it with a normal sa object and its dont work, so I need to know whats wrong in this script. What I want its a loop rotation of 360 on the x axis ! Link to comment
Kayl Posted September 8, 2010 Share Posted September 8, 2010 addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) the "resource_starts" function doesn't exist yet at this point when the addEventHandler is called. Move this whole line below the "end" of the function (resource_starts that is) code. Link to comment
Faw[Ful] Posted September 8, 2010 Author Share Posted September 8, 2010 dont work wtf now script look like that : function resource_starts() object1 = createObject ( 2053, 5041.107421875, 2517.9289550781, 35.989669799805, 33.997192382813, 179.99450683594, 179.99450683594 ) object2 = createObject ( 2053, 5098.576171875, 2517.919921875, 35.989669799805, 33.99169921875, 179.99450683594, 179.99450683594 ) object3 = createObject ( 2053, 5155.91015625, 2517.9384765625, 35.989669799805, 33.99169921875, 179.99450683594, 179.99450683594 ) end addEventHandler ( "onResourceStart", getRootElement(), resource_starts ) function move1_1() moveObject ( object1, 2000, 0, 0, 0, 180, 0, 0 ) moveObject ( object2, 2000, 0, 0, 0, 180, 0, 0 ) moveObject ( object3, 2000, 0, 0, 0, 180, 0, 0 ) end setTimer ( move1_1, 2000, 0 ) addEventHandler ( "onResourceStart", getRootElement(), move1_1 ) Link to comment
BinSlayer1 Posted September 8, 2010 Share Posted September 8, 2010 Hi Benox There's a tutorial here Follow the instructions http://forums.left4green.com/topic/3688 ... -in-mtadm/ Link to comment
Faw[Ful] Posted September 8, 2010 Author Share Posted September 8, 2010 thanks bin, but isnt necessary got it working I forget to make it serverside LOL and I put 0 for new position so object change place, now its ok it rotate like a charm with a little lag 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