Professional Posted July 23, 2015 Share Posted July 23, 2015 (edited) السلام عليكم شباب وش المشكله هنا عملت كود دي اكس حطات بس يضغط على زر او البوتون يصير يدخن بس فيه غلط بل مود مدري وش الكلنت GUIEditor = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(335, 368, 143, 54, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) end ) local sx,sy = guiGetScreenSize() function Dx() dxDrawRectangle(sx*0.3413,sy*0.3550,sx*0.3137,sy*0.2667) dxDrawLine(284 - 1, 81 - 1, 284 - 1, 432, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(542, 81 - 1, 284 - 1, 81 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(284 - 1, 432, 542, 432, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(542, 432, 542, 81 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(284, 81, 258, 351, tocolor(135, 13, 13, 255), false) dxDrawImage(287, 111, 251, 249, "1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("سعر الدخان 50 الف دولار المود من قبل مستر حسن", 284, 80, 541, 111, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawLine(336 - 1, 369 - 1, 336 - 1, 423, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(477, 369 - 1, 336 - 1, 369 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(336 - 1, 423, 477, 423, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(477, 423, 477, 369 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(336, 369, 141, 54, tocolor(101, 141, 5, 255), false) dxDrawText("اخذ / take", 334, 368, 477, 422, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) end --------------------------------------------------- addEventHandler ( "onClientGUIClick", root, function ( ) if source == GUIEditor.button[1] then triggerServerEvent("smoke",getLocalPlayer()) end end ) ------------------------------------------------ bindKey ( "F7", "down", function () if removeEventHandler("onClientRender",root,Dx) then removeEventHandler("onClientRender",root,Dx) showCursor(false) else addEventHandler("onClientRender",root,Dx) end end) السيرفر addEvent("smoke", true) addEventHandler("smoke", root, function ( ) local x, y, z = getElementPosition ( thePlayer ) local hassan = createObject ( 1485, 0, 0, 0 ) attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) toggleControl ( thePlayer, "jump", false ) toggleControl ( thePlayer, "sprint", false ) toggleControl ( thePlayer, "crouch", false ) end ) الميتا Edited July 23, 2015 by Guest Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 يقلي الخطا ERROR: Couldn't find script Client.lua.lua for resource smoke Loading of resource 'smoke' failed Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 سفاح بس احط على البوتون يطلعلي كذا كلام بدي بوق [06:40:03] WARNING: smoke\server.lua:9: Bad argument @ 'toggleControl' [Expected player at argument 1, got nil] Link to comment
iMr.SFA7 Posted July 23, 2015 Share Posted July 23, 2015 --هذا لانه في ارقمنت ناقص addEvent("smoke", true) addEventHandler("smoke", root, function ( ) local x, y, z = getElementPosition ( thePlayer ) local hassan = createObject ( 1485, 0, 0, 0 ) attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) toggleControl ( source, "jump", false ) toggleControl ( source , "sprint", false ) toggleControl ( source , "crouch", false ) end ) Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 [06:55:01] WARNING: smoke\server.lua:6: Bad argument @ 'attachElements' [Expected element at argument 2, got nil] [06:55:03] WARNING: smoke\server.lua:4: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] Link to comment
iMr.SFA7 Posted July 23, 2015 Share Posted July 23, 2015 (edited) addEvent("smoke", true) addEventHandler("smoke", root, function (thePlayer) local x, y, z = getElementPosition ( thePlayer ) local hassan = createObject ( 1485, 0, 0, 0 ) attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) toggleControl ( thePlayer , "jump", false ) toggleControl ( thePlayer , "sprint", false ) toggleControl ( thePlayer , "crouch", false ) end ) Edited July 23, 2015 by Guest Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 رجعت مشكله المنوبه [07:26:55] WARNING: smoke\server.lua:9: Bad argument @ 'toggleControl' [Expected player at argument 1, got nil] Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 addEvent("smoke", true) addEventHandler("smoke", root, function (thePlayer) local x, y, z = getElementPosition ( thePlayer ) local hassan = createObject ( 1485, 0, 0, 0 ) attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) toggleControl ( thePlaye , "jump", false ) toggleControl ( thePlaye , "sprint", false ) toggleControl ( thePlaye , "crouch", false ) end ) ممكن سؤال ليش حاطط هنا انت toggleControl ( thePlaye , "jump", false ) toggleControl ( thePlaye , "sprint", false ) toggleControl ( thePlaye , "crouch", false ) ThePlaye?? مو ThePlayer Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 ملاحظه اخذت الكود من مود ما لقيت فنكشن السيجاره فشفت مود مو مشفر حق التدخين اخذته وشفته مو مشفر اخذت الكود function sigarette ( thePlayer, commandName ) local x, y, z = getElementPosition ( thePlayer ) local sigarette = createObject ( 1485, 0, 0, 0 ) attachElements ( sigarette, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) toggleControl ( thePlayer, "jump", false ) toggleControl ( thePlayer, "sprint", false ) toggleControl ( thePlayer, "crouch", false ) end addCommandHandler ( "smoke", sigarette ) Link to comment
iMr.SFA7 Posted July 23, 2015 Share Posted July 23, 2015 addEvent("smoke", true) addEventHandler("smoke", root, function (thePlayer) local x, y, z = getElementPosition ( thePlayer ) local hassan = createObject ( 1485, 0, 0, 0 ) attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) toggleControl ( thePlayer , "jump", false ) toggleControl ( thePlayer , "sprint", false ) toggleControl ( thePlayer , "crouch", false ) end ) Link to comment
#|_oskar_|# Posted July 23, 2015 Share Posted July 23, 2015 addEvent("smoke", true) addEventHandler("smoke", root, function () local x, y, z = getElementPosition ( source ) local hassan = createObject ( 1485, 0, 0, 0 ) attachElements ( hassan, source, 0.05, 0, 0.7, 0, 45, 118 ) toggleControl ( source , "jump", false ) toggleControl ( source , "sprint", false ) toggleControl ( source , "crouch", false ) end) Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 شكرررااا اوسكر + سفاح اوسكر كودك شتغل اما بس تنفتح الوحه ما تطلع الفاره ممكن تقلي ليش ؟ Link to comment
#|_oskar_|# Posted July 23, 2015 Share Posted July 23, 2015 شكرررااا اوسكر + سفاح اوسكر كودك شتغل اما بس تنفتح الوحه ما تطلع الفاره ممكن تقلي ليش ؟ انت ماحطيت اظهار السهم showCursor(true) Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 طب لو بدي اعمل بس يكبس مره ثانيه على البوتون يوقف التدخين كيف اعملها؟ Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 تم عمل كل شيئ بس لسا طلب بالله ابي لما لما يضغط ثاني مره على البوتون يوقف التدخين Link to comment
#|_oskar_|# Posted July 23, 2015 Share Posted July 23, 2015 تم عمل كل شيئ بس لسا طلب بالله ابي لما لما يضغط ثاني مره على البوتون يوقف التدخين destroyElement Link to comment
#Wizard Posted July 23, 2015 Share Posted July 23, 2015 toggleControl ( thePlayer, "jump", true ) toggleControl ( thePlayer, "sprint", true ) toggleControl ( thePlayer, "crouch", true ) destroyElement ( hassan ) Link to comment
Professional Posted July 23, 2015 Author Share Posted July 23, 2015 شكرا وزارد نشرت السكربت خلاص انشالله استعمله في الاصدار الجاي 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