Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: wymagany
1. Gdzie można ustawić wymagany poziom w pracy?
Cześć, Przychodzę z pytaniem, gdzie mogę zmienić wymagany poziom na pracach? Paczka DemusMTA 2020

tutaj skrypt po stronie clienta w pracy i dmta_job-settings


[code] local sx, sy = guiGetScreenSize()
local tick = getTickCount( )

local settings = {

job_markerpos = {-95.22, 25.34, 3.12},
pos_x = 1280,
pos_y = 720,
jobCode = "pszczelarz",
gui = false,
guiJob = false,
bees = 0,
targetCol = nil,
targetBlip = nil,

}

local ule = {

{-69.16, 54.96, 3.12, 0, -110, 0},
{-70.76, 50.96, 3.12, 0, -110, 0},
{-72.26, 46.96, 3.12, 0, -110, 0},

}

local beePos = {}

for i,v in ipairs(ule) do
i = createObject(1899, v[1], v[2], v[3]-0.9)
setElementRotation(i, v[4]+90, v[5], v[6])

marker = createMarker(v[1], v[2], v[3]-0.85, "cylinder", 2, 255, 51, 204, 75)
setElementData(marker, "marker:ped", true)
setElementData(marker, "marker:text", "PODEJDŹ ABY ZEBRAĆ MIÓD")
end

local w, h = (sx/settings.pos_x),(sy/settings.pos_y)
local zoom = 1
if sx < settings.pos_x then
zoom = math.min(2, settings.pos_x / sx)
end

addEventHandler( "onClientResourceStart", resourceRoot, function()
marker = createMarker(settings.job_markerpos[1], settings.job_markerpos[2], settings.job_markerpos[3]-1, "cylinder", 2, 255, 51, 204, 75)
setElementData(marker, "marker:text", "PRACA DORYWCZA - PSZCZELARZ")

addEventHandler( "onClientMarkerHit", ...
2. Zabija a ma się wymagany skin
Witam znalaz?em taki skrypt na to ?e bez wyznaczonego skina zabija gracza lecz gdy ma si? wyznaczony skin (skin o ID 18) i tak zabija a ma nie zabija?. Dodam ?e to jest skrypt do gamemoda DayZ.
Kodzik:
[lua]cuboid = createColCuboid (-1994.9669,614.15338,-35.015625, 92, 110, 450)

Infection_TIMER = { }
Infection_ID = "18"

function target(element, dim)
if dim == true then
setTimer(target2, 5000, 1, element, dim)
outputChatBox("Masz 5 sekund inaczej umrzesz od wysokiej infekcji!", element)
end
end
addEventHandler("onColShapeHit", cuboid, target)

addEventHandler("onColShapeLeave", cuboid, function(element, dim)
local gracz = (getElementType(element) == "player" and element or getVehicleController(element))
if isTimer(Infection_TIMER[element]) then killTimer(Infection_TIMER[element]) end
end)

function Infection_killIntruder(p)
setElementData(p, "blood", -20)
setTimer(target2, 100, 1, p, true)
end


function target2(element, dim)
if isElementWithinColShape(element, cuboid) then
if getElementType(element) == "player" then
gracz = element
if getElementData(gracz, "skin") ~= Infection_ID then
Infection_TIMER[element] = setTimer(Infection_killIntruder, 150, 1, gracz)
...