Wi?c zaczne od pocz?tku.
Postanowi?em przerobi? pewien radar(z gps-em) z brazylijskiego forum
Wi?c grafiki pozmienia?em i wzi??em si? za dodawanie nazw do blip?w
Podczas dodawania nazw do pierwszych kilku blip?w(11) wszystko dzia?a?o jak nale?y lecz jak chce doda? kolejn? nazw? (pr?bowa?em z innymi nazwami/blipami ale jest to samo)to radar automatycznie znika
tak wygl?da kod z nazwami z przerobionego pliku :
[code]local s = {guiGetScreenSize()}
local radarS = {s[1]-400, s[2]-200}
local radarP = {s[1]/2-radarS[1]/2, s[2]/2-radarS[2]/2}
local vizSzin = tocolor(110, 158, 204,255)
local nagymap
local radarM = {3072,3072}
local blipMeret = {20,20}
local jatekosMeret = {12,12}
local zoom = 2
local minZoom = 1
local maxZoom = 2
local zoomRadio = 0.05
local mozgatAdat = {0,0}
local honnanMozgat = {0,0}
local chatetRejtett = false
utiBlip = nil
gpsPontok = {}
radarMegjelenitve = false -- Ha ez igaz akkor a minimapot nem rendereli
addEventHandler( "onClientResourceStart", getRootElement( ),
function ( resource )
if resource ~= getThisResource() then return end
-- R?gi radar t?rl?se
toggleControl("radar", true)
nagymap=dxCreateRenderTarget(radarS[1], radarS[2],false)
radar=dxCreateRenderTarget(radarS[1], radarS[2],false)
setPlayerHudComponentVisible("radar",false)
end
);
addEventHandler("onClientKey", getRootElement(), function(gomb, statusz)
if(gomb == "F11" and sta...
Pi?tkowa zapowied? GTA: The Trilogy - The Definitive Edition wywo?a?a oburzenie - za spraw? tego, ?e Rockstar rozpocz??o wycofywanie trylogii sk?adaj?cej si? na III, Vice City, San Andreas z pierwszych rynk?w, by "zrobi? miejsce" od?wie?onym odpowiednikom. Grand Theft Auto: The Trilogy nie jest ju? dost?pne w krajach takich jak: Australia, Azja oraz na Bliskim Wschodzie, wkr?tce "zmiany" maj? nadej?? tak?e w Europie. Niebawem mo?emy spodziewa? si?, ?e b?dziemy mogli si?gn?? wy??cznie po Grand Theft Auto: The Trilogy - Definitive Edition. Wed?ug plotek od?wie?ony pakiet mimo niewielkiej liczbie zmian jak? tw?rcy chc? zaimplementowa? w The Definitive Edition, ceny w sklepach internetowych, kt?re ju? oferuj? mo?liwo?? z?o?enia przedpremierowego zam?wienia wydaj? si? bardzo wysokie.
Witam czy wie kto? mo?e jak usun?? domy?lny hud z mta poniewa? dodaje nowy i po w??czeniu skryptu lub restarcie wszystko jest ok ale po zrobieniu reconnect hudy nak?adaj? si? na siebie nawzajem to samo dzieje si? po odpaleniu i wyj?ciu z dashborda pod f5 z g?ry dzi?ki za pomoc postawie piwko!
Nada?em hud'owi elementdate "hud" po wci?ni?ciu f2 powinnen znika? lecz nie znika
[lua]--last edit
local sx, sy = guiGetScreenSize()
setPlayerHudComponentVisible("all", false)
setPlayerHudComponentVisible("radar", true)
function sw(value)
return sx*value/1920
end
function sh(value)
return sy*value/1080
end
setElementData(localPlayer, "hud", true)
local font = dxCreateFont("gtav.ttf", sw(20))
local font2 = dxCreateFont("normal.ttf", sw(14))
local pos={
server = { x = 2700, y = -525, w = 825, h = 627},
imgHud = { x = 0, y = 0, w = 1920, h = 1080},
imgKolo = { x = 0, y = 0, w = 115, h = 115}
}
local images={
hud = dxCreateTexture('img/hud.png', 'argb', false, 'clamp'),
pasek = dxCreateTexture('img/pasek.png', 'argb', false, 'clamp'),
kolo = dxCreateTexture(':rn_avatars/kolo.png', 'argb', false, 'clamp'),
}
function render()
local player={
name = getPlayerName(localPlayer),
money = przecinek(getElementData(localPlayer, "player:money") or 0)
}
Witam po klikni?ciu w dane miejsce powinno si? wy?wietli? zdj?cie na ekranie lecz to zdj?cie si? nie wy?wietla tylko mignie na sekund? i si? wy??czy wie kto? mo?e o co chodzi ?
[ Dodano: 2020-06-12, 12:09 ]
Dobra jednak naprawi?em warto zrobi? to jako onClientRender i zreturn endowa? gdy gracz nie jest zalogowany dla tych kt?rym si? to mo?e przyda?
bindKey("lshift", "both", function(key,state)
if getPedOccupiedVehicle ( localPlayer ) and getPedOccupiedVehicleSeat( localPlayer ) == 0 then
if state == "down" then
interakcja(true)
pokazinterakcje = true
setElementData(localPlayer,"wybor",1)
elseif state == "up" then
interakcja(false)
pokazinterakcje = false
end
end
end)
hej, daje mute wszystko ladnie nie moge pisac na serwerze, zapisuje do bazy danych ale po rc moge znowu pisac ;/
tutaj kod,. moze jakis blad jest z gory dzieki za pomoc
[code]addCommandHandler('wycisz', function(plr,cmd,cel,time,type, ...)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) then
local text = table.concat({...}, " ")
if not cel or not tonumber(time) or not type or not text then
outputChatBox("QG • U?ycie: /wycisz <nick/ID> <czas> <jednostka: m/h/y/w> <pow?d>", plr)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("QG • Nie znaleziono podanego gracza.", plr)
return
end
local czas_tabela=pobierzDate(type,time)
triggerClientEvent(root, "admin:rendering", root, "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." otrzyma? kar? wyciszenia od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." ("..time .. type ..") nz powodem: "..text)
if type == "m" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_mute (serial,reason,time) VALUES (?,?,NOW() + INTERVAL ? minute)",getPlayerSerial(target),text,time)
elseif type == "h" then
exports["pystories-db"]:dbSet("INS...
Jak zrobi? aby wy?wietla?a si? informacja o ?le wprowadzonym loginie i ha?le przez 5 s?
addEventHandler("onClientClick", root, function(btn,state) local login = guiGetText(gui.login) local pass = guiGetText(gui.pass)
if guiGetVisible(gui.login) and guiGetVisible(gui.pass) then if btn == "left" and state == "up" then if isMouseInPosition(0*w, 590*h, 428*w, 64*h) then
triggerServerEvent("tryLogin", resourceRoot, login, pass)
elseif isMouseInPosition(0*w, 655*h, 428*w, 64*h) then if #login >= 3 and #pass >= 3 then triggerServerEvent("tryRegister", resourceRoot, login, pass)
else dxDrawText("Login i/lub has?o musz? mie? minimalnie 3 znaki!", 0*w, 730*h, 839*w, 225*h, tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, false, false, false, false)
--outputChatBox("* Login i/lub has?o musz? mie? minimalnie 3 znaki!") end
end
end
end
end )
dxDrawImage(0, 0, screenWidth, screenHeight, blurShader)
end
end
addEventHandler("onClientRender", root, renderblur)
addEventHandler("onClientResourceStop", resourceRoot,
function()
if (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 end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy t...
Witam zwracam si? z pro?b? poniewa? na serwerze u mnie wyst?pi? b??d mianowicie: kiedy si? wbija na serwer i si? respi na spawnie nie wida? radaru trzeba wej?? wtedy do interioru jakiego? i radar si? pojawi (bardzo utrudnia to rozgrywke) wi?c kto? by m?g? pom?c ? za pomoc Piwo.
Witam mam problem z przerobieniem pobierania zasob?w z new place ot?? to jak pobior? sie zasoby skrypt nie znika oto kod ( za pomoc daje piwko ):
[lua]
--[[
Autor: Sralentas xD
]]
local sx, sy = guiGetScreenSize()
local font = dxCreateFont("cz.ttf", 13)
local kropki = 0
addEventHandler("onClientResourceStart", resourceRoot, function()
if getElementData(localPlayer, "dbid") then return end
if isEventHandlerAdded("onClientRender", gui) then return end
addEventHandler("onClientRender", root, gui)
showChat(false)
showPlayerHudComponent("all", false)
muza = playSound("muzyka.mp3")
end)
addEventHandler("onClientVehicleExit", resourceRoot, function(plr,seat)
if seat~=0 then return end if plr~=localPlayer then return end
finishJob(plr, true,true) destroyElement(kontenerxdxd) setElementData(plr,"player:job",false) outputChatBox("* Zako?czy?e?(a?) prac?.", 255, 0, 0) end)
addEventHandler("onClientVehicleExplode", resourceRoot, function()
if getElementModel(source) ~= 578 then return end
local plr=getVehicleController(source)
if plr~=localPlayer then return end
finishJob(plr, true,true) destroyElement(kontenerxdxd) setElementData(plr,"player:job",false) outputChatBox("* Zako?czy?e?(a?) prac?.", 255, 0, 0) end)
Witam all . Mam pytanie odno?nie tego ?e jak kto? wyjdzie z graczy to torba znika , nie wiem dlaczego , naprawicie mi to ?
function pacholek(localPlayer)
if getElementData (localPlayer,"frakcja") == "PR" then
pacholekk = createObject(1210, 0,0,0,0,0,0) attachElements(pacholekk, localPlayer, 0.2,-0.09,-0.3,0,0,90) end
end
addCommandHandler("torba",pacholek)
function usuntorbe(localPlayer) destroyElement(pacholekk,localPlayer) end
addCommandHandler("usuntorbe",usuntorbe)
function postaw (localPlayer) detachElements(pacholekk, localPlayer) end
addCommandHandler("postawtorbe",postaw)
Witam mam problem, Kiedy wchodze w marker i teleportuje mnie do interiora znika mi radar i nie pojawia sie znowu. Trzeba reconnectnac zeby znowu go widziec.
local m = createMarker(2244.38,-1665.56,15.48, "arrow", 1.2, 255, 255, 10, 100)
local b = createBlipAttachedTo(m, 45, 2, 255,0,0,255,0,400)
Po zarejestrowaniu si? na serwerze, wpisaniu komendy /v (Komenda na prywatne pojazdy), po zespawnowaniu tira znika mu totalnie paliwo do 0, nie wiem co na to poradzic
Witajcie, napisa?em skrypt na panel logowania na m?j serwer.
Wszystko dzia?a dzia?a dobrze, do momentu gdy w??cz? jaki? inny skrypt.
Po w??czeniu oboj?tnie jakiego skryptu ca?e hud znika i pokazuje si? tylko kursor i nie mo?na nic zrobi?.
addEventHandler("onClientResourceStart",root,
function()
local gt = setGameType()
setGameType("BestLife")
local time = getRealTime()
end
)
addEventHandler("sprobujZalogowac",root,
function(login,passw)
if getAccount(login) then
local acc = getAccount(login,passw)
if acc then
logIn(source,acc,passw)
else
triggerClientEvent(source,"onClientWrongLogin",root,"Podano z?e has?o!")
end
else
triggerClientEvent(source,"onClientWrongLogin",root,"Podano z?y login!")
end
end
)
M?j problem jest taki ?e zrobi?em prace dorywcza i jak gracz wejdzie w marker zacznie prace to cel si? pojawia ka?demu i jak dwoch graczy pracuje to jak jeden wejdzie w cel to drugiemu znika jak zrobi? to>
Witam.
Z g?ry przepraszam, je?eli jest to z?y dzia?, ale nie wiedzia?em gdzie opisa? m?j problem.
Ot?? posiadam serwer na hostingu ServHost.pl. Dot?d, wszystko by?o w porz?dku, ale w pewnym momencie, serwer znikn?? z zak?adki Internet. Administracja hostowni rozk?ada r?ce s?dz?c, ?e to nie ich wina. Za?o?y?em drugi taki sam serwer, r?wnie? na ServHost, ale i ten nie pojawi? si? w zak?adce. By? mo?e wszystko dzia?a na wersji 0.3x, jednak mi chodzi o wszystkie starsze. Pr?bowa?em na innym gamemodzie, nawet na podstawowych typu LvDm. W dniu wczorajszym zrestartowa?em serwer, i pojawi? si? o dziwo w zak?adce na jaki? czas, jednak ju? dzisiaj go tam nie by?o. Nie wiem kompletnie co robi?. Z g?ry dzi?kuj?, pozdrawiam.
Okienko GUI po wci?ni?ciu nie chce znikn?? (chowa si? tylko kursor) i nie ma reakcji na przycisk Rejestracja.
CLIENT:
[code]GUIEditor = {
label = {},
edit ={}
}
function sprawdzLogowanie(button)
if button == "left" then
local login = guiGetText(GUIEditor.edit[1])
local haslo = guiGetText(GUIEditor.edit[2])
triggerServerEvent("sprawdzHaslo", localPlayer, localPlayer, login, haslo)
end
end
function sprawdzRejestracja(buttonR)
if buttonR == "left" then
local loginR = guiGetText(GUIEditor.edit[1])
local hasloR = guiGetText(GUIEdtior.edit[2])
triggerServerEvent("sprawdzRejestracje", localPlayer, localPlayer, loginR, hasloR)
outputChatBox("reje trigger")
end
end
No witam panowie a wi?c mam problem z rejestracj? ale tu chodzi bardziej o GUI a wi?c jak wejd? na serwer i si? zarejestruje wszystko ?adnie pi?knie chodzi i jak wyjd? z serwera i wejd? jeszcze raz do pokazuje mi si? GUI to logowania a wi?c wpisuje has?o i naciskam Loguj i GUI znika i nic nie pisze czy zalogowa?em si? poprawnie itp jak ju? wybior? skin to na chacie nie mog? pisa? bo mam zablokowane i tak ca?y czas...
[code]if(dialogid == DIALOG_LOGIN)
{
if(response == 1)
{
if(strcmp(inputtext, DOF2_GetString(FileStats(playerid), "Haslo")) || !strlen(inputtext))
{
ShowPlayerDialog(playerid,7,1,"Logowanie","Witaj ponownie na Serwerze!nnAby rozpoczac gre musisz sie zalogowacnaby to zrobic, podaj swoje haslo:","Loguj","Anuluj");
SendClientMessage(playerid, COLOR_RED2, "Podane has?o dla tego konta jest nieprawid?owe.");