Jak włączę ręcznie zasoby radar i minimape to działa ale jak sie wyjdzie z serwera to już się nie pokazuję próbowałem dodać do auto startu acl i mtaserwera configu ale nic to nie dało.
Co mam zrobić aby mi radar cały czas się pokazywał
Witam, napisa?em sobie skrypt na otwieranie bramy, jednak po wgraniu go do folderu resources na file zilla nie pojawia mi sie on w grze jak chce go wgra?, prosz? o pomoc
function newNoti(el,txt,type)
if el==localPlayer then
if type>3 or type<0 or not tonumber(type) then
type=2
end
local type=types[type][1]
table.insert(msgs,{txt=txt,typ=type,easingFunction="Linear",startTime=getTickCount(),endTime=getTickCount()+5000})
end
end
addCommandHandler("dodaj",function(cmd,typ,...)
local msg=table.concat({...}," ")
newNoti(localPlayer,msg,tonumber(type))
end)
addEventHandler("onClientRender",root,function()
offset=0
for _,v in ipairs(msgs)do
local now = getTickCount()
local elapsedTime = now - v.startTime
local duration = v.endTime - v.startTime
local progress = elapsedTime / duration
local fAnimationTime = getEasingValue(progress, v.easingFunction)
Witam, odk?d zacz??em prace nad prac? magazyniera zapomnia?em jak sie robi?o aby gui sie tylko pokazywa?o osobie kt?ra wchodzi w marker kto? pomo?e dopisa? tutaj to do kodu?
Witam chce si? zalogowa? ale nie ma nigdzie linijki do wpisania loginu i hasla
dam pare kod?w bo nw jaki do tego s?u?y[lua]if getElementData(localPlayer, "player:sid") then return end
local root = getRootElement()
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize()
local screenW,screenH = guiGetScreenSize()
local blurStrength = 20
local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight)
blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx")
function renderblur()
if blur == true then
dxUpdateScreenSource(myScreenSource)
dxDrawImage(0, 0, screenWidth, screenHeight, blurShader)
end
end
addEventHandler("onClientRender", root, renderblur)
addEventHandler("onClientResourceStop", resourceRoot,
function()
if blurShader and isElement(blurShader) then
destroyElement(blurShader)
blurShader = nil
end
end)
x,y=2513.58, 1282.80-- my width
intro_step=math.random(0,850)
local sx,sy=guiGetScreenSize()
local data={ showed=nil, button={}, info=nil, misc=nil, }
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return ...
Cze?? jako ?e ostatnio ucz? si? robi? co? w LUA, i og?lnie wykorzystywa? zasoby, postanowi?em zrobi? zrobi? sobie ma?e co nieco
No i tutaj wychodz? do was z pytaniem, jak zrobi? aby by? sam panel logowania bez widocznych w prawym g?rnym rogu ekranu Element?w i oczywi?cie w lewym dolnym rogu Radaru.
Siema,
Pobra?em sobie tabik, wszystko dzia?a lecz nie pokazuje kolor?w gracza tylko tzw system szesnastkowy #fffff oraz nick potem, jak to zapobiec dodam ?e zrobione jest to dxdrawem oraz zmienn?
[lua]
--[[
Autor kodu: Wercio.
Wykonane dla GTAO.PL
Zakaz zmiany autora!
]]
local sw,sh = guiGetScreenSize()
foNte3 = dxCreateFont("tf.ttf",20) or "defaul-bold"
foNte2 = dxCreateFont("tff.ttf",17) or "defaul-bold"
foNte1 = dxCreateFont("tff.ttf",26) or "defaul-bold"
addEventHandler("onClientRender", root, function()
if isPlayerMapVisible() then return end
Witam, mam problem z przechowywalnia mianowicie gdy oddaje pojazd do przecho wszystko dzia?a lecz jak chce go odebra? to w panelu nic si? nie pokazuje.
Witam, ot?? wykorzystuj? pewn? animacje, po kilku sekundach, gui si? w??cza(powoli, na spokojnie alpha si? podwy?sza), aczkolwiek gdy chcemy wy??czy?, to ju? tej animacji nie ma.
local a = interpolateBetween(0,0,200,200,0,255,((getTickCount()-tick)/2600),"Linear")
Witam mam pewien problem ot?? pr?buje zrobi? sobie skrypt na prace ale po wej?ciu w marker pojawia si? obrazek na dos?ownie mniej ni? sekund?. Prosz? o pomoc
local sx, sy = guiGetScreenSize(); local zoom = 1920/sx;
local rozpocznij = createMarker(-242.44921875, -236.5009765625, 2.4296875-1, "cylinder", 1.0, 150, 150, 150, 255) local blip_rozpocznij = createBlipAttachedTo(rozpocznij, 46) local status = false;
addEventHandler("onClientMarkerHit", getRootElement(),
function(plr)
if source == rozpocznij then else return end if getElementType( plr ) == "player" then else return end if plr == getLocalPlayer() then else return end if isElementWithinMarker ( plr, rozpocznij ) then else return end
dxDrawImage(sx/2 - 300/zoom, sy - 900/zoom, 500/zoom, 500/zoom, "images/window.png") end )
function endOfWork()
if destinationMarker and isElement(destinationMarker) then
destroyElement(destinationMarker)
destinationMarker = nil
end
if destBlip and isElement(destBlip) then
destroyElement(destBlip)
destBlip = nil
end
end
function takeFurniture(he, md, plr)
if he ~= localPlayer then return end
if not getPedOccupiedVehicle(he) then return end
local car = getPedOccupiedVehicle(he)
if getElementData(car, "pojazd_opis") == "Dostawca Gazu - Firma GAZOL" then
if getElementData(he, "zaladowany") == false then
setElementFrozen(car,true)
outputChatBox("* Ladujesz Butle z gazem na pake. Prosze Czekac!", 255, 255, 255)
setTimer(function()
setElementData(car, "pojazd_opis", "Dostawca Gazu - Firma GAZOL")
...
Witam mam taki problem, ?e gui pokazuje si? dla wszystkich. kod jest po stronie clienta kod:
[lua]teoriaAPokaz = false
teoriaBPokaz = false
teoriaCPokaz = false
local screenW, screenH = guiGetScreenSize()
local teoriaA = createMarker (2489.12, -1686.21, 51.95-1, "cylinder", 1.5, 255, 255, 255, 150)
setElementInterior(teoriaA, 1)
local textA = createElement("text")
setElementData(textA, "name", "Cz??? teoretyczna prawa jazdy kat.A")
setElementPosition(textA, 2489.12, -1686.21, 51.95)
setElementInterior(textA, 1)
local teoriaB = createMarker (2471.55, -1676.93, 51.95-1, "cylinder", 1.5, 255, 255, 255, 150)
setElementInterior(teoriaB, 1)
local textB = createElement("text")
setElementData(textB, "name", "Cz??? teoretyczna prawa jazdy kat.B")
setElementPosition(textB, 2471.55, -1676.93, 51.95)
setElementInterior(textB, 1)
local teoriaC = createMarker (2499.44, -1672.87, 51.95-1, "cylinder", 1.5, 255, 255, 255, 150)
setElementInterior(teoriaC, 1)
local textC = createElement("text")
setElementData(textC, "name", "Cz??? teoretyczna prawa jazdy kat.C")
setElementPosition(textC, 2499.44, -1672.87, 51.95)
setElementInterior(textC, 1)
addEventHandler("onClientMarkerLeave", teoriaA, function(plr)
if teoriaAPokaz == true then
teoriaAPokaz = false
removeEventHandler("onClientRender", root, teoriaAGui)
end
end)
witam pr?buj? odbugowa? paczke stories rpg i mam taki problem i? gdy? nie pojawia mi sie gui jak chce wystawic auto na gielde gdy auto jest zniszczone i wjade w market to jest napisane ze auto jest uszkodzone a jesli auto nie jest uszkodzone i wszystko jest okej gdy wje?d?am w marker nic sie nie pokazuje 0 reakcji tu macie kod
[quote]
local screenW, screenH = guiGetScreenSize()
local sx, sy = guiGetScreenSize()
local w,h=(screenW/1680), (screenH/1050)
local font=dxCreateFont("f.ttf", 11)
local font2=dxCreateFont("f.ttf", 12)
local font3=dxCreateFont("f.ttf", 14)
local img=dxCreateTexture("i/sale.png")
function mysz(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end
local pokapoka=false
addEventHandler("onClientRestore", root, function()
localPlayer:setData("player:minimalized", false)
if timer and timer.valid then timer:destroy() end
end)
addEventHandler("onClientRender", root, function()
if not isPlayerMapVisible() and not localPlayer:getData("player:hud_visible") then
local position = {getElementPosition(localPlayer)}
local city = getZoneName(position[1], position[2], position[3], t...
addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and state=="down" then
if not pracaPanelGUI then return end
if Mysz(x, y, x, y) then
outputChatBox("Rozpocz??e? prac?")
ukryjGUI(localPlayer)
end
end
end)
addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and state=="down" then
if Mysz(x, y, x, y) then
showCursor(false)
removeEventHandler("onClientRender",root,pracaGUI)
end
end
end)
function pokazGUI(plr)
if plr ~= localPlayer then return end
addEventHandler("onClientRender",root,pracaGUI)
showCursor(true,true)
pracaPanelGUI = true
end
addEvent("pracaPanelGUI:pokaz",true)
addEventHandler("pracaPanelGUI:pokaz",root,p...
Witam. Wie kto? co jest w tym kondzie nie tak, ?e td nie pokazuje? Kod si? wykonuje bo wrzuci?em printa i wysy?a info w konsoli ale td si? nie pokazuje:
M?j problem polega na tym, ?e nie przechodzi mi na stron? clienta.
w server-side robi? tak:
function playerJoin() triggerClientEvent(source, "openLoginGUI", source, true) outputChatBox("dolaczyl", source) -- testowe
end
addEventHandler("onPlayerJoin", getRootElement(), playerJoin)
a w client-side robi? tak:
function loginGUI(screen)
if (screen == true) then
guiSetVisible(GUIEdior.window[1], true) showCursor(true) fadeCamera(true) guiSetInputEnabled(false) end
end
addEvent("openLoginGUI", true) addEventHandler("openLoginGUI", resourceRoot, loginGUI)
Oczywi?cie w cliencie wy?ej mam tworzenie GUI.
I dlaczego to GUI si? nie pokazuje? Dzi?ki z g?ry za pomoc
Siemka . Przerobi?em pod wzgl?dem graficznym hud z lifeline i po zrobieniu prac dorywczych oraz zarabianiu nie pokazuje zarobionych $$ . Jakie? pomys?y ?
Witajcie nie dziala mi tuner po wejsciu w marker nic sie nie pokazuje brak db3
[code]--[[
Resource: OURGame v2
Developers: Split <[email protected]>
You have no right to use this code without my permission.
(c) 2015 <[email protected]>. All rights reserved.
]]
local jobs={
["tuner-sf"]={
code="tuner-sf",
desc="Praca Tunera",
desc2="",
positionMarker={-2270.89,-149.22,35},
text="* Nie jeste? zatrudniony(a) jako tuner w tym warsztacie.",
cuboid={-2297.40,-158.27,34.5, 44, 55.75, 6.5},
maxEmployees=2,
},
}
for i,v in pairs(jobs) do
local marker=createMarker(v.positionMarker[1], v.positionMarker[2], v.positionMarker[3]-0.90, "cylinder", 1.2, 78, 255, 0, 155)
setElementDimension(marker, v.positionMarker[5] or 0)
setElementInterior(marker, v.positionMarker[4] or 0)
setElementData(marker,"m:duty",v.code or 0)
local cs= createColCuboid(v.cuboid[1],v.cuboid[2],v.cuboid[3],v.cuboid[4],v.cuboid[5],v.cuboid[6])
setElementData(cs,"m:duty",v.code)
addEventHandler ( "onColShapeLeave", cs, function(el,md)
if getElementData(el,"player:duty") == getElementData(source,"m:duty") then
setElementData(el,"player:duty",false)
outputChatBox("Wyszed?e? poza teren Tunera.", el)
local skin=getElementData(el,"player:skin")
setElement...
Witam. Robi?em m?j pierwszy w ?yciu panel logowania :>. Oskryptowa?em go tak jak potrafi?em (nie wiem czy jest co? potrzebnego jeszcze) ale po starcie skryptu panel si? nie pokazuje. Tak samo nie ma ?adnego b??du w db3. Za pomoc daj?
Mam lekko zmodyfikowany system prywatnych pojazd?w od PanaPrezesa .. gdy wystawiam ofert? sprzeda?y pojazdu nie wy?wietlaj? si? jego dane ani dane sprzedaj?cego.
function createGUIKupnoUzywanego()
if not guiku then
guiku = {}
for k,v in ipairs(vehs)do
taxi[k]=createVehicle(420,v[1],v[2],v[3])
setElementRotation ( taxi[k], 0, 0, 89.538452148438 )
setElementData(taxi[k],"vehicle:taxi",true)
end
addEventHandler("onPlayerVehicleEnter",root,function(veh,seat)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Taxi")) then
if seat==0 then
if allow_vehs[getElementModel(veh)] then
if getElementData(veh,"vehicle:taxi") then
outputChatBox("*Zacz??es prac?. Dostaniesz informacj? o po?o?eniu klienta po wezwaniu us?ugi.",source,255,255,255)
setElementData(source,"player:taxi",true)
end
end
end
if allow_vehs[getElementModel(veh)] then
if getElementData(veh,"vehicle:taxi") then
setElementData(source,"taxi",false)
end
end
end
end)
if allow_vehs[getElementModel...
Witam, mam problem z pewnym skryptem, mianowicie chodzi o to ze nie pokazuje mi % zape?nienia, pomo?e kto? to naprawi??
Kody:
-server
[lua]
local jobMarker
local jobVehicle
local jobOdbieranie = createMarker(1323.5300292969,1472.5004882813,10.8203125-1, "cylinder", 6, 0, 0, 255)
local positionTrash = {
{346.6647644043,2539.1455078125,16.75606918335},
{-1280.5670166016,-73.867202758789,14.1484375},
{1985.8670654297,-2395.0385742188,13.546875},
{1336.6829833984,1454.7218017578,10.8203125},
}
function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end
if jobBlip and isElement(jobBlip) then
destroyElement(jobBlip)
jobBlip = nil
end
end
function hideNextPoint(el, md)
if el ~= localPlayer or not md then return end
if not getPedOccupiedVehicle(el) then return end
local pojazd = getPedOccupiedVehicle(el)
if not getElementData(pojazd, "pojazd_smieci") then setElementData(pojazd, "pojazd_smieci", 0) end
if getElementData(pojazd, "pojazd_smieci") > 100 then
outputChatBox("* Posiadasz 100% Towar?w Wro? Do Lotniska LV Aby Roz?adowa?.")
return
end
local smieci = getElementData(pojazd, "pojazd_smieci") + math.random(25, 35)
Witam, mam pewien, zdawa?oby si?, prosty problem.
Tak jak wspomnia?em w temacie, gdy wpisuj? komend? animacja pozornie odbywa si?, lecz ?aden inny gracz jej nie widzi (skin stoi nieruchomo jak gdyby nigdy nic). Pr?bowa?em ju? wszystkiego i szczerze m?wi?c brakuje mi pomys??w... zwracam si? wi?c z pro?b? o pomoc.