Jump to content

iMr.SFA7

Members
  • Posts

    2,013
  • Joined

  • Last visited

Everything posted by iMr.SFA7

  1. لأنك غيرت اسم الماركر !! WiFiDerbyMarker = createMarker(1555.50037, -1675.64880, 16.19531, "arrow", 1.1, 255, 0, 0, 170 ) addEventHandler('onMarkerHit', sfa7DerbyMarker, function(element) . حطه اسم واحد
  2. xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if string.find(getPlayerName(source), '123') then if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(ForbiddenGroup)) then return outputChatBox("#",source,255,0,0,true); end local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,':') local hour = tonumber( data[1] ) if hour == nil or not tonumber(hour) then hour = 0 end if hour >= tonumber(Price) then revmoeOtherGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#"..Name,source,255,255,255,true) else outputChatBox("#",source,255,255,255,true) end else outputChatBox("يجب عليك وضع الشعار ليتم ترقيتك",source,255,0,0,true) end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) function revmoeOtherGroups ( element ) if ( element and isElement ( element ) ) then if ( getPlayerAccount ( element ) and not isGuestAccount ( getPlayerAccount ( element ) ) ) then for _, v in ipairs( aclGroupList ( ) ) do if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( element ) ), v ) ) then aclGroupRemoveObject ( v, "user."..getAccountName ( getPlayerAccount ( element ) ) ) end end end end end
  3. ---- --- انزل تحت ---- function checkDuel(p) if tostring(getElementData(resourceRoot,"map")) == "yes" then outputChatBox("*#ffffff [ #CD0000 DerbySystem #ffffff ]",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map")) == "no" then outputChatBox("*#FFFFFF [ #CD0000Derby #FFFFFF ] : الرجآء الانتظآر,حتى يبدء الديربي",p,255,255,0,true) if _mytimer and isTimer(_mytimer) then _r,_e,_t = getTimerDetails(_mytimer) if _r and _e and _t then total = _r / 60 / 1000 outputChatBox("تبقـى: "..math.ceil(total)) end end end return tostring(getElementData(resourceRoot,"map")) end
  4. بالنسبة للكود حقك ذا مداك تحطه كلنت فقط ليه كلنت وسيرفر؟ -- نحط هذا الكود عند المود addCommandHandler("OnClickPanel",function ( Plr ) -- نسوي عند كتابة كلمة في اف 8ونجيب اللاعب triggerClientEvent(Plr,"OnWin",Plr) -- نسوي ترايقر للكلنت end) -- Client addEvent("OnWin",true) -- نفعل الحدث addEventHandler("OnWin",root,function( ) -- نستقبله if guiGetVisible(اسم النافذة) == true then -- نتحقق اذا كانت النافذة موجودة guiSetVisible(اسم النافذة,false) -- اذا كانت موجودة بيقفل النافذة وبيلغي الماوس showCursor(false) else guiSetVisible(اسم النافذة,true) -- وهذا العكس showCursor(true) end end) التصحـيح مع الاختصـار: -- جانـب الكلنت-- addCommandHandler("OnClickPanel",function() guiSetVisible(not guiGetVisible(اسم النافذة)) showCursor(guiGetVisible(اسم النافذة)) end) وبالنسبة لكودك هذا wnd1 = guiCreateWindow(...) -- كما ذكرنا في سابق btn1 = guiCreateButton(...) -- ... guiSetVisible(wnd1,true) -- نفتح ال نافذة addEventHander("onClientGUIClick",root, -- حدث عند ضغط شيء ما function () -- وظيفة if source == btn1 then -- نتحقق انه ضغط btn1 guiSetVisible(wnd1,false) -- نقفل النافذة executeCommandHandler("onClickPanel",source) -- نستعمل كوماند onClickPanel end -- End لل تحقق end -- End لل فنكشن ) addEventHandler عندك خطأ في كتابة . مافيها أرقمنت لاعب بالكلنـت ولو قلنا أنه فيه أرقمنت فـ أنت حطيت أرقمنت اللاعب هو السورس والسورس هو الالمنت الي انضغط عليه executeCommandHandler والوظيفة التصحيح: -- جانب الكلنت -- addEventHandler( "onClientGUIClick", resourceRoot, function() if source == btn1 then guiSetVisible(wnd1,false) executeCommandHandler("onClickPanel") end end)
  5. وتحطها فيـه map.map وتجيب جميع الاوبجكتات الي انشأتها بالملف الي اسمه map.xml لازم تعـدل ع ملف اسمه
  6. أنا قـمت بالإضـافة من سطر 26 إلـى سطر 32 وقـمت بالتعديـل في السطر 116 وقمت بإضافـة متغـير للتايمـر وكذلك نفس الشيء في السطر 148 والسطر 151 وبالنسبة لتغيير الماب قلي كيف غيرته إيش بدلت؟
  7. spawns = {} setElementData(resourceRoot,"map","no") setElementData(resourceRoot,"winMoney","0") sfa7DerbyMarker = createMarker(x, y, z, "cylinder",1.5, 0, 255, 0 , 255 ) addEventHandler('onMarkerHit', sfa7DerbyMarker, function(element) if getElementType(element) == 'player' and checkDuel(element) == "prestart" and ( not checkExistPlrOnDuel(element) ) then online = countPlayersOnDerby() if tonumber(online) +1 < 32 then setData(element,"onCrossMap","yes") outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD} :الرجاء الانتظار ..",element,255,255,0,true) setD(element) spawnOnMap(element) else outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لم يبق مكان بالديـربي الرجآء, الانتظآر الديربي القآدم,",element,0,255,0,true) end end end) function checkDuel(p) if tostring(getElementData(resourceRoot,"map")) == "yes" then outputChatBox("* #ff0000≈ #ffffff[#ff0000 DerbySystem #ffffff ] #00BCCD≈",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map")) == "no" then outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : الرجآء الانتظآر,حتى يبدء الديربي",p,255,255,0,true) if _mytimer and isTimer(_mytimer) then _r,_e,_t = getTimerDetails(_mytimer) if _r and _e and _t then total = _r / 60 / 1000 outputChatBox("تبقـى: "..math.ceil(total)) end end end return tostring(getElementData(resourceRoot,"map")) end function checkExistPlrOnDuel(p) per = getElementData(p,"onCrossMap") if tostring(per) == "yes" then return true else return false end end function setData(element,key,vlr) setElementData(element,key,vlr) end function setD(element) setElementDimension(element,30) end function spawnOnMap(p) count = countPlayersOnDerby() spawned = "no" for i,data in pairs(spawns)do if tonumber(data.id) == tonumber(count) then spawned = "yes" v = createVehicle(411,data.x,data.y,data.z,data.rx,data.ry,data.rz) setElementDimension(v,30) setElementFrozen(v,true) setElementData(v,"creatorDerby","yes") break end end if spawned == "no" then randomS = math.random("1","32") for i,data in pairs(spawns)do if tonumber(data.id) == tonumber(randomS) then v = createVehicle(411,data.x,data.y,data.z,data.rx,data.ry,data.rz) setElementDimension(v,30) setElementFrozen(v,true) setElementData(v,"creatorDerby","yes") break end end end toggleControl(p,"enter_exit", false ) warpPedIntoVehicle(p,v) setCameraTarget(p,p) end function countPlayersOnDerby() c = -1 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 end end return tonumber(c) end function eventCheck () if checkExistPlrOnDuel(source) then toggleControl(source,"enter_exit",true ) setData(source,"onCrossMap","no") checkEnd() end end addEventHandler("onPlayerWasted",getRootElement(), eventCheck) addEventHandler("onPlayerQuit",getRootElement(),eventCheck) addEventHandler("onPlayerJoin",getRootElement(),function() outputChatBox("",source,255,255,0,true) setData(source,"onCrossMap","no") end) for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end function checkEnd() c = 0 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 winner = p end end if tonumber(c) == 1 then givePlayerMoney(winner,tonumber(getElementData(resourceRoot,"winMoney"))) n = string.gsub(getPlayerName(winner), "#%x%x%x%x%x%x", "") outputChatBox("* #ff0000≈[ #ff0000 " .. n .. " #FF9700 Won the Derby and win#00FF00 " .. tonumber(getElementData(resourceRoot,"winMoney")) .. "$ ##ff0000]≈",getRootElement(),255,255,0,true) setElementData(resourceRoot,"map","no") endDerby() _mytimer = setTimer(newDuel,60*1000*5,1) end end function newDuel() for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end setElementData(resourceRoot,"map","prestart") outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لدخول الديربي,اكتب في الشـآت ديربي.",getRootElement(),255,255,0,true) RMoney = math.random("50000","300000") setElementData(resourceRoot,"winMoney",tonumber(RMoney)) outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : سيحصل الفآئز في الديربي على #00FF00|" .. RMoney .. "|$",getRootElement(),0,255,0,true) setTimer(checkPlrs,30000,1) end function checkPlrs () c = 0 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 end end if tonumber(c) > 1 then setElementData(resourceRoot,"map","yes") for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then setElementCollisionsEnabled(getPedOccupiedVehicle( p),true) outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لقد بدآء الديربي , يمكنك الانطلاق",p,0,255,0,true) setElementFrozen(getPedOccupiedVehicle(p),false) end end else endDerby() setElementData(resourceRoot,"map","no") outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لم يبدآء الديربي, لعدم توفر الاعبين",getRootElement(),255,255,0,true) _mytimer = setTimer(newDuel,60*1000*5,1) end end _mytimer = setTimer(newDuel,3000,1) function onStartLoadSpawns () file = fileOpen("map.map") localFile = fileOpen("map.xml") fileWrite(localFile,"") data = fileRead(file,999999) fileWrite(localFile,data) fileClose(localFile) xml = xmlLoadFile("map.xml") c = 0 for i,data in pairs(xmlNodeGetChildren(xml)) do if xmlNodeGetName(data) == "spawnpoint" then c = c+1 v,xx,yy,zz,rxx,ryy,rzz = xmlNodeGetAttribute(data,"vehicle"),xmlNodeGetAttribute(data,"posX"),xmlNodeGetAttribute(data,"posY"),xmlNodeGetAttribute(data,"posZ"),xmlNodeGetAttribute(data,"rotX"),xmlNodeGetAttribute(data,"rotY"),xmlNodeGetAttribute(data,"rotZ") table.insert(spawns,{id = c,model = v,x = xx,y = yy,z = zz,rx = rxx,ry = ryy,rz = rzz}) end end for i,data in pairs(xmlNodeGetChildren(xml)) do if xmlNodeGetName(data) == "object" then m,xx,yy,zz,rxx,ryy,rzz = xmlNodeGetAttribute(data,"model"),xmlNodeGetAttribute(data,"posX"),xmlNodeGetAttribute(data,"posY"),xmlNodeGetAttribute(data,"posZ"),xmlNodeGetAttribute(data,"rotX"),xmlNodeGetAttribute(data,"rotY"),xmlNodeGetAttribute(data,"rotZ") object = createObject(m,xx,yy,zz,rxx,ryy,rzz) setElementDimension(object,30) end end end setTimer(onStartLoadSpawns,3000,1) function endDerby() for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then killPed(p) end end for i,v in pairs(getElementsByType("vehicle"))do if getElementData(v,"creatorDerby") then destroyElement(v) end end end setTimer(function() for i,p in pairs(getElementsByType("player"))do sea(p) resetHan(p) checkVeh(p) checkModel(p) end end,1000,0) outputChatBox("",getRootElement(),255,255,0,true) function sea(p) if checkExistPlrOnDuel(p) then x,y,z = getElementPosition(p) if tonumber(z) <= 0 then killPed(p) end end end function checkVeh(p) if (tonumber(getElementDimension(p)) == 30) and not (isPedInVehicle(p))then killPed(p) end end function resetHan(p) if checkExistPlrOnDuel(p) then setVehicleHandling (getPedOccupiedVehicle(p), true ) end end function checkModel(p) if checkExistPlrOnDuel(p) and isPedInVehicle(p) then if tonumber(getElementModel(getPedOccupiedVehicle(p)) ) ~= 411 then killPed(p) end end end
  8. بالنسبة لوقت المهمة دور ع التايمر أعتقد سطر 141 setTimer(newDuel,60000,1) بس أنت تبي تشغل المهمة كل 50 دقيقة؟ setTimer(newDuel,60*1000*50,1) --50 = ...عدد الدقائق تقدر تحطه 10 فـ يصير 10 دقائق وهكذا بالنسبة لكم تبقـى لبدأ الديربي فـ عدل ع الحدث حق دخول الماركر واذا كان الديربي ما بدأ جيب الوقت حق التايمر باستخدام الوظيفة getTimerDetails واقسم الوقت ع دقيقة
  9. حط هـالتحقق function وبعد انشاء الفنكشن 'onPlayerChat' في السكربت حق التاج وتحت الحدث حق if getElementData(getResourceRootElement(getResourceFromName('XX')),"ChatSystem") == "False" then return end . بأسم السكربت الي حطيت فيه الأكواد الي عطاك مازن XX وبدل
  10. . 'onPlayerChat' لازم تعدل ع التاج لانه يستخدم الحدث
  11. getPedOccupiedVehicle setElementPosition https://forum.multitheftauto.com/viewtopic.php?f=160&t=99316
  12. http://www.gta-arabs.com/gt/-mta-/150329-a.html
  13. @Ma[Z]en: اعتبر أن لاعب دخل للسيرفر أكيد الداتا ما راح تكون موجودة وعليه ويقدر يكتب بالشات فالأفضل تحط الداتا ع السكربت
  14. ؟GUIEditor.RadioButton[1] متأكد أنه يوجد المنت بالمتغير هذا ياليت تطرح سطر انشائه
  15. '123' ياليـت توضـح أكثـر يعني تبيه لازم اسمه يحتوي على xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if string.find(getPlayerName(source), '123') then if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#",source,255,255,255,true) end if isObjectInACLGroup("user."..account, aclGetGroup(ForbiddenGroup)) then return outputChatBox("#",source,255,0,0,true); end local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,':') local hour = tonumber( data[1] ) if hour == nil or not tonumber(hour) then hour = 0 end if hour >= tonumber(Price) then revmoeOtherGroups ( source ) aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#"..Name,source,255,255,255,true) else outputChatBox("#",source,255,255,255,true) end end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) function revmoeOtherGroups ( element ) if ( element and isElement ( element ) ) then if ( getPlayerAccount ( element ) and not isGuestAccount ( getPlayerAccount ( element ) ) ) then for _, v in ipairs( aclGroupList ( ) ) do if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( element ) ), v ) ) then aclGroupRemoveObject ( v, "user."..getAccountName ( getPlayerAccount ( element ) ) ) end end end end end
  16. 'onClientPlayerChat' مافي حدث اسمه مافيها أرقمنت لاعب بالكلنت outputChatBox والوظيفـة خطأ 'onCleintGUIClick' وأنت كاتب الايفينت وتحقق من اسم الداتا
  17. <meta> <info version="1.0.3" name="KilleR_SOSE" type="script" author="KilleR"/> <script src="client.lua" type="client" /> <script src="server.lua" type="server" /> </meta>
  18. -- Client Side -- GUIEditor = { button = {}, edit = {}, window = {}, gridlist = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(245, 103, 323, 413, "لوحة الادارهـ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1] , false ) GUIEditor.gridlist[1] = guiCreateGridList(9, 21, 303, 305, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "الحساب", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "الاسم", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "الرتبة", 0.9) GUIEditor.button[1] = guiCreateButton(0, 307, 154, 47, "", false, GUIEditor.gridlist[1]) GUIEditor.label[1] = guiCreateLabel(111, 313, 100, 31, "", false, GUIEditor.gridlist[1]) GUIEditor.button[2] = guiCreateButton(10, 381, 86, 23, "×", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(102, 385, 144, 26, "Created By KilleR", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) end) addEventHandler("onClientGUIClick", resourceRoot, function() if source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) outputChatBox('-( منور مود كيلر لمعرفة الادامن )- ',math.random(255),math.random(255),math.random(255),true) end end) addEvent ( "OpenWindow", true ) addEventHandler ( "OpenWindow", root, function() guiSetVisible ( GUIEditor.window[1],not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) guiGridListClear ( GUIEditor.gridlist[1] ) for _,Players in ipairs ( getElementsByType("player") ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1] , row , 1 , tostring ( getElementData ( Players , "Account_" ) ) , false , false ) guiGridListSetItemText ( GUIEditor.gridlist[1] , row , 2 , tostring ( getPlayerName ( Players ) ) , false , false ) local acl = getElementData ( Players , "Acls_" ) guiGridListSetItemText ( GUIEditor.gridlist[1] , row , 3 , tostring( table.concat(acl, ", ") ) , false , false ) end end) -- Server Side -- function getPlayerGroups(thePlayer) local acls = {} local account = getPlayerAccount(thePlayer) if (account) and not (isGuestAccount(account)) then local accountName = getAccountName(account) for i,group in ipairs(aclGroupList()) do if (isObjectInACLGroup( "user." ..accountName, group)) then local groupName = aclGroupGetName(group) table.insert(acls, groupName) end end end return acls end addEventHandler("onResourceStart", resourceRoot, function() for _,Players in ipairs ( getElementsByType("player") ) do local Account = getPlayerAccount ( Players ) if Account and not isGuestAccount ( Account ) then setElementData ( Players , "Account_" , getAccountName ( Account ) ) setElementData ( Players , "Acls_" , getPlayerGroups ( Players ) ) else setElementData ( Players , "Account_" , "N/A") setElementData ( Players , "Acls_" , "N/A") end end end) addEventHandler("onPlayerJoin",root,function() setElementData ( source , "Account_" , "N/A") setElementData ( source , "Acls_" , "N/A") end) addEventHandler("onPlayerLogin",root, function (_,Acc) setElementData ( source , "Account_" , getAccountName ( Acc ) ) setElementData ( source , "Acls_" , getPlayerGroups ( source ) ) end) addEventHandler("onPlayerLogout",root, function() setElementData ( source , "Account_" , "N/A") setElementData ( source , "Acls_" , "N/A") end) local Groups = { "Level 4", "Level 5", "Level 6", "Head.Admin", "Console" } addCommandHandler ( "KilleR", function ( p ) if getPlayerAccount ( p ) and not isGuestAccount(getPlayerAccount ( p )) then for _,Server in ipairs ( Groups ) do if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( p ) ), aclGetGroup ( Server ) ) then triggerClientEvent ( p, "OpenWindow", p ) break end end end end)
  19. addEventHandler("onPlayerSpawn", root, function () if getPlayerTeam (source) == getTeamFromName ("asf") then spawnPlayer (source, -1304.17346 , 2534.95874 , 87.74219, 0, 100) end end)
  20. اطرحلي اكوادك حقت انشاء اللوحة كلنت فقط وعند دخول اللاعب ملفات الكلنت باقي ما حملت GUI اكواد ال
  21. أول شيء أنت تبي الوحة تفتح أول ما يدخل ولا ما تبيها كذا؟ !وثاني شيء مستحيل اللوحة تفتح اول ما يدخل اللاعب لازم ملفات الكلنت تنزل أول شيء
  22. ايه, احذف الكود الثالث وبدله بالي عطيتك
  23. -- Server Side -- local kicktab = {} function pingCheck() for index,player in ipairs( getElementsByType("player") ) do if getPlayerPing ( player ) >= 1500 then if kicktab[player] then kicktab[player] = kicktab[player] + 1 else kicktab[player] = 1 end if kicktab[player] == 5 then killPed ( player ) outputChatBox("You Are Lag , Ping Over 1500 !", player, 255, 0, 0, true) outputChatBox(getPlayerName(player).." was killed [high Ping]", root, 255, 20, 0, true) end else kicktab[player] = 0 end end end setTimer ( pingCheck, 1000, 0 )
×
×
  • Create New...