M7mD-911 Posted October 22, 2013 Share Posted October 22, 2013 السلآم عليكم ورحمة الله وبركاتة بننقز للموضوع سريع انا مسوي --Client if source == button then setElementData(localPlayer, "Sa", true) end --Server function Mta( ) if getElementData(source, "Sa") then -- Code end end وسويت زر يحذف الالمنت -- Client if source == Button1 then local Sa = getElementData ( localPlayer, "Sa" ) destroyElement ( Sa ) end انا جربت كذا .. بس ما زبط فيه حل ثاني ؟ Link to comment
K1NG Posted October 22, 2013 Share Posted October 22, 2013 -- Client Side # if ( source == Button1 ) and ( getElementData ( localPlayer, "Sa" ) ) then triggerServerEvent ( "RemoveData", localPlayer ) end -- Server Side # addEvent ( "RemoveData", true ) addEventHandler ( "RemoveData", root, function ( ) removeElementData ( client, "Sa" ) end ) Link to comment
M7mD-911 Posted October 22, 2013 Author Share Posted October 22, 2013 جآري التجربة.. مشكور طيب اذا بغيت الغي المنت ثلاثة او ثنين ... اسوي كذآ ؟ if ( source == Button1 ) and ( getElementData ( localPlayer, "Sa" ) ) and ( getElementData ( localPlayer, "Saa" ) ) then triggerServerEvent ( "RemoveData", localPlayer ) end Link to comment
K1NG Posted October 22, 2013 Share Posted October 22, 2013 -- Client Side # if ( source == Button1 ) and ( getElementData ( localPlayer, "Sa" ) ) and ( getElementData ( localPlayer, "Saa" ) ) then triggerServerEvent ( "RemoveData", localPlayer ) end -- Server Side # addEvent ( "RemoveData", true ) addEventHandler ( "RemoveData", root, function ( ) removeElementData ( client, "Sa" ) removeElementData ( client, "Saa" ) end ) Link to comment
M7mD-911 Posted October 24, 2013 Author Share Posted October 24, 2013 -- Client Side # if ( source == Button1 ) and ( getElementData ( localPlayer, "Sa" ) ) and ( getElementData ( localPlayer, "Saa" ) ) then triggerServerEvent ( "RemoveData", localPlayer ) end -- Server Side # addEvent ( "RemoveData", true ) addEventHandler ( "RemoveData", root, function ( ) removeElementData ( client, "Sa" ) removeElementData ( client, "Saa" ) end ) الكود ما ضبط ابي افهم وش client Link to comment
xX|KeMo|Xx Posted October 24, 2013 Share Posted October 24, 2013 شيل Client وحط source إذا تبي الايليمت يروح من الكل root Link to comment
#DRAGON!FIRE Posted October 24, 2013 Share Posted October 24, 2013 -- Client Side # if ( source == Button1 ) and ( getElementData ( localPlayer, "Sa" ) ) and ( getElementData ( localPlayer, "Saa" ) ) then triggerServerEvent ( "RemoveData", localPlayer ) end -- Server Side # addEvent ( "RemoveData", true ) addEventHandler ( "RemoveData", root, function ( ) removeElementData ( client, "Sa" ) removeElementData ( client, "Saa" ) end ) الكود ما ضبط ابي افهم وش client # افتح عليها وبتفهمها Link to comment
فاّرس Posted October 24, 2013 Share Posted October 24, 2013 لا الكود بيضبط % 100 client : The client class represents any client that has connected to the server. This can be a player or the console. All client functions can operate on both player and server console elements. بإختصار هي تحطها وقت ترسل تريقر لوكل من الكلنت, triggerServerEvent ( "RemoveData", localPlayer ) 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