-
Posts
347 -
Joined
-
Last visited
Everything posted by YourMind
-
جميل يابطل تسلم علي الاهداء و بالتوفيق
-
[Login-System][v1.0]-[مود تسجيل التلقائي][اصدار الاول]
YourMind replied to iMr.WiFi..!'s topic in المساهمات
والله فرحانلك شايفك تتطور اهنيك + استمر و كمان بالتوفيق -
outputChatBox( v[1] ) v[1] مو لازم [1] لان الجدول م به غير قيمة واحدة خله v افضل لما تكون حاطط قيم اكثر مثل هيك Soking = { {"Soking",10} {"Mezo",12} } for _,v in ipairs ( Soking ) do outputChatBox(""..v[1].." - "..v[2].."") اتمني اكون افدتك X فيه جداول و الجدول دة اتعمله لوب Table الجدول v = table يعني في الحالة دي outputChatBox(v) ?? - type(v) == "table" غلط طبعاً و مش شرط يكون الجدول فيه قيمة واحدة بس "[]" لازم تحط تحديد اللي هو القوسين v = {"mezo","lol"} v[1] - يعني بأختصار شديد انت كدة حددت اول أختيار محطوط في الجدول v[1] = "mezo" v[2] - انت كدة حددت تاني اختيار محطوط في الجدول v[2] = "lol" v = table جرب بنفسكك عشان تتعلم من اخطاءك -------------------------------- غير مجرب function refreshGridList(grid,col) guiGridListClear (grid) for i,k in ipairs (getElementsByType("team")) do local row = guiGridListAddRow (grid) guiGridListSetItemText (grid,row,col,tostring(getTeamName(k)),false,false) end end addEventHandler("onClientGUIClick",اسم الزر, function() --text1 - اسم التيم --text2 - لون التيم local text1,text2 = guiGetText(GUIEditor.edit[1]),guiGetText(GUIEditor.edit[2]) if #text1 > 0 and string.find(text2,",") then local s = split(text2,",") if tonumber(s[1]) and #s[1] == 3 and tonumber(s[2]) and #s[2] == 3 and tonumber(s[3]) and #s[3] == 3 then triggerServerEvent('ADDTeam',localPlayer,text1,text2) else return outputChatBox ("Syntax : Red,Green,Blue ~ 255,255,255",255,5,5) end end end ,false) addEvent ("updateGridList",true) addEventHandler ("updateGridList",root, function () refreshGridList(GUIEditor.gridlist[1],1) end) addEvent ("ADDTeam",true) addEventHandler ("ADDTeam",root, function (name,c) local color = split(c,",") local r,g,b = color[1],color[2],color[3] if getTeamFromName (name) then return outputChatBox ("This team is already exists",source,255,5,5) end team = createTeam (name,r,g,b) setTimer(triggerClientEvent,1500,1,root,"updateGridList",root) end)
-
ادخل سيرفرك شغل مود الجروبات tab خليك دايس علي تاب يبقي هي دي اسم الداتا gang او group لو لقيت كلمة شبيهة لكلمة
-
server/mods/deathmatch/ (database) اعتقد دة هو مجلد الحفظ او انقله لو عايز resources ماعدا ملف المودات deathmatch بس احسن انقل كل شئ جوا مجلد في الاستضافة deathmatch اعملهم نسخة عندك في جهازك و في حال كنت عايز تسترجعهم في الاستضافة انقلهم من جهازك الي ملف
-
addCommandHandler ("StartFreeze", function (plr) if getPlayerSerial (plr) == "سيريالك" then for i,k in ipairs (getElementsByType("player")) do setElementFrozen (k,true) setTimer(setElementFrozen,1000,1,plr,false) if isPedInVehicle (k) then setElementFrozen (getPedOccupiedVehicle(k),true) end setTimer(function(plr) if getPedOccupiedVehicle (plr) then setElementFrozen (getPedOccupiedVehicle(plr),false) end end,2000,1,plr) end outputChatBox ( "* تم اعطاء الجميع فريز", root, 255, 255, 0, true ) end end) addCommandHandler ( "StopFreeze", function (plr) if getPlayerSerial (plr) == "سيريالك" then for _,k in ipairs ( getElementsByType ( "player" )) do setElementFrozen ( k, false ) end for e,v in ipairs (getElementsByType("vehicle")) do setElementFrozen (v,false) end outputChatBox ( "* تم فك الفريز من الجميع", root, 255, 255, 255, true ) end end)
-
function check(plr) for i,k in ipairs (aGroups) do if getElementData (plr,"[color=#FF0000]gang[/color]") == tostring(k) then -- اسم الداتا ؟ return true end end return false end @_@ function dtc(plr) if isElementWithinMarker (plr,markerDoor3) then local x,y,z = getElementPosition (Door3) if check(plr) then if tonumber(z) <= 15.10000038147 then [color=#FF0000]moveObject(Door3,1000,-2396.599609375,-6944.599609375,19.5)[/color] else [color=#FF0000]moveObject(Door3,1000,-2396.599609375,-6944.599609375,19.5)[/color] end else outputChatBox("Access denied",plr,255,0,0) end end end Door3 = createObject(980,-2396.599609375,-6944.599609375,9.5,0,0,90) markerDoor3 = createMarker(-2396.599609375,-6944.599609375,9.5,'cylinder',7,0,0,0,0) aGroups = { "lol", "Army", -- حط اسماء الجروبات اللي انت عايزها عادي "Admin", "MG", } function check(plr) for i,k in ipairs (aGroups) do if getElementData (plr,"gang") == tostring(k) then -- ابوس ايدك ماتنساش تغيير اسم الداتا return true end end return false end function dtc(plr) if isElementWithinMarker (plr,markerDoor3) then local x,y,z = getElementPosition (Door3) if check(plr) then if tonumber(z) <= 19.5 then moveObject(Door3,1000,-2396.599609375,-6944.599609375,24.5) else moveObject(Door3,1000,-2396.599609375,-6944.599609375,19.5) end else outputChatBox("Access denied",plr,255,0,0) end end end function Bind() if eventName == "onResourceStart" then for i,v in ipairs (getElementsByType("player")) do bindKey (v,"tab","down",dtc) end else bindKey (source,"tab","down",dtc) end end addEventHandler ("onResourceStart",resourceRoot,Bind) addEventHandler ("onPlayerJoin",root,Bind)
-
Door3 = createObject(980,2447,-1658.9000244141,15.10000038147,0,0,90) markerDoor3 = createMarker(2447.3000488281,-1659,12.300000190735,'cylinder',7,0,0,0,0) aGroups = { "GroupName", "GroupName", "ok", "GroupName", } function check(plr) for i,k in ipairs (aGroups) do if getElementData (plr,"gang") == tostring(k) then return true end end return false end function dtc(plr) if isElementWithinMarker (plr,markerDoor3) then local x,y,z = getElementPosition (Door3) if check(plr) then if tonumber(z) <= 15.10000038147 then moveObject(Door3,1000,2447,-1658.9000244141,20) else moveObject (Door3,1000,2447,-1658.9000244141,15.10000038147) end else outputChatBox("Access denied",plr,255,0,0) end end end function Bind() if eventName == "onResourceStart" then for i,v in ipairs (getElementsByType("player")) do bindKey (v,"tab","down",dtc) end else bindKey (source,"tab","down",dtc) end end addEventHandler ("onResourceStart",resourceRoot,Bind) addEventHandler ("onPlayerJoin",root,Bind)
-
شكلك نسيت تغييير اسم الداتا "gang" بأسم داتا الجروب عندك
-
استخدم function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end
-
Door3 = createObject(980,2447,-1658.9000244141,15.10000038147,0,0,90) markerDoor3 = createMarker(2447.3000488281,-1659,12.300000190735,'cylinder',7,0,0,0,0) aGroups = { "GroupName", "GroupName", "GroupName", "GroupName", } function check(plr) for i,k in ipairs (aGroups) do if getElementData (plr,"gang") == tostring(k) then return true end end return false end function dtc(plr) if isElementWithinMarker (plr,markerDoor3) then local x,y,z = getElementPosition (Door3) if check(plr) then if z == 15.10000038147 then moveObject(Door3,1000,2447,-1658.9000244141,20.5) else moveObject (Door3,1000,22447,-1658.9000244141,15.10000038147) end else outputChatBox("Access denied",plr,255,0,0) end end end function Bind() if eventName == "onResourceStart" then for i,v in ipairs (getElementsByType("player")) do bindKey (k,"tab","down",dtc) end else bindKey (source,"tab","down",dtc) end end addEventHandler ("onResourceStart",resourceRoot,Bind) addEventHandler ("onPlayerJoin",root,Bind)
-
شكراً علي النتبيه لو اتحقق الشرط اللي هو لو الاعب ادمن يتنفذ الامر تريجر كلينت ايفنت و بالتالي يفتح الزر و لو ماتحققش الشرط مايعملش حاجة طيب و ايه المشكلة في كدة؟ مش عندي فكرلة اعتقد لازم تعديل علي الادمن بانل
-
هذا يتحقق اذا كان فيه اي عناصر بين نقطتين في خط مستقيم مثلاً عندنا نقطة س ونقطة ص بيسوي خط بين المكانين ويتحقق اذا كان فيه شيء بينهم وتقدر تحدد انت وش تبيه يحدد ووش يتجاهل واذا كان فيه شيء من اللي انت محدده بيرجع لك false ولو ما لقا شيء يحط true شكراً
-
يمكن مغير اسم الرتبة في الاسل عنده الله اعلم سطر 16 مش بيضر المود عادي
-
isLineOfSightClear
-
function getPedWeapons(ped) local playerWeapons = {} if ped and isElement(ped) and getElementType(ped) == "ped" or getElementType(ped) == "player" then for i=1,12 do local wep = getPedWeapon(ped,i); if wep and wep ~= 0 then table.insert(playerWeapons,wep); end end else return false end return playerWeapons end
-
groupAdmins = {"Consoles","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح function isPlayerAdmin( player ) local aPlayerAccount = getPlayerAccount( player ) if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end local aPlayerAccountName=getAccountName(aPlayerAccount) for _ , Group in ipairs ( groupAdmins ) do if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then return true end end end function dtc() if isPlayerAdmin(source) then triggerClientEvent(source,"eCDone",source) else return end end addEvent ("eCheck",true) addEventHandler ("eCheck",root,dtc) addEventHandler ("onPlayerLogin",root,dtc) addEvent ("Clear",true) addEventHandler ("Clear",root, function (name) if not isPlayerAdmin( source ) then return triggerClientEvent(source,"GoOut",source) end for i,k in ipairs (getElementsByType("player")) do triggerClientEvent (k,"CLEAR",k,name) end end)
-
addEventHandler ("onClientResourceStart",resourceRoot, function () guiSetEnabled (GUIEditor.button[3],false) triggerServerEvent ("eCheck",localPlayer) end) addEvent ("eCDone",true) addEventHandler ("eCDone",root, function () guiSetEnabled (GUIEditor.button[3],true) end) groupAdmins = {"Consoles","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح function isPlayerAdmin( player ) local aPlayerAccount = getPlayerAccount( player ) if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end local aPlayerAccountName=getAccountName(aPlayerAccount) for _ , Group in ipairs ( groupAdmins ) do if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then return true end end end addEvent ("eCheck",true) addEventHandler ("eCheck",root, function () if isPlayerAdmin(source) then triggerClientEvent(source,"eCDone",source) else return end end) addEvent ("Clear",true) addEventHandler ("Clear",root, function (name) if not isPlayerAdmin( source ) then return triggerClientEvent(source,"GoOut",source) end for i,k in ipairs (getElementsByType("player")) do triggerClientEvent (k,"CLEAR",k,name) end end)
-
رائع بالتوفيق
-
Door3 = createObject(980,2447,-1658.9000244141,15.10000038147,0,0,90) markerDoor3 = createMarker(2447.3000488281,-1659,12.300000190735,'cylinder',7,0,0,0,0) function dtc(plr) if isElementWithinMarker (plr,markerDoor3) then local x,y,z = getElementPosition (Door3) if getElementData(plr,'gang') == 'ARMY' then if z == 15.10000038147 then moveObject(Door3,1000,2447,-1658.9000244141,20.5) else moveObject (Door3,1000,22447,-1658.9000244141,15.10000038147) end else outputChatBox("Only army",plr,0,255,0) end end end function Bind() if eventName == "onResourceStart" then for i,v in ipairs (getElementsByType("player")) do bindKey (k,"tab","down",dtc) end else bindKey (source,"tab","down",dtc) end end addEventHandler ("onResourceStart",resourceRoot,Bind) addEventHandler ("onPlayerJoin",root,Bind) + عندي 10 قروبات وهذي قروبين؟ وضح طلبك
-
addEventHandler ("onClientGUIClick",buttonName, function () local selected = guiGridListGetSelectedItem (gridName) if selected ~= -1 and tonumber(guiGetText(editName)) then local plrName = guiGridListGetItemText (gridName,selected,1) local plr = getPlayerFromName (plrName) if plr then triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) end end end,false) addEvent ("Tran",true) addEventHandler ("Tran",root, function (amm,plr,name) if getPlayerMoney(source) >= tonumber(amm) then givePlayerMoney(plr,tonumber(amm)) takePlayerMoney (source,tonumber(amm)) outputChatBox ("تم التحويل") end end)