αвυ-wαleed Posted March 6, 2014 Share Posted March 6, 2014 سويت كود بس الخطأ مدري اش هو اضغط الزر ولافي فايدة سويت ترايقر من كلنت للسيرفر هذا الكلينت addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == a ) then triggerServerEvent("MM",getLocalPlayer()) end end ) هذا السيرفر addEvent("MM",true) addEventHandler("MM",root, function Animation ( plr ) local PlayerMoney = getPlayerMoney ( plr ); if ( PlayerMoney >= 150 ) then takePlayerMoney ( plr, 150 ); setPedAnimation ( plr, "FOOD", "EAT_Burger", _, false, _, _, false ); setPedArmor ( plr, 100 ); end end ) Link to comment
shwaeki Posted March 6, 2014 Share Posted March 6, 2014 جرب سيرفر addEvent("MM",true) addEventHandler("MM",root, function ( ) if ( getPlayerMoney ( source) >= 150 ) then takePlayerMoney ( source, 150 ) setPedAnimation ( source, "FOOD", "EAT_Burger") setPedArmor ( source, 100 ) end end ) Link to comment
فاّرس Posted March 6, 2014 Share Posted March 6, 2014 αвυ-wαleed @ غلط انك تحط برامتر لأنك من الكلينت ما ارسلت شيء , triggerServerEvent("MM",getLocalPlayer()) -- هنا ارسلت التريقر للاعب تقدر ترسله لشخص محدد او للكل معرف من التريقر (source) طبعا في السيرفر بيكون السورس اذا كان تبي تسوي برامتر تقدر تسوي كذا, triggerServerEvent("MM",getLocalPlayer(),getLocalPlayer()) -- هنا البرامتر هو اللاعب -- getLocalPlayer() = localPlayer تقدر تختصرها triggerServerEvent("MM",localPlayer,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