aL.Kfo Posted October 7, 2013 Share Posted October 7, 2013 مرحبا شباب اسستعمل شوب فيه بق فلوس لا كتبت في مربع عدد الرصاص -99999 يعين اخلي الاعب م يقدر يكتب رموز في الخيار بس ارقام و لا يقدر يكتب اكثر من 4 ارقام يجيمي فلوس و سلاح كيف اقفل البق Link to comment
فاّرس Posted October 7, 2013 Share Posted October 7, 2013 استخدم string.len -- عشان تخليه ما يكتب اكثر من 4 tonumber -- تخليه بس ارقام Link to comment
3NAD Posted October 7, 2013 Share Posted October 7, 2013 if tonumber ( text ) > 0 then end Link to comment
aL.Kfo Posted October 7, 2013 Author Share Posted October 7, 2013 لا هنتم شباب جاري التجربه سوال معي مود قروبات العقرب بس اقدر اموت الاي ب قروبي وش الحل Link to comment
Stranger Posted October 7, 2013 Share Posted October 7, 2013 لا هنتم شباب جاري التجربه سوال معي مود قروبات العقرب بس اقدر اموت الاي ب قروبي وش الحل استخدم "onClientPlayerDamage" getElementData cancelEvent Link to comment
aL.Kfo Posted October 8, 2013 Author Share Posted October 8, 2013 بخصوص الشوب كيف اتعامل مع الاكواد ذي ياليت توضيح Link to comment
فاّرس Posted October 8, 2013 Share Posted October 8, 2013 ذا مثال, addEventHandler('onClientGUIClick',button,function() local guiEdit = guiGetText(Edit) if not tonumber(guiEdit) or guiEdit:len() > 4 then guiSetText(guiEdit,'') else triggerServerEvent(...) end end,false ) Link to comment
aL.Kfo Posted October 8, 2013 Author Share Posted October 8, 2013 كلنت GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} local timee = {} local timeee = {} ---------------------------- --Function to create windows ---------------------------- function show() destoy() --- this function to destroy all open window ------------------ --Center Window ------------------ local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 646, 505 local left = (screenWidth-windowWidth)/2 local top = (screenHeight-windowHeight)/2 GUIEditor_Image[1] = guiCreateStaticImage(left,top,windowWidth,windowHeight,"images/1.png",false) guiSetAlpha(GUIEditor_Image[1],0.80000001192093) GUIEditor_TabPanel[1] = guiCreateTabPanel(10,19,628,397,false,GUIEditor_Image[1]) guiSetAlpha(GUIEditor_TabPanel[1],0.90000001192093) ------------------ --Weapon-1 ------------------ GUIEditor_Tab[1] = guiCreateTab("Weapon-1",GUIEditor_TabPanel[1]) GUIEditor_Image[2] = guiCreateStaticImage(45,41,107,99,"images/22.png",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(27,140,141,31,"Colt 45 \n 5 $",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],150,150,150) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(39,174,113,24,"",false,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Edit[1],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[1],5) GUIEditor_Image[3] = guiCreateStaticImage(200,41,111,100,"images/23.png",false,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(182,142,141,31,"Silenced \n 8 $",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[2],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[2],"center",false) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(191,173,113,24,"",false,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Edit[2],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[2],5) GUIEditor_Image[4] = guiCreateStaticImage(353,44,101,100,"images/24.png",false,GUIEditor_Tab[1]) GUIEditor_Label[3] = guiCreateLabel(336,142,141,31,"Deagle \n 10 $",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[3],"center",false) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(350,172,113,24,"",false,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Edit[3],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[3],5) GUIEditor_Image[5] = guiCreateStaticImage(503,42,107,98,"images/25.png",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(489,140,141,31,"Shotgun \n 14 $",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[4],"center",false) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[4] = guiCreateEdit(503,170,113,24,"",false,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Edit[4],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[4],5) GUIEditor_Image[6] = guiCreateStaticImage(41,214,110,94,"images/26.png",false,GUIEditor_Tab[1]) GUIEditor_Label[5] = guiCreateLabel(28,310,141,31,"Shotgun \n 12 $",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[5],"center",false) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Edit[5] = guiCreateEdit(41,343,113,24,"",false,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Edit[5],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[5],5) GUIEditor_Image[7] = guiCreateStaticImage(198,215,113,94,"images/27.png",false,GUIEditor_Tab[1]) GUIEditor_Label[6] = guiCreateLabel(182,309,141,31,"Combat Shotgun \n 18 $",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[6],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[6],"center",false) guiSetFont(GUIEditor_Label[6],"default-bold-small") GUIEditor_Edit[6] = guiCreateEdit(196,341,113,24,"",false,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Edit[6],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[6],5) GUIEditor_Image[8] = guiCreateStaticImage(354,217,111,94,"images/28.png",false,GUIEditor_Tab[1]) GUIEditor_Label[7] = guiCreateLabel(344,310,141,31,"Tec-9 \n 20 $",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[7],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[7],"center",false) guiSetFont(GUIEditor_Label[7],"default-bold-small") GUIEditor_Edit[7] = guiCreateEdit(355,339,113,24,"",false,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Edit[7],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[7],5) GUIEditor_Image[9] = guiCreateStaticImage(508,218,107,94,"images/29.png",false,GUIEditor_Tab[1]) GUIEditor_Label[8] = guiCreateLabel(492,309,141,31,"MP5 \n 25 $",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[8],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[8],"center",false) guiSetFont(GUIEditor_Label[8],"default-bold-small") GUIEditor_Edit[8] = guiCreateEdit(506,338,113,24,"",false,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Edit[8],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[8],6) ------------------ --Weapon-2 ------------------ GUIEditor_Tab[2] = guiCreateTab("Weapon-2",GUIEditor_TabPanel[1]) GUIEditor_Image[10] = guiCreateStaticImage(45,41,107,99,"images/30.png",false,GUIEditor_Tab[2]) GUIEditor_Label[9] = guiCreateLabel(27,140,141,31,"AK-47 \n 30 $",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[9],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[9],"center",false) guiSetFont(GUIEditor_Label[9],"default-bold-small") GUIEditor_Edit[9] = guiCreateEdit(39,174,113,24,"",false,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Edit[9],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[9],5) GUIEditor_Image[11] = guiCreateStaticImage(200,41,111,100,"images/31.png",false,GUIEditor_Tab[2]) GUIEditor_Label[10] = guiCreateLabel(182,142,141,31,"M4 \n 35 $",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[10],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[10],"center",false) guiSetFont(GUIEditor_Label[10],"default-bold-small") GUIEditor_Edit[10] = guiCreateEdit(191,173,113,24,"",false,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Edit[10],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[10],5) GUIEditor_Image[12] = guiCreateStaticImage(353,44,101,100,"images/32.png",false,GUIEditor_Tab[2]) GUIEditor_Label[11] = guiCreateLabel(336,142,141,31,"Uzi \n 17 $",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[11],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[11],"center",false) guiSetFont(GUIEditor_Label[11],"default-bold-small") GUIEditor_Edit[11] = guiCreateEdit(350,172,113,24,"",false,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Edit[11],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[11],5) GUIEditor_Image[13] = guiCreateStaticImage(503,42,107,98,"images/33.png",false,GUIEditor_Tab[2]) GUIEditor_Label[12] = guiCreateLabel(489,140,141,31,"Rifle \n 21 $",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[12],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[12],"center",false) guiSetFont(GUIEditor_Label[12],"default-bold-small") GUIEditor_Edit[12] = guiCreateEdit(503,170,113,24,"",false,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Edit[12],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[12],5) GUIEditor_Image[14] = guiCreateStaticImage(41,214,110,94,"images/34.png",false,GUIEditor_Tab[2]) GUIEditor_Label[13] = guiCreateLabel(28,310,141,31,"Sniper \n 40 $",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[13],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[13],"center",false) guiSetFont(GUIEditor_Label[13],"default-bold-small") GUIEditor_Edit[13] = guiCreateEdit(41,343,113,24,"",false,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Edit[13],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[13],5) GUIEditor_Image[15] = guiCreateStaticImage(198,215,113,94,"images/16.png",false,GUIEditor_Tab[2]) GUIEditor_Label[14] = guiCreateLabel(182,309,141,31,"Grenade \n 100 $",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[14],150,150,150) guiLabelSetHorizontalAlign(GUIEditor_Label[14],"center",false) guiSetFont(GUIEditor_Label[14],"default-bold-small") GUIEditor_Edit[14] = guiCreateEdit(196,341,113,24,"",false,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Edit[14],0.80000001192093) guiEditSetMaxLength(GUIEditor_Edit[14],5) GUIEditor_Label[15] = guiCreateLabel(156,430,156,17,"Total : 0 $",false,GUIEditor_Image[1]) guiSetFont(GUIEditor_Label[15],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(186,457,113,28,"Exit",false,GUIEditor_Image[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(57,457,113,28,"Buy",false,GUIEditor_Image[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") GUIEditor_Label[16] = guiCreateLabel(65,428,92,21,"Price Weapon:",false,GUIEditor_Image[1]) guiLabelSetColor(GUIEditor_Label[16],150,255,0) ---------------------------------End Window------------------------------------------- ------------------ --timer Edit ------------------ timee[localPlayer] = setTimer(function () local gWA22 = guiGetText (GUIEditor_Edit[1]) if gWA22 ~= '' then local tPMt22 = tonumber(gWA22) * 5 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt22 .." $") end local gWA23 = guiGetText (GUIEditor_Edit[2]) if gWA23 ~= '' then local tPMt23 = tonumber(gWA23) * 8 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt23 .." $") end local gWA24 = guiGetText (GUIEditor_Edit[3]) if gWA24 ~= '' then local tPMt24 = tonumber(gWA24) * 10 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt24 .." $") end local gWA25 = guiGetText (GUIEditor_Edit[4]) if gWA25 ~= '' then local tPMt25 = tonumber(gWA25) * 14 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt25 .." $") end local gWA26 = guiGetText (GUIEditor_Edit[5]) if gWA26 ~= '' then local tPMt26 = tonumber(gWA26) * 12 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt26 .." $") end local gWA27 = guiGetText (GUIEditor_Edit[6]) if gWA27 ~= '' then local tPMt27 = tonumber(gWA27) * 18 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt27 .." $") end local gWA28 = guiGetText (GUIEditor_Edit[7]) if gWA28 ~= '' then local tPMt28 = tonumber(gWA28) * 20 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt28 .." $") end local gWA29 = guiGetText (GUIEditor_Edit[8]) if gWA29 ~= '' then local tPMt29 = tonumber(gWA29) * 25 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt29 .." $") end local gWA30 = guiGetText (GUIEditor_Edit[9]) if gWA30 ~= '' then local tPMt30 = tonumber(gWA30) * 30 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt30 .." $") end local gWA31 = guiGetText (GUIEditor_Edit[10]) if gWA31 ~= '' then local tPMt31 = tonumber(gWA31) * 35 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt31 .." $") end local gWA32 = guiGetText (GUIEditor_Edit[11]) if gWA32 ~= '' then local tPMt32 = tonumber(gWA32) * 17 or tonumber(gWA32) * 17 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt32 .." $") end local gWA33 = guiGetText (GUIEditor_Edit[12]) if gWA33 ~= '' then local tPMt33 = tonumber(gWA33) * 21 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt33 .." $") end local gWA34 = guiGetText (GUIEditor_Edit[13]) if gWA34 ~= '' then local tPMt34 = tonumber(gWA34) * 40 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt34 .." $") end local gWA16 = guiGetText (GUIEditor_Edit[14]) if gWA16 ~= '' then local tPMt16 = tonumber(gWA16) * 100 guiSetText (GUIEditor_Label[15],"Total : ".. tPMt16 .." $") end end, 50, 0 ) timeee[localPlayer] = setTimer(function () local gWA22 = guiGetText (GUIEditor_Edit[1]) if gWA22 == '-' then guiSetText (GUIEditor_Edit[1],"") end local gWA22 = guiGetText (GUIEditor_Edit[2]) if gWA22 == '-' then Link to comment
السهلي 717 Posted October 8, 2013 Share Posted October 8, 2013 : أيهةة هآذآ الشوب معروف والبق بعد رآبط الكومنتي https://community.multitheftauto.com/ind ... ls&id=4857 فيهةة نآس ككثير يبؤون الحل وأنآ منهم Link to comment
فاّرس Posted October 8, 2013 Share Posted October 8, 2013 ذا مثال, addEventHandler('onClientGUIClick',button,function() local guiEdit = guiGetText(Edit) if not tonumber(guiEdit) or guiEdit:len() > 4 then guiSetText(guiEdit,'') else triggerServerEvent(...) end end,false ) ^ ذا مثال واظن واضح وتركبه على كودك كذا, اذا ضغط الزر, if gWA ~= '' and tonumber(gWA) and gWA:len() < 5 then وكمل الباقي نفسها ذذ وبالنسبه انه ما يكتب سالب هو حاط تايمر يتحقق ان الاديت في سالب ويسوي سيت تكست ذذ هو حاط كذا, if gWA22 == '-' then انت بدلها كذا, if gWA22:find('-') then وطبقها ع الكل ذذ Link to comment
aL.Kfo Posted October 8, 2013 Author Share Posted October 8, 2013 ذا مثال, addEventHandler('onClientGUIClick',button,function() local guiEdit = guiGetText(Edit) if not tonumber(guiEdit) or guiEdit:len() > 4 then guiSetText(guiEdit,'') else triggerServerEvent(...) end end,false ) ^ ذا مثال واظن واضح وتركبه على كودك كذا, اذا ضغط الزر, if gWA ~= '' and tonumber(gWA) and gWA:len() < 5 then وكمل الباقي نفسها ذذ وبالنسبه انه ما يكتب سالب هو حاط تايمر يتحقق ان الاديت في سالب ويسوي سيت تكست ذذ هو حاط كذا, if gWA22 == '-' then انت بدلها كذا, if gWA22:find('-') then وطبقها ع الكل ذذ اكيد واضح و هو فيه اكثر من هيكك توضيح لا هنت ي بعد حيي ضبط وزي العسسل تبا للبقات 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