ErHaBe Posted July 16, 2016 Share Posted July 16, 2016 Hallo This Code Dont Work Why ? addEvent("n2",true) addEventHandler("n2",root, function () setPedAnimation ( plr, "CRACK", "crckidle3") triggerClientEvent(source,"c2",source) end) addCommandHandler("nmoney",root,) Link to comment
Walid Posted July 16, 2016 Share Posted July 16, 2016 (edited) plr is not defined in your code + you need to add the function name when using addCommandHandler, try this: function anim (plr) setPedAnimation ( plr, "CRACK", "crckidle3") triggerClientEvent(plr,"c2",plr) end) addCommandHandler("nmoney",anim) Edited July 16, 2016 by Guest Link to comment
ErHaBe Posted July 16, 2016 Author Share Posted July 16, 2016 plr is not defined in your code, try this: function anim (plr) setPedAnimation ( plr, "CRACK", "crckidle3") triggerClientEvent(plr,"c2",plr) end) addCommandHandler("nmoney",anim) no exist trigger Link to comment
ErHaBe Posted July 16, 2016 Author Share Posted July 16, 2016 plr is not defined in your code + you need to add the function name when using addCommandHandler, try this: addEvent("n2",true) addEventHandler("n2",root, function anim (plr) setPedAnimation ( plr, "CRACK", "crckidle3") triggerClientEvent(plr,"c2",plr) end) addCommandHandler("nmoney",anim) Link to comment
Walid Posted July 16, 2016 Share Posted July 16, 2016 exist trigger What are you talking about you are using command handler. explain your problem better. if you want to trigger this function from the client side just use this. addEvent("n2",true) addEventHandler("n2",root, function () setPedAnimation (client, "CRACK", "crckidle3") triggerClientEvent(client,"c2",client) end ) Link to comment
ErHaBe Posted July 16, 2016 Author Share Posted July 16, 2016 exist trigger What are you talking about you are using command handler. explain your problem better. addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == b1 ) then triggerServerEvent("n1", localPlayer) end end) addEvent("n1",true) addEventHandler("n1",root, function () triggerClientEvent(source,"c1",source) end) addEvent("c1",true) addEventHandler("c1",root, function () guiSetVisible ( Window1, not guiGetVisible ( Window1 ) ) showCursor ( guiGetVisible ( Window1 ) ) triggerServerEvent("n2", localPlayer) end) addEvent("n2",true) addEventHandler("n2",root, addCommandHandler("nmoney", function () setPedAnimation ( source, "CRACK", "crckidle3") triggerClientEvent(source,"c2",source) end) When I type in the F8 works Event 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