Jump to content

India

Members
  • Posts

    85
  • Joined

  • Last visited

Everything posted by India

  1. India

    [HELP] F11 Map

    Hacı, F11 açtığımda radar HUD kalkıyor ama 1-2saniye sonra tekrar görünür hale geliyor. (Sorry for Turkish, he is Turkish people) Neden öyle olduğunu söyliyim survivorSystem_client.lua dosyasında böyle bir fonksiyon var setTimer yeri her 1saniye de resetliyor. O yüzden Map açıldıktan sonra radar görünür hale geliyor. Nasıl yaparız if getElementData(getLocalPlayer(),"logedin") then toggleControl ("radar",false) setPlayerHudComponentVisible ("clock",false) setPlayerHudComponentVisible ("radar",false) setPlayerHudComponentVisible ("money",false) setPlayerHudComponentVisible ("health",false) setPlayerHudComponentVisible ("weapon",false) setPlayerHudComponentVisible ("breath",false) setPlayerHudComponentVisible ("area_name", false ) setPlayerHudComponentVisible ("vehicle_name", false ) setPedTargetingMarkerEnabled(false) --(true) olarak yaparsan Karakter üstü Target işareti aktif hale gelir. -- if getElementData(getLocalPlayer(),"Harita") >= 1 then -- toggleControl ("radar",true) -- end if getElementData(getLocalPlayer(),"GPS") >= 1 then setPlayerHudComponentVisible ("radar",true) end if getElementData(getLocalPlayer(),"Saat") >= 1 then setPlayerHudComponentVisible ("clock",true) end end end setTimer(playerStatsClientSite,1000,0)
  2. India

    [HELP] F11 Map

    Here is my lua, can't you add what u mean? local screenW,screenH = guiGetScreenSize() local middleX,middleY = screenW/2,screenH/2 local localPlayer = getLocalPlayer() local thisResource = getThisResource() local toggle = false local zoom = 1 local zoomRate = 0.1 local movementSpeed = 5 local minZoomLimit = 1 local maxZoomLimit = 5 local xOffset = 0 local yOffset = 0 local x,y = 0,0 local hSize,vSize = 0,0 local R,G,B,A = 255,255,255,175 local mapDrawColor = tocolor(R,G,B,A) local normalColor = tocolor(255,255,255,255) local mapFile = ":maximap/images/radar.png" local topLeftWorldX,topLeftWorldY = -3000,3000 local lowerRightWorldX,lowerRightWorldY = 3000,-3000 local mapWidth,mapHeight = 6000,6000 local pixelsPerMeter = screenH/6000 local imageOwnerResource = getThisResource() toggleControl("radar",false) local abs=math.abs function calculateFirstCoordinates() -- This function is for making export functions work without the map having been opened once hSize=pixelsPerMeter*mapWidth*zoom vSize=pixelsPerMeter*mapHeight*zoom x=middleX-hSize/2+xOffset*zoom y=middleY-vSize/2+yOffset*zoom end addEventHandler("onClientResourceStart",getResourceRootElement(),calculateFirstCoordinates) function unloadImageOnOwnerResourceStop(resource) if resource==imageOwnerResource and resource~=thisResource then setPlayerMapImage() end end addEventHandler("onClientResourceStop",getRootElement(),unloadImageOnOwnerResourceStop) function drawMap() if not toggle then dxDrawImage(0,0,0,0,mapFile,0,0,0,0,false) -- This is actually important, because otherwise you'd get huge lag when opening the maximap after a while (it seems to unload the image after a short while) else checkMovement() hSize=pixelsPerMeter*mapWidth*zoom vSize=pixelsPerMeter*mapHeight*zoom x=middleX-hSize/2+xOffset*zoom y=middleY-vSize/2+yOffset*zoom dxDrawImage(x,y,hSize,vSize,mapFile,0,0,0,mapDrawColor,false) drawRadarAreas() drawBlips() drawLocalPlayerArrow() end end addEventHandler("onClientPreRender",getRootElement(),drawMap) function drawRadarAreas() local radarareas=getElementsByType("radararea") if #radarareas>0 then local tick=abs(getTickCount()%1000-500) local aFactor=tick/500 for k,v in ipairs(radarareas) do local x,y=getElementPosition(v) local sx,sy=getRadarAreaSize(v) local r,g,b,a=getRadarAreaColor(v) local flashing=isRadarAreaFlashing(v) if flashing then a=a*aFactor end local hx1,hy1 = getMapFromWorldPosition(x,y+sy) local hx2,hy2 = getMapFromWorldPosition(x+sx,y) local width = hx2-hx1 local height = hy2-hy1 dxDrawRectangle(hx1,hy1,width,height,tocolor(r,g,b,a),false) end end end function drawBlips() for k,v in ipairs(getElementsByType("blip")) do if not getElementData(v,"DoNotDrawOnMaximap") then local icon=getBlipIcon(v) or 0 local size=(getBlipSize(v) or 2)*4 local r,g,b,a=getBlipColor(v) if icon~=0 then r,g,b=255,255,255 size=16 end local x,y,z=getElementPosition(v) x,y=getMapFromWorldPosition(x,y) local halfsize=size/2 dxDrawImage(x-halfsize,y-halfsize,size,size,"images/blips/"..icon..".png",0,0,0,tocolor(r,g,b,a),false) end end end function drawLocalPlayerArrow() local x,y,z=getElementPosition(localPlayer) local r=getPedRotation(localPlayer) local mapX,mapY=getMapFromWorldPosition(x,y) dxDrawImage(mapX-8,mapY-8,16,16,"images/blips/2.png",(-r)%360,0,0,normalColor,false) end function zoomOutRecalculate() local newVSize=pixelsPerMeter*mapHeight*zoom if newVSize>screenH then local newY=middleY-newVSize/2+yOffset*zoom if newY>0 then yOffset=-(middleY-newVSize/2)/zoom elseif newY<=(-newVSize+screenH) then yOffset=(middleY-newVSize/2)/zoom end else yOffset=0 end local newHSize=pixelsPerMeter*mapWidth*zoom if newHSize>screenW then local newX=middleX-newHSize/2+xOffset*zoom if newX>=0 then xOffset=-(middleX-newHSize/2)/zoom elseif newX<=(-newHSize+screenW) then xOffset=(middleX-newHSize/2)/zoom end else xOffset=0 end end function checkMovement() -- Zoom if getPedControlState("radar_zoom_in") and zoom<maxZoomLimit then zoom=zoom+zoomRate if zoom>maxZoomLimit then zoom=maxZoomLimit end elseif getPedControlState("radar_zoom_out") and zoom>minZoomLimit then zoom=zoom-zoomRate if zoom<minZoomLimit then zoom=minZoomLimit end zoomOutRecalculate() end -- Move if getPedControlState("radar_move_north") then local newY=y-yOffset*zoom+(yOffset+movementSpeed)*zoom if newY<0 then yOffset=yOffset+movementSpeed end end if getPedControlState("radar_move_south") then local newY=y-yOffset*zoom+(yOffset-movementSpeed)*zoom if newY>(-vSize+screenH) then yOffset=yOffset-movementSpeed end end if getPedControlState("radar_move_west") then local newXOff=(xOffset+movementSpeed) local newX=x-xOffset*zoom+newXOff*zoom if newX<0 then xOffset=xOffset+movementSpeed end end if getPedControlState("radar_move_east") then local newX=x-xOffset*zoom+(xOffset-movementSpeed)*zoom if newX>(-hSize+screenW) then xOffset=xOffset-movementSpeed end end end addEvent("onClientPlayerMapHide") addEvent("onClientPlayerMapShow") setElementData(getLocalPlayer(),"mapRender",true) function toggleMap() if not getElementData(getLocalPlayer(),"logedin") then return end if not getElementData(getLocalPlayer(),"mapRender") then return end if getElementData(getLocalPlayer(),"Harita") < 1 then return end --Eğer Harita var ise F11 Haritayı Açar. if toggle then if triggerEvent("onClientPlayerMapHide",getRootElement(),false) then toggle=false end else if triggerEvent("onClientPlayerMapShow",getRootElement(),false) then toggle=true end end end bindKey("F11","up",toggleMap) -- Export functions function getPlayerMapBoundingBox() return x,y,x+hSize,y+vSize end function setPlayerMapBoundingBox(startX,startY,endX,endY) if type(startX)=="number" and type(startY)=="number" and type(endX)=="number" and type(endY)=="number" then -- TODO return true end return false end function isPlayerMapVisible() return toggle end function setPlayerMapVisible(newToggle) if type(newToggle)=="boolean" then toggle=newToggle if toggle then triggerEvent("onClientPlayerMapShow",getRootElement(),true) else triggerEvent("onClientPlayerMapHide",getRootElement(),true) end return true end return false end function getMapFromWorldPosition(worldX,worldY) local mapX=x+pixelsPerMeter*(worldX-topLeftWorldX)*zoom local mapY=y+pixelsPerMeter*(topLeftWorldY-worldY)*zoom return mapX,mapY end function getWorldFromMapPosition(mapX,mapY) local worldX=topLeftWorldX+mapWidth/hSize*(mapX-x) local worldY=topLeftWorldY-mapHeight/vSize*(mapY-y) return worldX,worldY end function setPlayerMapImage(image,tLX,tLY,lRX,lRY) if image and type(image)=="string" and type(tLX)=="number" and type(tLY)=="number" and type(lRX)=="number" and type(lRY)=="number" then sourceResource = sourceResource or thisResource if string.find(image,":")~=1 then sourceResourceName = getResourceName(sourceResource) image = ":"..sourceResourceName.."/"..image end if dxDrawImage(0,0,0,0,image,0,0,0,0,false) then imageOwnerResource = sourceResource mapFile = image topLeftWorldX,topLeftWorldY = tLX,tLY lowerRightWorldX,lowerRightWorldY = lRX,lRY mapWidth,mapHeight = lRX-tLX,tLY-lRY pixelsPerMeter = math.min(screenW/(mapWidth),screenH/mapHeight) zoom = 1 xOffset = 0 yOffset = 0 return true end elseif not image then imageOwnerResource = thisResource mapFile = ":maximap/images/radar.jpg" topLeftWorldX,topLeftWorldY = -3000,3000 lowerRightWorldX,lowerRightWorldY = 3000,-3000 mapWidth,mapHeight = 6000,6000 pixelsPerMeter = screenH/6000 zoom = 1 xOffset = 0 yOffset = 0 return true end return false end function getPlayerMapImage() return mapFile end function setPlayerMapColor(r,g,b,a) local color=tocolor(r,g,b,a) if color then mapDrawColor = color R,G,B,A = r,g,b,a return true end return false end function setPlayerMapMovementSpeed(s) if type(s)=="number" then movementSpeed=s return true end return false end function getPlayerMapMovementSpeed() return movementSpeed end function getPlayerMapZoomFactor() return zoom end function getPlayerMapZoomRate() return zoomRate end function getBlipShowingOnMaximap(blip) if isElement(blip) and getElementType(blip)=="blip" then return not getElementData(blip,"DoNotDrawOnMaximap") end return false end function setBlipShowingOnMaximap(blip,toggle) if isElement(blip) and getElementType(blip)=="blip" and type(toggle)=="boolean" then return setElementData(blip,"DoNotDrawOnMaximap",not toggle,false) end return false end function setPlayerMapZoomFactor(z) if type(z)=="number" then if z>=minZoomLimit and z<=maxZoomLimit then local prevZoom=zoom zoom=z if z<prevZoom then zoomOutRecalculate() end return true end end return false end function setPlayerMapZoomRate(z) if type(z)=="number" then zoomRate=z return true end return false end function setPlayerMapMinZoomLimit(l) if type(l)=="number" then minZoomLimit=l return true end return false end function setPlayerMapMaxZoomLimit(l) if type(l)=="number" then maxZoomLimit=l return true end return false end function getPlayerMapMinZoomLimit() return minZoomLimit end function getPlayerMapMaxZoomLimit() return maxZoomLimit end function getPlayerMapColor() return R,G,B,A end
  3. India

    [HELP] F11 Map

    already there is code like this
  4. India

    [HELP] F11 Map

    I am using script for f11 map, problem is when i open f11 some scripts shows on infront of the map, here is picture what i mean, when i press the F11 i just want map to show on the screen, i want the rest scripts to hide when map opened client: local screenW,screenH = guiGetScreenSize() local middleX,middleY = screenW/2,screenH/2 local localPlayer = getLocalPlayer() local thisResource = getThisResource() local toggle = false local zoom = 1 local zoomRate = 0.1 local movementSpeed = 5 local minZoomLimit = 1 local maxZoomLimit = 5 local xOffset = 0 local yOffset = 0 local x,y = 0,0 local hSize,vSize = 0,0 local R,G,B,A = 255,255,255,175 local mapDrawColor = tocolor(R,G,B,A) local normalColor = tocolor(255,255,255,255) local mapFile = ":maximap/images/radar.png" local topLeftWorldX,topLeftWorldY = -3000,3000 local lowerRightWorldX,lowerRightWorldY = 3000,-3000 local mapWidth,mapHeight = 6000,6000 local pixelsPerMeter = screenH/6000 local imageOwnerResource = getThisResource() toggleControl("radar",false) local abs=math.abs function calculateFirstCoordinates() -- This function is for making export functions work without the map having been opened once hSize=pixelsPerMeter*mapWidth*zoom vSize=pixelsPerMeter*mapHeight*zoom x=middleX-hSize/2+xOffset*zoom y=middleY-vSize/2+yOffset*zoom end addEventHandler("onClientResourceStart",getResourceRootElement(),calculateFirstCoordinates) function unloadImageOnOwnerResourceStop(resource) if resource==imageOwnerResource and resource~=thisResource then setPlayerMapImage() end end addEventHandler("onClientResourceStop",getRootElement(),unloadImageOnOwnerResourceStop) function drawMap() if not toggle then dxDrawImage(0,0,0,0,mapFile,0,0,0,0,false) -- This is actually important, because otherwise you'd get huge lag when opening the maximap after a while (it seems to unload the image after a short while) else checkMovement() hSize=pixelsPerMeter*mapWidth*zoom vSize=pixelsPerMeter*mapHeight*zoom x=middleX-hSize/2+xOffset*zoom y=middleY-vSize/2+yOffset*zoom dxDrawImage(x,y,hSize,vSize,mapFile,0,0,0,mapDrawColor,false) drawRadarAreas() drawBlips() drawLocalPlayerArrow() end end addEventHandler("onClientPreRender",getRootElement(),drawMap) function drawRadarAreas() local radarareas=getElementsByType("radararea") if #radarareas>0 then local tick=abs(getTickCount()%1000-500) local aFactor=tick/500 for k,v in ipairs(radarareas) do local x,y=getElementPosition(v) local sx,sy=getRadarAreaSize(v) local r,g,b,a=getRadarAreaColor(v) local flashing=isRadarAreaFlashing(v) if flashing then a=a*aFactor end local hx1,hy1 = getMapFromWorldPosition(x,y+sy) local hx2,hy2 = getMapFromWorldPosition(x+sx,y) local width = hx2-hx1 local height = hy2-hy1 dxDrawRectangle(hx1,hy1,width,height,tocolor(r,g,b,a),false) end end end function drawBlips() for k,v in ipairs(getElementsByType("blip")) do if not getElementData(v,"DoNotDrawOnMaximap") then local icon=getBlipIcon(v) or 0 local size=(getBlipSize(v) or 2)*4 local r,g,b,a=getBlipColor(v) if icon~=0 then r,g,b=255,255,255 size=16 end local x,y,z=getElementPosition(v) x,y=getMapFromWorldPosition(x,y) local halfsize=size/2 dxDrawImage(x-halfsize,y-halfsize,size,size,"images/blips/"..icon..".png",0,0,0,tocolor(r,g,b,a),false) end end end function drawLocalPlayerArrow() local x,y,z=getElementPosition(localPlayer) local r=getPedRotation(localPlayer) local mapX,mapY=getMapFromWorldPosition(x,y) dxDrawImage(mapX-8,mapY-8,16,16,"images/blips/2.png",(-r)%360,0,0,normalColor,false) end function zoomOutRecalculate() local newVSize=pixelsPerMeter*mapHeight*zoom if newVSize>screenH then local newY=middleY-newVSize/2+yOffset*zoom if newY>0 then yOffset=-(middleY-newVSize/2)/zoom elseif newY<=(-newVSize+screenH) then yOffset=(middleY-newVSize/2)/zoom end else yOffset=0 end local newHSize=pixelsPerMeter*mapWidth*zoom if newHSize>screenW then local newX=middleX-newHSize/2+xOffset*zoom if newX>=0 then xOffset=-(middleX-newHSize/2)/zoom elseif newX<=(-newHSize+screenW) then xOffset=(middleX-newHSize/2)/zoom end else xOffset=0 end end function checkMovement() -- Zoom if getPedControlState("radar_zoom_in") and zoom<maxZoomLimit then zoom=zoom+zoomRate if zoom>maxZoomLimit then zoom=maxZoomLimit end elseif getPedControlState("radar_zoom_out") and zoom>minZoomLimit then zoom=zoom-zoomRate if zoom<minZoomLimit then zoom=minZoomLimit end zoomOutRecalculate() end -- Move if getPedControlState("radar_move_north") then local newY=y-yOffset*zoom+(yOffset+movementSpeed)*zoom if newY<0 then yOffset=yOffset+movementSpeed end end if getPedControlState("radar_move_south") then local newY=y-yOffset*zoom+(yOffset-movementSpeed)*zoom if newY>(-vSize+screenH) then yOffset=yOffset-movementSpeed end end if getPedControlState("radar_move_west") then local newXOff=(xOffset+movementSpeed) local newX=x-xOffset*zoom+newXOff*zoom if newX<0 then xOffset=xOffset+movementSpeed end end if getPedControlState("radar_move_east") then local newX=x-xOffset*zoom+(xOffset-movementSpeed)*zoom if newX>(-hSize+screenW) then xOffset=xOffset-movementSpeed end end end addEvent("onClientPlayerMapHide") addEvent("onClientPlayerMapShow") setElementData(getLocalPlayer(),"mapRender",true) function toggleMap() if not getElementData(getLocalPlayer(),"logedin") then return end if not getElementData(getLocalPlayer(),"mapRender") then return end if getElementData(getLocalPlayer(),"Harita") < 1 then return end --Eğer Harita var ise F11 Haritayı Açar. if toggle then if triggerEvent("onClientPlayerMapHide",getRootElement(),false) then toggle=false end else if triggerEvent("onClientPlayerMapShow",getRootElement(),false) then toggle=true end end end bindKey("F11","up",toggleMap) -- Export functions function getPlayerMapBoundingBox() return x,y,x+hSize,y+vSize end function setPlayerMapBoundingBox(startX,startY,endX,endY) if type(startX)=="number" and type(startY)=="number" and type(endX)=="number" and type(endY)=="number" then -- TODO return true end return false end function isPlayerMapVisible() return toggle end function setPlayerMapVisible(newToggle) if type(newToggle)=="boolean" then toggle=newToggle if toggle then triggerEvent("onClientPlayerMapShow",getRootElement(),true) else triggerEvent("onClientPlayerMapHide",getRootElement(),true) end return true end return false end function getMapFromWorldPosition(worldX,worldY) local mapX=x+pixelsPerMeter*(worldX-topLeftWorldX)*zoom local mapY=y+pixelsPerMeter*(topLeftWorldY-worldY)*zoom return mapX,mapY end function getWorldFromMapPosition(mapX,mapY) local worldX=topLeftWorldX+mapWidth/hSize*(mapX-x) local worldY=topLeftWorldY-mapHeight/vSize*(mapY-y) return worldX,worldY end function setPlayerMapImage(image,tLX,tLY,lRX,lRY) if image and type(image)=="string" and type(tLX)=="number" and type(tLY)=="number" and type(lRX)=="number" and type(lRY)=="number" then sourceResource = sourceResource or thisResource if string.find(image,":")~=1 then sourceResourceName = getResourceName(sourceResource) image = ":"..sourceResourceName.."/"..image end if dxDrawImage(0,0,0,0,image,0,0,0,0,false) then imageOwnerResource = sourceResource mapFile = image topLeftWorldX,topLeftWorldY = tLX,tLY lowerRightWorldX,lowerRightWorldY = lRX,lRY mapWidth,mapHeight = lRX-tLX,tLY-lRY pixelsPerMeter = math.min(screenW/(mapWidth),screenH/mapHeight) zoom = 1 xOffset = 0 yOffset = 0 return true end elseif not image then imageOwnerResource = thisResource mapFile = ":maximap/images/radar.jpg" topLeftWorldX,topLeftWorldY = -3000,3000 lowerRightWorldX,lowerRightWorldY = 3000,-3000 mapWidth,mapHeight = 6000,6000 pixelsPerMeter = screenH/6000 zoom = 1 xOffset = 0 yOffset = 0 return true end return false end function getPlayerMapImage() return mapFile end function setPlayerMapColor(r,g,b,a) local color=tocolor(r,g,b,a) if color then mapDrawColor = color R,G,B,A = r,g,b,a return true end return false end function setPlayerMapMovementSpeed(s) if type(s)=="number" then movementSpeed=s return true end return false end function getPlayerMapMovementSpeed() return movementSpeed end function getPlayerMapZoomFactor() return zoom end function getPlayerMapZoomRate() return zoomRate end function getBlipShowingOnMaximap(blip) if isElement(blip) and getElementType(blip)=="blip" then return not getElementData(blip,"DoNotDrawOnMaximap") end return false end function setBlipShowingOnMaximap(blip,toggle) if isElement(blip) and getElementType(blip)=="blip" and type(toggle)=="boolean" then return setElementData(blip,"DoNotDrawOnMaximap",not toggle,false) end return false end function setPlayerMapZoomFactor(z) if type(z)=="number" then if z>=minZoomLimit and z<=maxZoomLimit then local prevZoom=zoom zoom=z if z<prevZoom then zoomOutRecalculate() end return true end end return false end function setPlayerMapZoomRate(z) if type(z)=="number" then zoomRate=z return true end return false end function setPlayerMapMinZoomLimit(l) if type(l)=="number" then minZoomLimit=l return true end return false end function setPlayerMapMaxZoomLimit(l) if type(l)=="number" then maxZoomLimit=l return true end return false end function getPlayerMapMinZoomLimit() return minZoomLimit end function getPlayerMapMaxZoomLimit() return maxZoomLimit end function getPlayerMapColor() return R,G,B,A end
  5. Its work. Thank you so much for your help and for your time ??
  6. Ped stats changing by command, i want it when resource started, how can i? can anyone help commandName = "defaultstats" addCommandHandler (commandName, function(sot) setPedStat (sot, 22, 0) setPedStat (sot, 23, 0) outputChatBox("Stats Changed To Default!", sot, 255, 0, 0) end )
  7. Araç listesini ile yani (vehicles.xml) oynadıysan, F1 panelin açılır fakat "Araçlar" bölümü sayfası boş şekilde gözükür. Eğer sorun dediğim gibi ise "vehicles.xml" dosyasını buraya atarsan yardımcı olabilirim.
  8. India

    MTA Çökme Sorunu

    MTA için 32 bit işletim sistemi kullananlar genellikle şikayetçi sorunu bilmiyorum ama 32bit işletim sistemi ile MTA yı rahat oynayanı görmedim. Forum da bunu buldum, bi deneyip oyunu test eder misin
  9. MTA için 32 bit işletim sistemi kullananlar genellikle şikayetçi sorunu bilmiyorum ama 32bit işletim sistemi ile MTA yı rahat oynayanı görmedim. Forum da bunu buldum, bi deneyip test eder misin
  10. India

    FPS drops

    Her sunucu da böyle durum ile mi karşılaşıyorsun yoksa bu sadece tek bir sunucudan mı kaynaklanıyor. Eğer öyle ise sunucuda ki bazı scriptler çarpışıyor olabilir ve bu sunucu da ciddi fps drop yapar. Her sunucu da böyle oluyor dersen. Bilgisayarına virüs bulaşmış olabilir
  11. Hello Community, i was going to remove this "targetmarker" and i found this on google https://wiki.multitheftauto.com/wiki/SetPedTargetingMarkerEnabled But its not works, I have DayZ Gamemode and i want to disable this "targetmarker" from players and zombies. There is a way to remove? - I'm sorry if i make the topic in the wrong place. I'm new
  12. Merhabalar, Sunucumda headshot sistemi var. Tek sorunum greenzone(güvenli bölge) de oyuncuyu hiç bir türlü hasar veremezsiniz fakat Kafadan vurdugunuz zaman ölüyor. Tamamen headshot sistemi ile alakalıdır. Buna nasıl çözüm bulabiliriz? Yardımcı olabilecek birisi var mı acaba :)) headshot_s.Lua function MakePlayerHeadshot( attacker, weapon, bodypart, loss ) if getElementType ( source ) == "player" then if bodypart == 9 and not (getElementData(source,"invencible")) then triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) setPedHeadless ( source, true ) killPed( source, attacker, weapon, bodypart ) setTimer( BackUp, 900, 1, source ) end end end function MakeHeadshot( source, attacker, weapon, loss ) triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) killPed( source, attacker, weapon, 9 ) setPedHeadless ( source, true ) setTimer( BackUp, 900, 1, source ) end function BackUp( source ) if getElementType ( source ) == "player" then setPedHeadless ( source, false ) end end function outputHeadshotIcon (killer, weapon, bodypart) if bodypart == 9 then cancelEvent() exports.killmessages:outputMessage ( {getPlayerName(killer),{"padding",width=3},{"icon",id=weapon},{"padding",width=3},{"icon",id=256},{"padding",width=3},{"color",r=r1,g=g1,b=b1},getPlayerName(source) }, getRootElement(),r2,g2,b2) end end addEvent ( "onServerHeadshot", true ) addEventHandler( "onPlayerDamage", getRootElement(), MakePlayerHeadshot ) addEventHandler( "onPlayerKillMessage", getRootElement(), outputHeadshotIcon ) addEventHandler( "onServerHeadshot", getRootElement(), MakeHeadshot ) greenzone, server.Lua -- Format is: {x = 0, y = 0, z = 0, width = 0, depth = 0, height = 0}, local greenzones = { {x = 110, y = -2075, z = -40, width = 257, depth = 333, height = 200}, -- Giriş Yeri {x = 1150, y = -1375, z = -10, width = 120, depth = 100, height = 100} -- Hastane } -- Initialize all zones on resource start local z = {} function initGreenzones() if greenzones and #greenzones ~= 0 then for _, v in ipairs(greenzones) do if v then if v.x and v.y and v.z and v.width and v.depth and v.height then local c = createColCuboid(v.x, v.y, v.z, v.width, v.depth, v.height) local rarea = createRadarArea(v.x, v.y, v.width, v.depth, 0, 255, 0, 150) setElementParent(rarea, c) if c then z[c] = true for _, p in ipairs(getElementsWithinColShape(c, "player")) do setElementData(p, "greenzone", true) end for _, v in ipairs(getElementsWithinColShape(c, "vehicle")) do setElementData(v, "greenzoneveh", true) end addEventHandler("onElementDestroy", c, function() if z[source] then z[source] = nil end end ) addEventHandler("onColShapeHit", c, function(h) if h and isElement(h) and getElementType(h) == "player" then if getElementData(h, "colShapeFix_OUT") then setElementData(h, "colShapeFix_OUT", false) return end -- Hack to prevent shooting bug: if player teleports from one greenzone directly to another and fails to clean up (on time) if getElementData(h, "greenzone") then setElementData(h, "colShapeFix_IN", true) triggerClientEvent(h, "onEnterGreenzone", h) else setElementData(h, "greenzone", true) toggleControl(h, "fire", false) toggleControl(h, "next_weapon", false) toggleControl(h, "previous_weapon", false) toggleControl(h, "aim_weapon", false) toggleControl(h, "vehicle_fire", false) toggleControl(h, "vehicle_secondary_fire", false) --outputChatBox("[Hawk Yönetimi] Güvenli bölgeye giriş yaptınız.", h, 0, 220, 0) triggerClientEvent(h, "onEnterGreenzone", h) end end end ) addEventHandler("onColShapeHit", c, function(h) if h and isElement(h) and getElementType(h) == "vehicle" then setElementData(h, "greenzoneveh", true) end end ) addEventHandler("onColShapeLeave", c, function(h) if h and isElement(h) and getElementType(h) == "player" then if getElementData(h, "colShapeFix_IN") then setElementData(h, "colShapeFix_IN", false) return end if getElementData(h, "greenzone") then setElementData(h, "greenzone", false) toggleControl(h, "fire", true) toggleControl(h, "next_weapon", true) toggleControl(h, "previous_weapon", true) toggleControl(h, "aim_weapon", true) toggleControl(h, "vehicle_fire", true) toggleControl(h, "vehicle_secondary_fire", true) --outputChatBox("[Hawk Yönetimi] Güvenli bölgeden ayrılıyorsunuz.", h, 220, 220, 0) triggerClientEvent(h, "onLeaveGreenzone", h) else setElementData(h, "colShapeFix_OUT", true) end end end ) addEventHandler("onColShapeLeave", c, function(h) if h and isElement(h) and getElementType(h) == "vehicle" then setTimer(setElementData, 350, 1, h, "greenzoneveh", false) end end ) end end end end end end addEventHandler("onResourceStart", resourceRoot, initGreenzones) function resetGreenzoneData() for _, p in ipairs(getElementsByType("player")) do if isElement(p) then removeElementData(p, "greenzone") end end end addEventHandler("onResourceStop", resourceRoot, resetGreenzoneData)
  13. Already i explained the problem, "Helmet icon is not shows when used".
  14. Hello there, I have a DayZ mode. and there is helmet and vest system. They have an icon that is displayed when they are used. Screenshot is here; It appears when i use the vest, but the helmet is not visible. Can any one can solve this problem? Script files containing helmet and vest are here; survivorSystem_client.Lua inventory.Lua VestsMasksTable.Lua https://www.mediafire.com/file/o55ffgxfepskfu1/Dayz.zip/file Thanks... ? and sorry for my english.
  15. It is DayZ mode I have that files about fuel; survivorSystem_client.lua vehicle_spawns VehiclesTable
  16. Its DayZ mode, which server-side? i didnt understand My files;
  17. No error about fuel which lua files u need?
  18. Noone knows the problem?
  19. VehiclesTable.lua and vehicle_spawns.lua
×
×
  • Create New...