Jump to content

مشكله بلانيشمون


Recommended Posts

عندي مشكله بلانيمشون اقدر اسويه لما يضغط البوتين مره واحد يشتغل واذا ضغط مرة ثانية يطفي

 

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

للتنويه فقط, راجع الويكي بخصوص فنكشن الانميشن احتمال انت عاكس الارقمنتات

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
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 by DmAr511
Link to comment
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 by #x1AhMeD-09
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...