Jump to content

فاّرس

Members
  • Posts

    4,805
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by فاّرس

  1. آستخدم الكول شيب افضل. + createProjectile + setTimer + bindKey
  2. الححين ,, dxDrawText ^ أبيه اذا حرك اللاعب الماوس يرسم خطط ع الشاششه,,
  3. You want onPlayerLogout save score ?
  4. بدون ما اجرب... اكيد ما راح يشتغل,, لان "" يعتبر اسم للزر واذا كان كذا "" راح يكون زر بدون اسم و ..Name كأنك تبي تجيب شيء مثل ..getPlayerName الاكواد الي فوق احسن,,
  5. وش الي تشوفه اسهل من هذول ؟
  6. طيب انا الحين ابي اختصر اشياء مثلآ ,, button = guiCreateButton(131,163,113,46,"Test",false,window) لـ : button = guiCreateButton(131,163,113,46,Name,false,window) Name = "Test" طيب أبيها بملف لوحدهآ واذا غيرها تتغير من الملف الاصلي,, تقصد تبي تسوي مفكرة خارجية .. وتكتب الي تبي تحطه بالزر .. وتلقائياً يتغير بملف الكلنت وكذا ؟ بالضبطط,,
  7. ^ يعني عندك ملف كلنت تبي تشفره,, وتبي الناس تغير الزر واسماء الازرار... سويت ملف Test.lua آبي يكون Name = "Test" يكون في هذا الملف ,, بس سويتها وخرب,,
  8. طيب انا الحين ابي اختصر اشياء مثلآ ,, button = guiCreateButton(131,163,113,46,"Test",false,window) لـ : button = guiCreateButton(131,163,113,46,Name,false,window) Name = "Test" طيب أبيها بملف لوحدهآ واذا غيرها تتغير من الملف الاصلي,,
  9. ^ يعطيكم العافيهه,, + هذي الطريقه ما تنفع مع الماركرات وو..., آبي طريقه مختصره لهم,,
  10. bool triggerClientEvent ( [element sendTo=getRootElement()], string name, element theElement, [arguments...] ) function meuteste() triggerClientEvent ( root,"MeuEvento", root ) end addCommandHandler ( "teste", meuteste ) --[[ triggerClientEvent "chama" um evento do lado do client, no nosso caso o evento que criamos é "chamado" pelo server addCommandHandler é ativado quando digitamos algum comando com "/" nosso caso /teste depois de digitarmos tal comando uma função é "chamada", o nome da nossa função é meuteste]]-- -- resumindo quando digitarmos o comando teste nossa função ativara um evento que criara um som!
  11. ^عآرف انه خطأ + اصلآ بس كنت ابي الطريقه لا اكثثر,, + ابي شرح بسيط لـ الجدآول مآبي احد يقولي موضوع بوو,, آبي شرح لهذآ بس:: كود برستيجج,, local ID = { [1] = {x,y,width,height,"Test[1]"}, [2] = {x,y,width,height,"Test[2]"} } for _,v in ipairs ( ID ) do Button = guiCreateButton(v[1],v[2],v[3],v[4],v[5],false) end اقدر آغير ID ,؟ + v[1],.... لازم اضيف v,?
  12. ^ يعطيكم العآفيهه,, + متى بيحطون فديوهات في جراند
  13. ^ يعطيك العافيهه,, + الكود هذآ : local spawnVeh = spawnVehicle ( RaceVehicle, x+3, y+3, z ) الكود بس لسياره محدده,انا ابيه لكل السيارات, + ابي كود حذف السيارة, يعني ماركر يدخل الساحه بالموتر ينسحب,,
  14. isMove = false bindKey("الزر", "down", function() if isMove then return end if guiGetVisible( wnd ) then guiSetVisible(wnd, false) showCursor(false) else guiSetPosition(wnd, -300, 54, false) guiSetVisible(wnd, true) showCursor(true) if isTimer(Time) then return end Time = setTimer(function() local x, y = guiGetPosition(wnd, false) guiSetPosition(wnd, x + 13, y, false) end, 50, 50) isWindowMove(true) setTimer(isWindowMove, 100, 1, false) end end ) function isWindowMove(bole) isMove = bole end بدل سطر 18,,صعب؟ يعني هو كذآ : guiSetPosition(wnd, x + 13, y, false) يصير كذا : guiSetPosition(wnd, x, y + 13, false)
  15. اظهار / اخفاء النافذه بشويش...
  16. اكتب في خانه البحث ع اليسار الكود, مثلا setElementFrozen راح تطلع لك الموآضيعع,, + هو حط مثال على لبل,,ما تعرف تسويه على نافذه؟
  17. function open() if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible (GUIEditor_Window[1], false) showCursor(false) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then guiSetVisible (GUIEditor_Window[1] , true) showCursor(true) guiSetInputEnabled(true) end end bindKey("F5","down",open)
  18. تحريك النافذه .. اظهار / اخفاء النافذه بشويش...
  19. يعطيك العافيهه,,, المهم بغيت كود اذا ضغطت كلك يمين يكسر الشيء,, مثلا سياره,, اذا ضغطت كلك يمين يتكسر القزاز ....
  20. ( w/2, h/2, 10 ) آحدآثيات وش؟؟ ما لها شرح بالويكي,,
  21. دوره تستحق التثبيت,, وآصل بدون فوآصل,, جآي عشان يقولك مشكور في الموضوع الجاي
  22. بعد تخبيص طلع معي كذآ addEventHandler("onClientCursorMove",root, function(commandName, posX, posY, posZ) setElementPosition ( getLocalPlayer(), 1801.8786621094, 840.96112060547, 10.650852203369 ) end )
  23. font = guiCreateFont("font.ttf", 12) function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "FAHAD.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end CONTROL_MARGIN_RIGHT = 5 LINE_MARGIN = 5 LINE_HEIGHT = 16 g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_Me = getLocalPlayer() server = createServerCallInterface() guiSetInputMode("no_binds_when_editing") --------------------------- -- Set skin window --------------------------- function skinInit() setControlNumber(wndSkin, 'skinid', getElementModel(g_Me)) end function showSkinID(leaf) if leaf.id then setControlNumber(wndSkin, 'skinid', leaf.id) end end function applySkin() local skinID = getControlNumber(wndSkin, 'skinid') if skinID then server.setMySkin(skinID) fadeCamera(true) end end wndSkin = { 'wnd', text = 'شخصية ', width = 250, x = -20, y = 0.3, controls = { { 'lst', id='skinlist', width=230, height=290, columns={ {text='شخصية', attr='name'} }, rows={xml='skins.xml', attrs={'id', 'name'}}, onitemclick=showSkinID, onitemdoubleclick=applySkin }, {'txt', id='skinid', text='', width=50}, {'btn', id='تعيين', onclick=applySkin}, {'btn', id='X', closeswindow=true} }, oncreate = skinInit } function setSkinCommand(cmd, skin) skin = skin and tonumber(skin) if skin then server.setMySkin(skin) fadeCamera(true) closeWindow(wndSpawnMap) closeWindow(wndSetPos) end end addCommandHandler('setskin', setSkinCommand) addCommandHandler('ss', setSkinCommand) --------------------------- --- Set animation window --------------------------- function applyAnimation(leaf) if type(leaf) ~= 'table' then leaf = getSelectedGridListLeaf(wndAnim, 'animlist') if not leaf then return end end server.setPedAnimation(g_Me, leaf.parent.name, leaf.name, true, true) end function stopAnimation() server.setPedAnimation(g_Me, false) end wndAnim = { 'wnd', text = 'حركات ', width = 250, x = -20, y = 0.3, controls = { { 'lst', id='animlist', width=230, height=290, columns={ {text='حركات', attr='name'} }, rows={xml='animations.xml', attrs={'name'}}, expandlastlevel=false, onitemdoubleclick=applyAnimation }, {'btn', id='تشغيل', onclick=applyAnimation}, {'btn', id='ايقاف', onclick=stopAnimation}, {'btn', id='X', closeswindow=true} } } addCommandHandler('anim', function(command, lib, name) server.setPedAnimation(g_Me, lib, name, true, true) end ) --------------------------- -- Weapon window --------------------------- function addWeapon(leaf, amount) if type(leaf) ~= 'table' then leaf = getSelectedGridListLeaf(wndWeapon, 'weaplist') amount = getControlNumber(wndWeapon, 'amount') if not amount or not leaf then return end end server.giveMeWeapon(leaf.id, amount) end wndWeapon = { 'wnd', text = 'أدوات ', width = 250, controls = { { 'lst', id='weaplist', width=230, height=280, columns={ {text='أدوات', attr='name'} }, rows={xml='weapons.xml', attrs={'id', 'name'}}, onitemdoubleclick=function(leaf) addWeapon(leaf, 500) end }, {'br'}, {'txt', id='amount', text='500', width=60}, {'btn', id='اضافة', onclick=addWeapon}, {'btn', id='X', closeswindow=true} } } function giveWeaponCommand(cmd, weapon, amount) weapon = tonumber(weapon) or getWeaponIDFromName(weapon) if not weapon then return end amount = amount and tonumber(amount) or 500 server.giveMeWeapon(math.floor(weapon), amount) end --addCommandHandler('give', giveWeaponCommand) --addCommandHandler('wp', giveWeaponCommand) --------------------------- -- Fighting style --------------------------- addCommandHandler('setstyle', function(cmd, style) style = style and tonumber(style) if style then server.setPedFightingStyle(g_Me, style) end end ) --------------------------- -- Clothes window --------------------------- function clothesInit() if getElementModel(g_Me) ~= 0 then errMsg('يجب ان تستخدم شخصية سي جي لكي تدخل القائمة') closeWindow(wndClothes) return end if not g_Clothes then triggerServerEvent('onClothesInit', g_Me) end end addEvent('onClientClothesInit', true) addEventHandler('onClientClothesInit', g_Root, function(clothes) g_Clothes = clothes.allClothes for i,typeGroup in ipairs(g_Clothes) do for j,cloth in ipairs(typeGroup.children) do if not cloth.name then cloth.name = cloth.model .. ' - ' .. cloth.texture end cloth.wearing = clothes.playerClothes[typeGroup.type] and clothes.playerClothes[typeGroup.type].texture == cloth.texture and clothes.playerClothes[typeGroup.type].model == cloth.model or false end table.sort(typeGroup.children, function(a, b) return a.name < b.name end) end bindGridListToTable(wndClothes, 'clothes', g_Clothes, false) end ) function clothListClick(cloth) setControlText(wndClothes, 'addremove', cloth.wearing and 'remove' or 'add') end function applyClothes(cloth) if not cloth then cloth = getSelectedGridListLeaf(wndClothes, 'clothes') if not cloth then return end end if cloth.wearing then cloth.wearing = false setControlText(wndClothes, 'addremove', 'add') server.removePlayerClothes(g_Me, cloth.parent.type) else local prevClothIndex = table.find(cloth.siblings, 'wearing', true) if prevClothIndex then cloth.siblings[prevClothIndex].wearing = false end cloth.wearing = true setControlText(wndClothes, 'addremove', 'remove') server.addPedClothes(g_Me, cloth.texture, cloth.model, cloth.parent.type) end end wndClothes =
  24. آنآ مسويه كذآ g_ResRoot وشغآل,,
×
×
  • Create New...