Jump to content

The Killer

Members
  • Posts

    1,336
  • Joined

Everything posted by The Killer

  1. addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == GUIEditor.button[1]) then setElementPosition (localPlayer, x, y, z) end end )
  2. The Killer

    .

    Server side # function isPlayerInGroup (plr, group) if (plr and isElement (plr)) then if (group and type (group) == "string" and aclGetGroup (group)) then local acc = getPlayerAccount (plr) if not isGuestAccount (acc) then if isObjectInACLGroup ("user." .. getAccountName (acc), aclGetGroup (group)) then return true else return false end else return false end else return false end else return false end end addEventHandler ("onPlayerLogin", root, function () if isPlayerInGroup (source, "KingServer") then triggerClientEvent (source, "onAddPlayers", source, getPlayerName (source):gsub ("#%x%x%x%x%x%x", "")) end end ) addEvent ("onGetPlayers", true) addEventHandler ("onGetPlayers", root, function () if isPlayerInGroup (source, "KingServer") then triggerClientEvent (source, "onAddPlayers", source, getPlayerName (source):gsub ("#%x%x%x%x%x%x", "")) end end ) Client side # addEvent ("onAddPlayers",true) addEventHandler ("onAddPlayers", root, function (name) local Row = guiGridListAddRow (king) guiGridListSetItemText (king, Row, 1, name, false, false) guiGridListSetItemColor (king, Row, 1, 0, 255, 0) end )
  3. اطرح اكوادك #
  4. سو نفس طريقة الفتح بس حط بدال ما هي guiSetVisible (wind, true) خليها guiSetVisible (wind, false) وبس #
  5. ما تقدر تسويها والمود مشفر لازم المود يكون مب مشفر عشان تقدر تسوي هذي الطريقه لأن كيف بتعرف اسم اللوحه والاشياء ذي #
  6. مثال بسيط استفيد منه # addEventHandler ("onClientGUIChanged", resourceRoot, function () if (source == search) then guiGridListClear (grid) local name = guiGetText (search) if (name == "") then for _,v in ipairs (getElementsByType ("player")) do local row = guiGridListAddRow (grid) guiGridListSetItemText (grid, row, 1, getPlayerName (v), false, false) end else for _,v in ipairs (getElementsByType ("player")) do if string.find (getPlayerName (v):lower (), name:lower ()) then local row = guiGridListAddRow (grid) guiGridListSetItemText (grid, row, 1, getPlayerName (v), false, false) end end end end end )
  7. اول شي اطرح اكوادك هنا ثاني شي لو المود مشفر حنا شنسوي ؟ وبعدين "لحد يقولي رح اسأله" وش تتوققع بنقولك غير كذا ؟ رح اسأله هو خله يفك لك التشفير وتفاهم معه #
  8. استعمل Exports .. https://wiki.multitheftauto.com/wiki/Call
  9. Event # 'onMarkerHit' function # getPlayerTeam getTeamName setElementVisibleTo
  10. دور هنا : https://community.multitheftauto.com/
  11. @Mr.Ronaldo انت شقاعد تسوي # ما يبالها كل ذا يقدر بختصار يسوي اول ما يدخل اللاعب او يشتغل المود يسوي الكود حقه على حسب طلبه كله مكتمل في هذا bindKey هو يبي لا ضغط رقم واحد او 2 في الكيبورد ما قال في اللوحه #
  12. اولاً لا تقول صممت واذكر اسم صاحب المود ------ ثانياًً عشان تسوي ضغط رقم 1 تتصلح او 2 ... الخ استخدم الفنكشن هذا: bindKey
  13. اكيد ماراح يشتغل لأن كودك كله أخطاء .. بختصار معفوس .. #
  14. local r, g, b, a = 0, 255, 0, 255 -- عدل اللون هنا local colshape = createColCuboid (1577.65, 1723.59, -50, 59.46, 139.45, 100) createRadarArea (1577.65, 1723.59, 59.46, 139.45, r, g, b, a) addEventHandler ("onColShapeHit", colshape, function (hit) if getElementType (hit) == "ped" then if getElementData (hit, "zombie") then killPed (hit) end end if getElementType (hit) == "player" then toggleControl (hit, "fire", false) toggleControl (hit, "aim_weapon", false) toggleControl (hit, "next_weapon", false) toggleControl (hit, "previous_weapon", false) toggleControl (hit, "sprint", false) end end ) addEventHandler ("onColShapeLeave", colshape, function (left) if getElementType (left) == "player" then toggleControl (left, "fire", true) toggleControl (left, "aim_weapon", true) toggleControl (left, "next_weapon", true) toggleControl (left, "previous_weapon", true) toggleControl (left, "sprint", true) end end )
  15. جرب كذا: --***********************************-- --***********************************-- -- GTA-AR Chat System -- -- By Al3grab -- --***********************************-- --***********************************-- -- outputDebugString("GTA-AR Chat System By Al3grab | Started") -- rRoot = getResourceRootElement(getThisResource()) -- ANTI_FLOOD = true -- Enable anti flood ?. ANTI_REPEAT = true -- Enable anti repeat ?. ANTI_FLOOD_TIME = 10 * 1000 -- Anti flood time in miliseconds . MUTE_PLAYERS = true -- Mute players if they flooded too much ? . MAX_FLOOD_TIMES = 10 -- Max flood times. MUTE_TIME = 10 * 60 * 1000 -- Time to mute player if he flooded too much. ADMIN_SOUND = 101 -- Play sound if admin talked ( set to false to disable ) . -- lastChatMessage = {} chatTime = {} chatTimers = {} floodTimes = {} muteTimers = {} -- TAGS = { -- Tag Group | Tag | Tag Message Color | Anti Flood for Group | Play sound on talk | Anti flood time {"Manager", "#CCCCCC[Developer]","#33CCCC",false,true}, {"Console", "#cccccc[Manager]","#cc00cc",false,true}, {"Manager|T1", "#cccccc[T-Manager|1]","#ccffcc",false,true}, {"Manager|T2", "#cccccc[T-Manager|2]","#ccffcc",false,true}, {"Manager|T3", "#cccccc[T-Manager|3]","#ccffcc",false,true}, {"Leader", "#ff0033[Admin]","#FFFA54",true,false}, {"Admin", "#DC143C[Head Admin]","#FFFA54",true,false}, {"VIP", "#FF7301AF[VIP-Iv]","#FFFFFF",true,false,5*1000}, {"vip", "#ccccccAF[VIP-Iv]","#FFFFFF",true,false,5*1000}, {"LVL5", "#00D7FF[Gta-Iv|5]","#FFFA54",true,false,5*1000}, {"LVL1", "#2900FF[Gta-Iv|1]","#FFFA54",true,false,5*1000}, {"LVL2", "#8F0F95[Gta-Iv|2]","#FFFA54",true,false,5*1000}, {"LVL3", "#44FF8A[Gta-Iv|3]","#FFFA54",true,false,5*1000}, {"Support", "#cccccc[Gta-Iv|Supporter]","#FFFFFF",true,false,5*1000}, {"T-1", "#A5A5A5[Gta-Iv|T-1]","#FFF000",true,false,5*1000}, {"T-2", "#A5A5A5[Gta-Iv|T-2]","#FFF000",true,false,5*1000}, {"T-3", "#FF00CB[Gta-Iv|T-3]","#FFF000",true,false,5*1000}, {"LVL4", "#FF6666[Gta-Iv|4]","#FFFA54",true,false,5*1000} } -- function logMessage(text,player) if text and player then text = string.gsub(text, '#%x%x%x%x%x%x', '') local log = fileOpen("ChatLog.log") or fileCreate("ChatLog.log") -- if log then fileSetPos(log,fileGetSize(log)) fileWrite(log,"\r\n",text) fileFlush(log) fileClose(log) end end end -- function isInGroup(p,Group) if p and Group then local pAcc = getPlayerAccount(p) if pAcc and isGuestAccount(pAcc) ~= true then -- local g = aclGetGroup (tostring(Group)) if not g then return false end -- local pAccName = getAccountName(pAcc) if isObjectInACLGroup ("user."..pAccName,g) then return true else return false end -- else return false end end end -- function getFixedName(player) if isElement(player) then local hisName = getPlayerName(player) if hisName then result = string.gsub(hisName, '#%x%x%x%x%x%x', '') if result then return result end end else outputDebugString("ERROR : Bad Player at getFixedName !") end end -- 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 -- addEvent("onPlayerChat",true) addEventHandler("onPlayerChat",root,function ( Text,msgtype ) local data = split ((getElementData (source, "PlayTime") or "0:0:0"), ":") if (tonumber (data [1]) < 3) then outputChatBox ("Your hours are less than 3 hours.", source, 255, 0, 0) cancelEvent () return end cancelEvent() if ANTI_FLOOD then if getElementData(source,"TagFlood") == true or getElementData(source,"TagFlood") == nil or tonumber(getElementData(source,"TagFlood")) then if chatTime[source] then if MUTE_PLAYERS then if tonumber(floodTimes[source]) >= tonumber(MAX_FLOOD_TIMES) then mutePlr(source,msgtype) return end end local time,_,__ = getTimerDetails(chatTimers[source]) outputChatBox("Stop spamming chat!, wait "..math.floor(time/1000,2).." seconds.", source, 255, 0, 0) floodTimes[source] = tonumber(floodTimes[source]) + 1 cancelEvent() return end if ANTI_REPEAT and lastChatMessage[source] and lastChatMessage[source] == Text then outputChatBox("Stop repeating yourself!", source, 255, 0, 0) cancelEvent() return else lastChatMessage[source] = Text end end end msgTag = nil for k,v in ipairs ( TAGS ) do if not msgTag then local Group,Tag,Color,Flood = v[1],v[2],v[3],v[4] if isInGroup(source,Group) then msgTag = Tag msgColor = v[3] msgFlood = v[4] msgSound = v[5] msgFloodTime = v[6] setElementData(source,"TagFlood",msgFlood) setElementData(source,"TagSound",msgSound) setElementData(source,"TagFloodTime",msgFloodTime) end r,g,b = getPlayerNametagColor(source) hex = RGBToHex(r,g,b) or "#FFFFFF" end end --- local time = getRealTime() local second,minute,hour,day,month,year = time.second,time.minute,time.hour,time.monthday ,time.month + 1,time.year + 1900 if hour <= 0 then x = "AM" else x = "PM" end hour = math.floor(hour / 12) if hour == 0 then hour = "12" end -- chatTime[source] = true floodTimes[source] = 0 if getElementData(source,"TagFloodTime") then t = getElementData(source,"TagFloodTime") else t = ANTI_FLOOD_TIME end chatTimers[source] = setTimer(function(p) chatTime[p] = nil chatTimers[p] = nil end , t , 1 ,source) -- if msgtype == 0 then if msgTag then outputChatBox( "* "..msgTag.." "..hex..""..getFixedName(source).." "..msgColor..": "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",root,255,0,0,true) logMessage( "["..math.floor(hour)..":"..minute..":"..second..""..tostring(x).." "..day.."/"..month.."/"..year.."] "..msgTag.." [ "..getFixedName(source).." ] : "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",source) if ADMIN_SOUND ~= false then if getElementData(source,"TagSound") == true then playSoundFrontEnd(root,tonumber(ADMIN_SOUND)) end end else setElementData(source,"TagFlood",true) setElementData(source,"TagSound",false) setElementData(source,"TagFloodTime",nil) outputChatBox( ""..hex..""..getFixedName(source).." #FFFFFF: "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",root,255,255,255,true) logMessage( "["..math.floor(hour)..":"..minute..":"..second..""..tostring(x).." "..day.."/"..month.."/"..year.."] [ "..getFixedName(source).." ] : "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",source) end elseif msgtype == 2 then for k,v in ipairs ( getElementsByType("player") ) do if getPlayerTeam(v) == getPlayerTeam(source) then if msgTag then outputChatBox( "* (Team) "..msgTag.." "..hex..""..getFixedName(source).." "..msgColor..": "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",v,255,0,0,true) if ADMIN_SOUND ~= false then if getElementData(source,"TagSound") == true then playSoundFrontEnd(v,tonumber(ADMIN_SOUND)) end end else setElementData(source,"TagFlood",true) setElementData(source,"TagFloodTime",nil) setElementData(source,"TagSound",false) outputChatBox( "(Team) "..hex..""..getFixedName(source).." #FFFFFF: "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",v,255,255,255,true) end end end if msgTag then logMessage( "["..math.floor(hour)..":"..minute..":"..second..""..tostring(x).." "..day.."/"..month.."/"..year.."] ("..getTeamName(getPlayerTeam(source))..") "..msgTag.." [ "..getFixedName(source).." ] : "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",source) else logMessage( "["..math.floor(hour)..":"..minute..":"..second..""..tostring(x).." "..day.."/"..month.."/"..year.."] ("..getTeamName(getPlayerTeam(source))..") [ "..getFixedName(source).." ] : "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",source) end end end ) function mutePlr(p,t) if p then if isPlayerMuted(p) ~= true then if t == 0 then x = "main" elseif t == 2 then x = "team" end setPlayerMuted(p,true) outputChatBox("* (ANTI FLOOD) #FFFFFF"..string.gsub(getPlayerName(p), '#%x%x%x%x%x%x', '').." #FF0000have been muted for "..math.floor(MUTE_TIME/1000/60).." minutes for flooding "..x.." chat.",root,255,0,0,true) muteTimers[p] = setTimer ( function ( p ) setPlayerMuted(p,false) outputChatBox("You have been unmuted, please don't flood the chat again !",p,255,0,0,true) end , MUTE_TIME , 1 ,p ) end end end --[[ serialMute = {} addEventHandler("onPlayerQuit",root,function() if muteTimers[source] then local serial = getPlayerSerial(source) local time = getTimerDetails(muteTimers[source]) serialMute[serial] = time killTimer(muteTimers[source]) end -- lastChatMessage[source] = nil chatTime[source] = nil chatTimers[source] = nil floodTimes[source] = nil muteTimers[source] = nil end ) addEventHandler("onPlayerJoin",root,function() local serial = getPlayerSerial(source) if serialMute[serial] then setPlayerMuted(source,true) outputChatBox("* (ANTI FLOOD) You have been muted for "..math.floor(serialMute[serial]/1000/60).." minutes for flooding.",source,255,0,0,true)
  16. ضيف كودي في مود التاج وشيل مخرج الشات القديم وضيف الجديد
  17. https://wiki.multitheftauto.com/wiki/Ge ... thinMarker
  18. addEventHandler ("onPlayerChat", root, function (msg) local data = split ((getElementData (source, "PlayTime") or "0:0:0"), ":") if (tonumber (data [1]) >= 3) then outputChatBox (getPlayerName (source) .. ": " .. msg, root, 255, 255, 255) else outputChatBox ("You need 3 hours to talk.", source, 255, 0, 0) cancelEvent () end end )
  19. عندك خطأ بسيط يا تابل, في سطر 6 client بدال vehicle في سطر 6 المفروض تحط
  20. addEventHandler ("onClientPlayerDamage", localPlayer, function (attacker) if (attacker and attacker ~= localPlayer) then if getElementType (attacker) == "player" then local attackerGroup = getElementData (attacker, "Group") local playerGroup = getElementData (localPlayer, "Group") if (attackerGroup == playerGroup) then cancelEvent () end end end end )
×
×
  • Create New...