Jw8. Posted June 26, 2019 Share Posted June 26, 2019 عندي مشكله بلانيمشون اقدر اسويه لما يضغط البوتين مره واحد يشتغل واذا ضغط مرة ثانية يطفي addEvent("animations", true) addEventHandler("animations", root, function(anim, block) if anim and block then setPedAnimation(client, anim, block) setElementData(source,"Anim"," Stop Animation") exports["guimessages"]:outputServer(source, "#E1E1E1[User Panel] : #00FF00Start Animation #00ff00 !","success") else setElementData(source,"Anim"," Start Animation") setPedAnimation(client, false) exports["guimessages"]:outputServer(client, "#E1E1E1[User Panel] : #ff00ffStop Animation #00ff00 !","success") end end) Link to comment
N3xT Posted June 26, 2019 Share Posted June 26, 2019 للتنويه فقط, راجع الويكي بخصوص فنكشن الانميشن احتمال انت عاكس الارقمنتات addEvent ( "animations", true ) addEventHandler ( "animations", root, function ( anim, block ) if ( anim and block ) then setPedAnimation ( source, anim, block ) setElementData ( source, "Anim", "Stop Animation" ) exports["guimessages"]:outputServer ( source, "#E1E1E1[User Panel] : #00FF00Start Animation #00ff00 !", "success" ) else setPedAnimation ( source ) setElementData ( source, "Anim", "Start Animation" ) exports["guimessages"]:outputServer ( source, "#E1E1E1[User Panel] : #ff00ffStop Animation #00ff00 !", "success" ) end end ) Link to comment
Jw8. Posted June 26, 2019 Author Share Posted June 26, 2019 (edited) 55 minutes ago, N3xT said: للتنويه فقط, راجع الويكي بخصوص فنكشن الانميشن احتمال انت عاكس الارقمنتات addEvent ( "animations", true ) addEventHandler ( "animations", root, function ( anim, block ) if ( anim and block ) then setPedAnimation ( source, anim, block ) setElementData ( source, "Anim", "Stop Animation" ) exports["guimessages"]:outputServer ( source, "#E1E1E1[User Panel] : #00FF00Start Animation #00ff00 !", "success" ) else setPedAnimation ( source ) setElementData ( source, "Anim", "Start Animation" ) exports["guimessages"]:outputServer ( source, "#E1E1E1[User Panel] : #ff00ffStop Animation #00ff00 !", "success" ) end end ) ماظبطو وجربت ذه addEvent("animations", true) addEventHandler("animations", root, function (anim, block) if not getElementData(source, " Start Animation") then setPedAnimation(source, anim, block) setElementData(source,"Anim"," Stop Animation") else setPedAnimation(source) setElementData(source,"Anim"," Start Animation") end end ) 53 minutes ago, N3xT said: للتنويه فقط, راجع الويكي بخصوص فنكشن الانميشن احتمال انت عاكس الارقمنتات addEvent ( "animations", true ) addEventHandler ( "animations", root, function ( anim, block ) if ( anim and block ) then setPedAnimation ( source, anim, block ) setElementData ( source, "Anim", "Stop Animation" ) exports["guimessages"]:outputServer ( source, "#E1E1E1[User Panel] : #00FF00Start Animation #00ff00 !", "success" ) else setPedAnimation ( source ) setElementData ( source, "Anim", "Start Animation" ) exports["guimessages"]:outputServer ( source, "#E1E1E1[User Panel] : #ff00ffStop Animation #00ff00 !", "success" ) end end ) ماظبطو وجربت ذه addEvent("animations", true) addEventHandler("animations", root, function (anim, block) if not getElementData(source, " Start Animation") then setPedAnimation(source, anim, block) setElementData(source,"Anim"," Stop Animation") else setPedAnimation(source) setElementData(source,"Anim"," Start Animation") end end ) 55 minutes ago, N3xT said: للتنويه فقط, راجع الويكي بخصوص فنكشن الانميشن احتمال انت عاكس الارقمنتات addEvent ( "animations", true ) addEventHandler ( "animations", root, function ( anim, block ) if ( anim and block ) then setPedAnimation ( source, anim, block ) setElementData ( source, "Anim", "Stop Animation" ) exports["guimessages"]:outputServer ( source, "#E1E1E1[User Panel] : #00FF00Start Animation #00ff00 !", "success" ) else setPedAnimation ( source ) setElementData ( source, "Anim", "Start Animation" ) exports["guimessages"]:outputServer ( source, "#E1E1E1[User Panel] : #ff00ffStop Animation #00ff00 !", "success" ) end end ) وذه ملف كلينت addEventHandler("onClientGUIClick", resourceRoot, function(button) if button == "left" then if source == sssW then local anim = DGS:dgsGridListGetItemData(animations, DGS:dgsGridListGetSelectedItem(animations)) if anim and type(anim) == "table" then triggerServerEvent("animations", localPlayer, anim[1], anim[2]) end end end end) Edited June 26, 2019 by DmAr511 Link to comment
SycroX Posted June 26, 2019 Share Posted June 26, 2019 (edited) addEventHandler ( "onClientGUIClick" , resourceRoot, function ( button ) if button == "left" and source == sssW then local anim = DGS:dgsGridListGetItemData(animations, DGS:dgsGridListGetSelectedItem(animations)) if anim and type(anim) == "table" then if getPedAnimation ( localPlayer ) then triggerServerEvent("animations", localPlayer, false) else triggerServerEvent("animations", localPlayer, anim[1], anim[2]) end else triggerServerEvent("animations", localPlayer, false) end end end ) Edited June 26, 2019 by #x1AhMeD-09 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