Mateo_Strahm Posted January 11, 2013 Share Posted January 11, 2013 (edited) I write this script but when I start server and write command /peds, ped doesn't create...please tell me where is code wrong function makePed() local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) setPedAnimation( ped1, "DANCING", "dnce_M_c") end addCommandHandler ( "peds", makeped ) Edited January 11, 2013 by Guest Link to comment
abu5lf Posted January 11, 2013 Share Posted January 11, 2013 (edited) function makePed( ) local ped1 = createPed( 299, -1629, -167.89999389648, 17.60000038147 ) setTimer( setPedAnimation, 50, 1, ped1, "DANCING", "dnce_M_c" ) end addCommandHandler ( "peds", makePed ) Edited January 11, 2013 by Guest Link to comment
RaceXtreme Posted January 11, 2013 Share Posted January 11, 2013 You should try the command debugscript 3 to see every error that Lua interface will report you. This going to help us (and you) to find the mistake. I bet that you should write "makeped" exactly how is your function name is (with uppercase in P), because addCommandHandler is case sensitive by default. So the correct is: function makePed() local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) setPedAnimation( ped1, "DANCING", "dnce_M_c") end addCommandHandler ( "peds", makePed ) Link to comment
Mateo_Strahm Posted January 11, 2013 Author Share Posted January 11, 2013 I need that ped all-time do animation... This create ped but he doesn't have animation Link to comment
csiguusz Posted January 11, 2013 Share Posted January 11, 2013 I need that ped all-time do animation... This create ped but he doesn't have animation try this: setPedAnimation( ped1, "DANCING", "dnce_M_c",-1,true,false,false) Link to comment
Mateo_Strahm Posted January 11, 2013 Author Share Posted January 11, 2013 This don't work.. same problem ... Link to comment
csiguusz Posted January 11, 2013 Share Posted January 11, 2013 function makePed() local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) setPedAnimation( ped1, "DANCING", "dnce_M_c",-1,true,false,false) end addCommandHandler ( "peds", makePed ) I tried it, it's working for me... Link to comment
Mateo_Strahm Posted January 11, 2013 Author Share Posted January 11, 2013 Seriously... Man dance when you type /peds ?? Link to comment
csiguusz Posted January 11, 2013 Share Posted January 11, 2013 Seriously... Man dance when you type /peds ?? when i type /peds it makes a ped who dances Link to comment
Mateo_Strahm Posted January 11, 2013 Author Share Posted January 11, 2013 I doesn't work for me... where is problem?? I will record some video clips so... I need peds who have some animations all-time ... Link to comment
csiguusz Posted January 11, 2013 Share Posted January 11, 2013 Maybe somewhere else is a problem in your script... And is everything in your meta.xml correct? Link to comment
Mateo_Strahm Posted January 11, 2013 Author Share Posted January 11, 2013 This is my meta : Link to comment
Castillo Posted January 11, 2013 Share Posted January 11, 2013 function makePed ( ) local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) setPedAnimation( ped1, "DANCING", "dnce_M_c",-1,true,false,false) if ( ped1 ) then outputChatBox ( "PED WAS CREATED!" ) end end addCommandHandler ( "peds", makePed ) Try that and see if it says "PED WAS CREATED" on your chat. Link to comment
Mateo_Strahm Posted January 11, 2013 Author Share Posted January 11, 2013 It doesn't say anything... What can be wrong Solidsnake14 Thanks anyway Link to comment
Castillo Posted January 11, 2013 Share Posted January 11, 2013 Are you sure that the resource is actually started? see if this says that it was executed: function makePed ( ) outputChatBox ( "Command executed!" ) local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) setPedAnimation( ped1, "DANCING", "dnce_M_c",-1,true,false,false) end addCommandHandler ( "peds", makePed ) Link to comment
csiguusz Posted January 11, 2013 Share Posted January 11, 2013 i cant see a "script scr" in your meta.xml just a map Link to comment
Castillo Posted January 11, 2013 Share Posted January 11, 2013 That's right, this line: "peds.lua" dimension="0"> Should be: Link to comment
Mateo_Strahm Posted January 11, 2013 Author Share Posted January 11, 2013 Thanks Solidsnake14 ...problem was in meta file 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