Jump to content

Rockyz

Members
  • Posts

    1,862
  • Joined

  • Days Won

    8

Everything posted by Rockyz

  1. بس ابي شرح ومثال لـــ string.gsub
  2. + تعلم من الاكواد ادا مافهمت
  3. صح كلامك انك ماستفدت شي بعلمك وش عدلت ووش الاخطاء اول شي -- client >> function weapon (root) -- هذا غلط وش فايدة root ? guiGetText ( root ) -- وهنا guiGetText لازم تحط اسم الايديت وتخلي لها متغير triggerServerEvent('ss', localPlayer) -- هنا ماعرفت guiGetText الي هو الكلام الي داخل الايديت end addEventHandler ( "onClientGUIClick",weapon, )-- فاصلة زايدة -- server >> addEventHandler("BuyWep", root, function ( GetThata ) -- ماعرفت الكلام local GetMy = getPlayerMoney ( source ) -- متغير حق يجيب فلوس الاعب if ( GetMy >= 3000 ) then -- كان ناقصك تحققات ان الاعب عنده 3000 او ازيد takePlayerMoney ( source, 3000 ) -- ياخد فلوس الاعب giveWeapon( source, 31, GetThata ) -- استبدلت عدد الطلقات ب الكلام الي داخل الايديت outputChatBox(" تم اعطاءك سلاح", source, 255, 0 ,0 , true) end end )
  4. -- # Client Side GUIEditor = { button = {}, window = {}, staticimage = {}, edit = {} } TheKey = "F6" addEventHandler("onClientResourceStart", resourceRoot, function ( ) GUIEditor.window[1] = guiCreateWindow(399, 280, 338, 303, "شراء الاسلحة", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1], false ) GUIEditor.edit[1] = guiCreateEdit(10, 93, 101, 32, "0", false, GUIEditor.window[1]) GUIEditor.staticimage[1] = guiCreateStaticImage(12, 32, 95, 56, ":guieditor/images/pp.png", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(14, 251, 87, 42, "شراء", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(111, 251, 87, 42, "اغلاق", false, GUIEditor.window[1]) end ) addEventHandler ( "onClientGUIClick", guiRoot, function ( ) local GetThata = guiGetText ( GUIEditor.edit[1] ) if ( source == GUIEditor.button[1] ) then triggerServerEvent ("BuyWep", localPlayer, GetThata) elseif ( source == GUIEditor.button[2] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) end end ) bindKey (TheKey, "down", function ( ) guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end )
  5. تابل انت جني او وش توني معدله انت جيت
  6. -- # Client Side GUIEditor = { button = {}, window = {}, staticimage = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function ( ) GUIEditor.window[1] = guiCreateWindow(399, 280, 338, 303, "شراء الاسلحة", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1], false ) GUIEditor.edit[1] = guiCreateEdit(10, 93, 101, 32, "0", false, GUIEditor.window[1]) GUIEditor.staticimage[1] = guiCreateStaticImage(12, 32, 95, 56, ":guieditor/images/pp.png", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(14, 251, 87, 42, "شراء", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(111, 251, 87, 42, "اغلاق", false, GUIEditor.window[1]) end ) addEventHandler ( "onClientGUIClick", guiRoot, function ( ) local GetThata = guiGetText ( GUIEditor.edit[1] ) if ( source == GUIEditor.button[1] ) then triggerServerEvent ("BuyWep", localPlayer, GetThata) elseif ( source == GUIEditor.button[2] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) end end ) addEvent( "BuyWep", true ) addEventHandler("BuyWep", root, function ( GetThata ) local GetMy = getPlayerMoney ( source ) if ( GetMy >= 3000 ) then takePlayerMoney ( source, 3000 ) giveWeapon( source, 31, GetThata ) outputChatBox(" تم اعطاءك سلاح", source, 255, 0 ,0 , true) end end ) جرب ؟
  7. مافهمت وضح + بدل ماتسوي guiSetVisible ( GUIEditor.label[4], false ) guiSetVisible ( GUIEditor.label[5], false ) guiSetVisible ( GUIEditor.label[6], false ) guiSetVisible ( GUIEditor.label[7], false ) guiSetVisible ( GUIEditor.label[8], false ) guiSetVisible ( GUIEditor.label[9], false ) guiSetVisible ( GUIEditor.label[23], false ) guiSetVisible ( GUIEditor.label[21], false ) guiSetVisible ( GUIEditor.label[22], false ) guiSetVisible ( GUIEditor.label[11], false ) تقدر تختصر اخفائهم ب الوب تقدر كذا : for i,v in ipairs ( GUIEditor ) do guiSetVisible ( v, false ) end
  8. Events : 'onClientGUIClick' Functions : guiSetText
  9. Root = يجيب جميع الالمنتات وهو اختصار getRootElement Source = للاعب الي دخل او ضغط او الي سوا الحدث يعني نفس addEventHandler ( "onPlayerJoin", root, function ( ) kickPlayer (source,"Dont Join Again LOL") end ) طبعا هذا فقط مثال لا اكثر
  10. # .. مشكورين + ابي فنكشنات اذا عندي ايديت مايقدر يحط مسافة # .. او رموز مثل ^ & * %
  11. جرب كاتبه من الجوال : addEventHandler ( "onClientGUIClick", root, function ( ) local user = guiGetText(user) local pass = guiGetText(pass) local user1 = guiGetText(user1) local pass1 = guiGetText(pass1) if ( source == login ) then if user ~= "" and pass ~= "" then if guiCheckBoxGetSelected(remember) then triggerServerEvent("onRequestLogin",localPlayer,user,pass) else triggerServerEvent("onRequestLogin",localPlayer,user,pass) end else outputChatBox("* You Must Write Username Or Password",255,0,0) end elseif ( source == reg ) then if user1 ~= "" and pass1 ~= "" then triggerServerEvent("onRequestRegister",localPlayer,user1,pass1) else outputChatBox("* You Must Write Username Or Password",255,0,0) end end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( guiCheckBoxGetSelected ( chechbox ) == false ) then local Music = playSound ("SoundName") outputChatBox ( "Sound Played !", 255, 255, 0, true ) else stopSound ( Music ) outputChatBox ( "Sound Stopped !", 255, 255, 0, true ) end end )
  12. جرب : Soundss = true addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == login ) then local user = guiGetText(user) local pass = guiGetText(pass) local user1 = guiGetText(user1) local pass1 = guiGetText(pass1) if user ~= "" and pass ~= "" then if guiCheckBoxGetSelected(remember) then triggerServerEvent("onRequestLogin",localPlayer,user,pass) else triggerServerEvent("onRequestLogin",localPlayer,user,pass) end else outputChatBox("* You Must Write Username Or Password",255,0,0) end elseif ( source == reg ) then if user1 ~= "" and pass1 ~= "" then triggerServerEvent("onRequestRegister",localPlayer,user1,pass1) else outputChatBox("* You Must Write Username Or Password",255,0,0) end end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( guiCheckBoxGetSelected ( chechbox ) ) then if ( Soundss == true ) then local Music = playSound ("SoundName") Soundss = false else stopSound ( Music ) Soundss = true end end end )
  13. جرب : Soundss = true if ( guiCheckBoxGetSelected ( chechbox ) ) then if ( Soundss == true ) then local Music = playSound ("SoundName") Soundss = false else stopSound ( Music ) Soundss = true end end
  14. مو حاب اطلع من مسار الموضوع لاكن في توقيعك مكتوب Lua Programmer 40% وهذا يعني انك تعرف لغة Mta كاملة لان MTA تستخدم نص لغة Lua
  15. viewtopic.php?f=165&t=87662 طريقة تثبيت لوحة Open Game Panel
  16. جرب : GUIEditor = { window = {} } local TheKey = "F6" -- الزر لفتح النافذة addEventHandler("onClientResourceStart", resourceRoot, function ( ) GUIEditor.window[1] = guiCreateWindow(283, 187, 264, 144, "لوحة الانتقلات", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.96) guiSetVisible (GUIEditor.window[1],false) d = guiCreateButton(20, 39, 221, 32, "الدائري", false, GUIEditor.window[1]) n = guiCreateButton(20, 89, 221, 32, "النخيل", false, GUIEditor.window[1]) end ) addEventHandler("onClientGUIClick", root, function ( ) if ( source == d ) then setElementPosition(source,2084.2399902344,2215.6501464844,10.8203125) setElementRotation (localPlayer, x, y, z ) end end ) guiSetProperty(d,"NormalTextColour", "FF00FF00") addEventHandler("onClientGUIClick", root, function ( ) if ( source == n ) then setElementPosition(localPlayer,-3301.8640136719,-3004.1335449219,12.49062538147) setElementRotation (localPlayer, x, y, z ) end end ) guiSetProperty(n,"NormalTextColour", "FF00FF00") bindKey (TheKey, "down", function ( ) guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) وبالنسبة ل setPedRotation هذي وضيفة مهملة شوف ساينتكس setElementRotation
  17. 8/10 كبداية الي ماعجبني فيها انها صغيرة
  18. مششكورين + ابي فنكشنات يفتح الوحة من صغيرة الى كبيرة يعني تفتح الوحة وهي صغيرة وبعدها تكبر كل شوي
×
×
  • Create New...