-
Posts
4,805 -
Joined
-
Last visited
-
Days Won
10
Everything posted by فاّرس
-
ممكن من التريقر , جرب, -- Client Side # 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 = 'Set skin', width = 250, x = -20, y = 0.3, controls = { { 'lst', id='skinlist', width=230, height=290, columns={ {text='Skin', attr='name'} }, rows={xml='skins.xml', attrs={'id', 'name'}}, onitemclick=showSkinID, onitemdoubleclick=applySkin }, {'txt', id='skinid', text='', width=50}, {'btn', id='set', onclick=applySkin}, {'btn', id='close', 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 = 'Set animation', width = 250, x = -20, y = 0.3, controls = { { 'lst', id='animlist', width=230, height=290, columns={ {text='Animation', attr='name'} }, rows={xml='animations.xml', attrs={'name'}}, expandlastlevel=false, onitemdoubleclick=applyAnimation }, {'btn', id='set', onclick=applyAnimation}, {'btn', id='stop', onclick=stopAnimation}, {'btn', id='close', 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 = 'Give weapon', width = 250, controls = { { 'lst', id='weaplist', width=230, height=280, columns={ {text='Weapon', 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='add', onclick=addWeapon}, {'btn', id='close', 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('You must have the CJ skin set in order to apply clothes.') 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 = { 'wnd', text = 'Clothes', x = -20, y = 0.3, width = 350, controls = { { 'lst', id=
-
الحين المشكله هي انه لو اثنين جنبك تنزل سيارتي ولو ثلاثه تنزل ثلاث سيارات؟
-
ههههههههههههههههههههه ي الجندي هههههههههههههههههه يالمخبر http://www.almaany.com/home.php?word=snitch
-
^ كنت عارف عشان كذا فتحت الصفحه وخليتها لين طلع الصوت لول وحبيت انبهك انه ما يجوز ترويع المسلم.
-
Yes,i know. Use math.abs. Ex : addCommandHandler('change',function() local text = guiGetText(edit) if text:find('-') then guiSetText(edit,math.abs(text)) end end )
-
Extreme123 Punk-@ss B*tch > Extreme123 Punk-@ss Bitch iAbohanab~> Pimp قواد ؟ تم حذف Poot-butt مو عيب؟ Mr.Pres[T]ege Monster مسخ؟ #|=x=|K!NG|=x=|# Hustler محتال ؟ #♡ ZĂ7Ḟ Road Dawg شارع دوج خخخخخخخخخخخ
-
جرب كذا, -- Client Side # addEventHandler('onClientResourceStart',resourceRoot,function() setElementData(localPlayer,'Finish',true) end ) -- Server Side # exports.scoreboard:addScoreboardColumn('tag') addEventHandler("onPlayerChat",root, function (msg,type) if type == 0 then if getElementData(source,'Finish') == true then local name = getElementData(source,"tag") or getPlayerName(source) local acc = getAccountName(getPlayerAccount(source)) if ( isObjectInACLGroup("user." .. acc,aclGetGroup("Console")) ) then cancelEvent() outputChatBox("[ Server Owner ] " .. name .. " : #ffffff" .. msg,root, math.random(0,255), math.random(0,255), math.random(0,255), true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Head.Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Head.Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Big.Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Big.Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("SuperModerator")) ) then cancelEvent() outputChatBox("#00ff00* [ SuperModerator ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 1")) ) then cancelEvent() outputChatBox("#330033* [ʟɛʋɛʟ.1] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 2")) ) then cancelEvent() outputChatBox("#7D1B7E* [ʟɛʋɛʟ.2] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 3")) ) then cancelEvent() outputChatBox("#827B60* [ʟɛʋɛʟ.3] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 4")) ) then cancelEvent() outputChatBox("#E78A61* [ʟɛʋɛʟ.4] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 5")) ) then cancelEvent() outputChatBox("#15317E* [ʟɛʋɛʟ.5] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Moderator")) ) then cancelEvent() outputChatBox("#0069c7* [ Moderator ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("V.I.P")) ) then cancelEvent() outputChatBox("#999999* [ V.I.P ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Eveyone")) ) then cancelEvent() outputChatBox("" .. name .. " : #ffffff" .. msg,root,255,0,0,true) end else cancelEvent() local name = getElementData(source,"tag") or getPlayerName(source) outputChatBox('* Downloader =>'..name..' : '..msg,root,255,0,0,true) end end end ) Edit # > cancelEvent()
-
onPlayerJoin setElementData getElementData اظن في موضوع انطرح دور له
-
اول شيء حط كود رندر ودي اكس وقال ابي bindKey والكلام يظهر ورد جعفر وحط نقاط وبعدين رد نفس الرد وعدله -__-"
-
اي عارف لكن كل واحد وله ظروفه ممكن يكون مشغول او مو بالبيت انا امس كنت فاضي بس اوقات تكون نايم... وياريت تعدل الموضوع وتكتب تمت الافاده.
-
متأكد انك تقصدني انا ؟ اقول النسخ واللصق لك واشكالك يا حلو قال ايش قال نسخ ولصق مناك بس Edit # Mr.KING_# الافضل ما تذكر اسماء في العنوان , في ناس تقدر تسآعد
-
لا الكود بيضبط % 100 client : The client class represents any client that has connected to the server. This can be a player or the console. All client functions can operate on both player and server console elements. بإختصار هي تحطها وقت ترسل تريقر لوكل من الكلنت, triggerServerEvent ( "RemoveData", localPlayer )
-
مثل ما قلت لك تفرق الشاشات جرب كذا, -- Client Side # x3NAD = { xLocation = { ["right"] = { 1 }; ["left"] = { 10 }; ["center"] = { 2 }; }; yLocation = { ["up"] = { 10 }; ["down"] = { 1 }; ["center"] = { 2 }; }; }; guiSetLocation = function ( gui, Horizontal, Vertical ) local screenW, screenH = guiGetScreenSize ( ) local windowW, windowH = guiGetSize ( gui, false ) if Horizontal and Vertical then local x, y = tonumber ( x3NAD.xLocation[Horizontal][1] ) or 2, tonumber ( x3NAD.yLocation[Vertical][1] ) or 2 local x, y = ( screenW -windowW ) /x, ( screenH -windowH ) /y guiSetPosition ( gui, x, y, false ) end end GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(296,183,182,291,"Airport v1.0 By MR.KING",false) guiSetLocation(GUIEditor_Window[1],'center','center') guiSetAlpha(GUIEditor_Window[1],1) guiSetVisible(GUIEditor_Window[1], false) GUIEditor_Button[1] = guiCreateButton(0.1, 0.1, 0.9, 0.1,"CIT 1",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.1, 0.3, 0.9, 0.1,"CIT 2",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.1, 0.5, 0.9, 0.1,"CIT 3",true,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(0.1, 0.7, 0.9, 0.1,"خروج",true,GUIEditor_Window[1]) addEventHandler('onClientGUIClick',root,function() if source == GUIEditor_Button[1] then setElementPosition(localPlayer,1685.6872558594,-2333.2932128906,-2.6796875) guiSetVisible(GUIEditor_Window[1],false) showCursor(false) elseif source == GUIEditor_Button[2] then setElementPosition(localPlayer,1713.2843017578,1598.498046875,10.171875) guiSetVisible(GUIEditor_Window[1],false) showCursor(false) elseif source == GUIEditor_Button[3] then setElementPosition(localPlayer,-1381.6556396484,-215.08587646484,14.1484375) guiSetVisible(GUIEditor_Window[1],false) showCursor(false) elseif source == GUIEditor_Button[4] then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end ) addEvent('window',true) addEventHandler('window',root,function() if not guiGetVisible(GUIEditor_Window[1]) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end ) ممكن تضبط وممكن لا,
-
حبيبي الشاشات تختلف من واحد لآخر في ناس حاطه الشاشه كبيره وناس صغيره وناس وسط, عشان كذا تختلف الاحداثيات...
-
اخوي انا متأكد انه من الاحداثيات مثلا لو بدلت الزر الاول بهذا, GUIEditor_Button[1] = guiCreateButton(0.7, 0.1, 0.2, 0.1,"CIT 1",true,GUIEditor_Window[1]) راح تلاحظ انه ظهر !
-
اطرح مشكلتك هنا, بالانقليزي طبعا viewforum.php?f=104
-
انت سوي بس نافذه وازرار واذا خلصت بس بدل النافذه والازرار بالي في الكود
