-
Posts
78 -
Joined
-
Last visited
Everything posted by Kors
-
dont work, i need blackscreen when downloading files, when all is downloaded , then start login panel
-
How to set blackscreen in connect , when player connect and download files
-
Not work
-
Такая проблемка, как можно сделать так что бы в сейв зоне машины не взрывались точнее полный год мод на всю технику
-
local playerMoney = getPlayerMoney ( localPlayer ) local messages = { } local sx, sy = guiGetScreenSize ( ) addEventHandler ( "onClientRender", root, function ( ) local tick = getTickCount ( ) if ( playerMoney ~= getPlayerMoney ( localPlayer ) ) then local pM = getPlayerMoney ( localPlayer ) if ( pM > playerMoney ) then local diff = pM - playerMoney table.insert ( messages, { diff, true, tick + 5000, 180 } ) else local diff = playerMoney - pM table.insert ( messages, { diff, false, tick + 5000, 180 } ) end playerMoney = pM end if ( #messages > 7 ) then table.remove ( messages, 1 ) end for index, data in ipairs ( messages ) do local v1 = data[1] local v2 = data[2] local v3 = data[3] local v4 = data[4] dxDrawRectangle ( sx - 220, (sy-20)-(index*25), 200, 20, tocolor ( 0, 0, 0, v4 ) ) if ( v2 ) then dxDrawText ( "+ $"..convertNumber ( v1 ), sx - 200, (sy-18)-(index*25), 50, 20, tocolor ( 0, 255, 0, v4+75 ), 1, 'default-bold' ) else dxDrawText ( "- $"..convertNumber ( v1 ), sx - 200, (sy-18)-(index*25), 50, 20, tocolor ( 255, 0, 0, v4+75 ), 1, 'default-bold' ) end if ( tick >= v3 ) then messages[index][4] = v4-2 if ( v4 <= 25 ) then table.remove ( messages, index ) end end end end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end
-
I dont see players blips on radar when distance is long , when player going border lines radar function onClientResourceStart() local enableBlips = true local blip = 7 local map = Map.getInstance():init() map:setLocationOnScreen(x*30,y*550,x*250,y*150) map:setColor(255,255,255,255) --map:set3DRotation(-40) -- sintax: (float rotationX, float rotationY, float rotationZ,) map:setVisible(true) map.switch = function() map:setVisible(not map:isVisible()) end if(not isKeyBound('F11', 'down', map.switch)) then bindKey('F11', 'down', map.switch) end setPlayerHudComponentVisible("radar",false) end addEventHandler("onClientResourceStart",resourceRoot,onClientResourceStart) function onClientResourceStop() setPlayerHudComponentVisible("radar",true) end addEventHandler("onClientResourceStop",resourceRoot,onClientResourceStop) function isKeyBound(key, keyState, handler) local handlers = getFunctionsBoundToKey(key) for k,v in pairs(handlers or {}) do if(v == handler) then return true end end return false end
-
How change kill message text to bold
-
Dont work, zombie_killmessage/message_server.lua:7: exports: Call to non-running server resource (killmessages) [string "?"]
-
I need for all player dual colt, how set skill for all
-
Dont work
-
you about warnings? use thet? replace toggleControl to thet?
-
can u add thet ? i dont now how, safecol = createColCuboid ( -746.99713134766, 888.54418945313, 12, 255, 255, 255 ) safeZoneRadar = createRadarArea ( -746.99713134766, 888.54418945313, 150, 150, 153, 235, 255 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone(hitElement,thePlayer) if (getElementData (hitElement, "zombie") == true) then killPed (hitElement) else toggleControl (hitElement, "fire", false ) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(leaveElement, thePlayer) if (getElementData (leaveElement, "zombie") == true) then killPed (leaveElement) else toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) and how fix this errors? [2018-03-24 23:05:31] WARNING: anti-zombie-area.lua:11: Bad argument @ 'toggleControl' [Expected player at argument 1, got vehicle] [2018-03-24 23:05:33] WARNING: anti-zombie-area.lua:23: Bad argument @ 'toggleControl' [Expected player at argument 1, got vehicle] [2018-03-24 23:05:33] WARNING:anti-zombie-area.lua:24: Bad argument @ 'toggleControl' [Expected player at argument 1, got vehicle] [2018-03-24 23:05:33] WARNING: anti-zombie-area.lua:25: Bad argument @ 'toggleControl' [Expected player at argument 1, got vehicle] [2018-03-24 23:05:33] WARNING: anti-zombie-area.lua:9: Bad argument @ 'toggleControl' [Expected player at argument 1, got vehicle] [2018-03-24 23:05:33] WARNING: anti-zombie-area.lua:10: Bad argument @ 'toggleControl' [Expected player at argument 1, got vehicle]
-
How to set god mod on vehicle and players on safe zone
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=12094| install this script, and thet dont work, how fix?
-
function onClientResourceStart() map = Map.new():init() map:setBounds(x*30,y*30,x*1306,y*708) map:setAlpha(200) radar = Map.new():init() radar:setBounds(x*20, y*460, x*267, y*267) radar:setStyle(2) radar:setAlpha(200) radar:setBlipSize(x*24) radar:setVisible(true) map.Switch = function() map:setVisible(not map:isVisible()) radar:setVisible(not map:isVisible()) showChat(not map:isVisible()) end bindKey('F11', 'down', map.Switch) setPlayerHudComponentVisible("radar",false) toggleControl("radar",false) end how change this to guigetscreensize
-
How can i set on ped/zombie fire ? createfire
-
How? local enableBlips = true local renderNorthBlip = true local alwaysRenderMap = false local worldW, worldH = 3000,3000 local blip = 7 local sx, sy = guiGetScreenSize() local rt = dxCreateRenderTarget(290,175) local xFactor, yFactor = sx/1366,sy/768 local yFactor = xFactor function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end function getPointFromDistanceRotation(x, y, dist, angle) local a = math.rad(90 - angle); local dx = math.cos(a) * dist; local dy = math.sin(a) * dist; return x+dx, y+dy; end function RADAR() --Radar config setPlayerHudComponentVisible("area_name", false) setPlayerHudComponentVisible("vehicle_name", false) setPlayerHudComponentVisible("radar", false) local mW, mH = dxGetMaterialSize(rt) local x, y = getElementPosition(localPlayer) local X, Y = mW/2 -(x/(6000/worldW)), mH/2 +(y/(6000/worldH)) local camX,camY,camZ = getElementRotation(getCamera()) dxSetRenderTarget(rt, true) if alwaysRenderMap or getElementInterior(localPlayer) == 0 then dxDrawRectangle(0, 0, mW, mH, 0xFF7CA7D1) dxDrawImage(X - worldW/2, mH/5 + (Y - worldH/2), worldW, worldH, "gfx/world.png", camZ, (x/(6000/worldW)), -(y/(6000/worldH))) -- dxSetRenderTarget() dxDrawImage((18)*xFactor, sy-((216))*yFactor, (293)*xFactor, (177)*yFactor, "gfx/radarbg.png", 0, 0, 0, tocolor(0, 0, 0, 180)) dxDrawImage((30+5)*xFactor, sy-((200+5))*yFactor, (270-10)*xFactor, (155)*yFactor, rt, 0, 0, 0, tocolor(255, 255, 255, 80)) --# Blips local rx, ry, rz = getElementRotation(localPlayer) local lB = (33)*xFactor local rB = (8+290)*xFactor local tB = sy-(208)*yFactor local bB = tB + (155)*yFactor local cX, cY = (rB+lB)/2, (tB+bB)/2 +(35)*yFactor local toLeft, toTop, toRight, toBottom = cX-lB, cY-tB, rB-cX, bB-cY for k, v in ipairs(getElementsByType("blip")) do local bx, by = getElementPosition(v) local actualDist = getDistanceBetweenPoints2D(x, y, bx, by) local maxDist = getBlipVisibleDistance(v) if actualDist <= maxDist and getElementDimension(v)==getElementDimension(localPlayer) and getElementInterior(v)==getElementInterior(localPlayer) then local dist = actualDist/(6000/((worldW+worldH)/2)) local rot = findRotation(bx, by, x, y)-camZ local bpx, bpy = getPointFromDistanceRotation(cX, cY, math.min(dist, math.sqrt(toTop^2 + toRight^2)), rot) local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) local bid = getElementData(v, "customIcon") or getBlipIcon(v) local _, _, _, bcA = getBlipColor(v) local bcR, bcG, bcB = 255, 255, 255 if getBlipIcon(v) == 0 then bcR, bcG, bcB = getBlipColor(v) end local bS = getBlipSize(v) dxDrawImage(bpx -(blip*bS)*xFactor/2, bpy -(blip*bS)*yFactor/2, (blip*bS)*xFactor, (blip*bS)*yFactor, "gfx/blip/"..bid..".png", 0, 0, 0, tocolor(bcR, bcG, bcB, bcA)) end end if renderNorthBlip then local rot = -camZ+180 local bpx, bpy = getPointFromDistanceRotation(cX, cY, math.sqrt(toTop^2 + toRight^2), rot) local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) local dist = getDistanceBetweenPoints2D(cX, cY, bpx, bpy) local bpx, bpy = getPointFromDistanceRotation(cX, cY, dist, rot) if bpx and bpy then local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) dxDrawImage(bpx -(blip*2)/2,bpy -(blip*2)/2,blip*2,blip*2,"gfx/blip/4.png",0,0,0) end end dxDrawImage(cX -(blip*2)*xFactor/2,cY -(blip*2)*yFactor/2,(blip*2)*xFactor,(blip*2)*yFactor, "gfx/player.png", camZ-rz, 0, 0) end end addEventHandler("onClientRender", root, RADAR) function Visible() if isVisible then addEventHandler("onClientRender", root, RADAR) else removeEventHandler("onClientRender", root, RADAR) end isVisible = not isVisible end bindKey ("F11", "down", Visible)
-
how to visible on the map only teammates, only team players see their players, Allies see only their own