Jump to content

iMr.SFA7

Members
  • Posts

    2,013
  • Joined

  • Last visited

Everything posted by iMr.SFA7

  1. ايه أنا الي في رآسك
  2. @Ma[Z]en: كودك هذا راح يتحقق من أن اللاعب الي انصك ميوت في أحد القروبات الي بالجدول واذا موجود بيفك ميوتـه وصاحـب الموضـوع يبـي محد لفل1 ما يفك الميوت بس يقدر يصك @SaedAmer: أنت ماتقدر تسمح لقروب أنه يصك ميوت بس ما يفكه لأن الأدمنية نظامهـا كـذا فـ عـدل ع الأدمـنيـة
  3. function deanimated( ammo, attacker, weapon, bodypart ) if (attacker) then if (getElementType ( attacker ) == "player") and (getElementType ( source ) == "ped") then if (getElementData (source, "zombie") == true) then local oldZcount = getElementData ( attacker, "Zombie kills" ) if oldZcount ~= false then setElementData ( attacker, "Zombie kills", oldZcount+1 ) local Team = getPlayerTeam(attacker) if Team and Team == getTeamFromName( 'Assassins_Zombie' ) then givePlayerMoney (attacker, 50) end --- givePlayerMoney (attacker, 50) --outputChatBox ( "* your kill one zombie and get [50$] your killes [".. oldZcount+1 .."]" , attacker, 255, 255, 255 ) triggerEvent ( "onZombieWasted", source, attacker, weapon, bodypart ) else setElementData ( attacker, "Zombie kills", 1 ) triggerEvent ( "onZombieWasted", source, attacker, weapon, bodypart ) end end end end end addEventHandler("onPedWasted", resourceRoot, deanimated) getLocalPlayer() -- Client Side Only
  4. بـدل التـحقق الـي في السـطر الثـالث ليـصبح هكـذا if Team and Team == getTeamFromName( 'Assassins_Zombie' ) then وقم بحذف السـطر الخامس والسادس
  5. بالكلينت لوكل بلير تكفي الثانيه تحتاجها بملف سيرفر getElementType للمعلوميه مو شرط تحط . ايه أدري ولاكن حطـيتها لزيـادة التحـقق من الالمـنت الـي دخـل
  6. عندكـ خطأ بسـيط في الحـدث والتـحقق: addEventHandler ( 'onClientMarkerHit', resourceRoot, function ( player ) if (source == marker and getElementType (player) == 'player' and player == localPlayer) then setElementFrozen (player, true) end end)
  7. addEventHandler("onPlayerJoin",root, function() if not string.find(getPlayerName(source),'[M.L]-') then setPlayerName (source, '[M.L]-'..getPlayerName(source)) end end)
  8. addEventHandler( 'onPlayerJoin', root, function() if getPlayerName(source) == 'Mr.CoR' then setPlayerName(source,'Ansan-flh') outputChatBox('تـستاهل الاسم <>', source, 255, 0, 0, true) outputChatBox('لمرفة المزيد عن كيفية تغيير اسمك داخل اللعبة قم بزيارتنا:https://forum.multitheftauto.com/viewtopic.php?f=160&t=100052', source, 255, 0, 0, true) end end) هذا مثال لا تقول مافهمت
  9. في مليون موضوع وطلب عن طلبك وأقرب طلب كان اليوم لاكن أنت ماتدور . عدل ع الجـدول
  10. هذا تبديل تكسدات .. عدل التكسد الي تبيه وبدله بالاوبجكت حق العلم
  11. onClientRender with triggerServerEvent
  12. شرح في قمة الخياال طرحت فابدعت دمت ودام عطائك ودائما بأنتظار جديدك الشيق لك خالص حبي وأشواقي
  13. addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) local amount = guiGetText(GUIEditor.edit[1]) local _reason = guiGetText(reasonEdit) if amount == '' or amount == ' ' or _reason == '' or _reason == ' ' or not tonumber(amount) then return end; triggerServerEvent("Floos", localPlayer, amount, playerName, _reason) end end) 1. تأكد من متغير الزر 2. تأكد من متغير القريد ليست وتأكد من أن أسماء اللاعبين موجودة في الكولمن الأول 3. تأكد من متغير الاديت الخاص بعدد الفلوس 4. بمتغير الاديت الخاص بالسبب reasonEdit قم بتبديل addEvent("Floos", true) addEventHandler("Floos", root, function(amount, plr, reason) if getPlayerAccount(source) and not isGuestAccount(getPlayerAccount(source)) and tonumber(amount) and reason then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then local toWho = getPlayerFromName(plr) if toWho then local player = getPlayerName(toWho) local name = getPlayerName(source) local Money = getPlayerMoney(source) if Money == 0 then return end --takePlayerMoney(source,tonumber(amount)) givePlayerMoney(toWho,tonumber(amount)) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 You Has Give #ffff00( " .. player .. " #00ff00$#ffff00 ) Money: "..tonumber(amount).." Reason: "..reason.."", source, 0, 150, 255, true) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 *".. name .. " #ff0000Has Given you #FFFF00( " .. player .. " #00ff00$#ffff00 ) Money: "..tonumber(amount).." Reason: "..reason.." #ff0000 !", toWho, 255, 0, 0, true) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 *".. name .. " #ff0000player he gave the player #FFFF00( " .. player .. " #00ff00$#ffff00 ) Money: "..tonumber(amount).." Reason: "..reason.." #ff0000 !", root, 255, 0, 0, true) else outputChatBox("#ff0000*#ffff00[Admin]#ff0000 Please Select Player!!", source, 255, 0, 0, true) end end end end)
  14. أنت تقول أنك سويت اديت للسبب لاكني ما أشوف أنك جبت التكست الي بالاديت حق السبب أعتقد أنك تبيه خاص للكونسل وهذا السبب الي مخليك تتحقق من أنه بقروب الكونسل بس دامه بقروب الكونسل ليه تبي تشيل من الكونسل الفلوس ولا أنت تبيه كذا
  15. buttons = { ['F1'] = true, ['F3'] = true, ['b'] = true } addEventHandler( 'onClientKey', root, function (button , prees) if prees and getElementDimension(localPlayer) == 30 then if buttons[button] then cancelEvent() end end end)
  16. addEventHandler( 'onClientKey', root, function (button , prees) if button == 'F1' or button == 'F3' or button == 'b' and prees and getElementDimension(localPlayer) == 30 then cancelEvent() end end) تأكد من رقـم العـالم الوهمـي
  17. ضيف الي تبيه للجدول: _sf = {'123', 'Hello', 'w7sh'} function _isPlayerCanTakeGroup(Name) for _,v_ in ipairs(_sf) do if Name:find(v_) then return true end end return false end xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if _isPlayerCanTakeGroup(getPlayerName(source)) 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
  18. ياليت ترفع السكربت كامل وهذي هي صور لتجربتي مع السكربت:
  19. ي أخوي الكود مافيه شيء مجربه تمام ( وبالنسبـة للكود الي طارحه فوق ( مدري ليه طارحه فيه اند ناقصة 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 local _r,_e,_t = getTimerDetails(_mytimer) if _r and _e and _t then total = _r / 60 / 1000 ss = math.floor( _r / 1000 ) seconds = tostring( math.fmod( ss, 60 ) ) outputChatBox("تبقـى: "..math.ceil(total)..":"..seconds.."") end end end return tostring(getElementData(resourceRoot,"map")) end
  20. ايش هو الي ماشتغل؟ .. تحقق زين لأني مجربـه اذا ماشتغل قلي الأخطاء التي تظهر بالدي بق
  21. setElementData(resourceRoot,"map","prestart") exports.topbarchat.sendClientMessage('*#ffffff [ #CD0000Derby #FFFFFF ] : لدخول الديربي توجه ( ف6 ديربي ) ء', root, 255, 0, 0, true, RMoney = math.random("10000","100000") setElementData(resourceRoot,"winMoney",tonumber(RMoney)) setTimer(checkPlrs,30000,1) end P.S: !لأنه بيخرب الكود lua ما حطيته بصيغـة
  22. outputMessage وليـس sendClientMessage الوظيفة الي بالتوب بار شوت اسمها
  23. spawns = {} setElementData(resourceRoot,"map","no") setElementData(resourceRoot,"winMoney","0") sfa7DerbyMarker = createMarker(1555.50037, -1675.64880, 16.19531, "arrow", 1.1, 255, 0, 0, 170 ) 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 local _r,_e,_t = getTimerDetails(_mytimer) if _r and _e and _t then total = _r / 60 / 1000 ss = math.floor( _r / 1000 ) seconds = tostring( math.fmod( ss, 60 ) ) outputChatBox("تبقـى: "..math.ceil(total)..":"..seconds.."") 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) outputChatBox(getPlayerName(p)..' دخل إلى الديربي', root, 255, 0 ,0, true) 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
×
×
  • Create New...