Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2022-05-17, 19:01


XnoryzPL

Skrypter LUA






Wiek: 25
Na forum: 3248 dni
Posty: 44
Nick w MP: XnoryzPL

Piwa: 771

Respekt: 50

Witam mam pytanie dotyczace maskowania, wgralem skrypt z itsa meka wpisuje komende maskowania wszystko dziala a nie pojawia sie na pojezdzie.[/list]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-05-17, 21:25


!hejcob

Twórca Botów Discord.






Wiek: 25
Na forum: 1511 dni
Posty: 27
Nick w MP: Hejcob.gg

Piwa: 90

Respekt: 55,3

XnoryzPL Hej najprawdopodobniej napisa?e? co? ?le w skrypcie sprawd? i odpisz :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-05-18, 17:02


XnoryzPL

Skrypter LUA






Wiek: 25
Na forum: 3248 dni
Posty: 44
Nick w MP: XnoryzPL

Piwa: 771

Respekt: 50

Wszystko dzia?a w skrypcie wydaje mi sie ze nie ma wgranej tej tekstury na pojazd aby pokazywa?. Bo jak wpisuje komende na maskowanie to dzia?a komenda ale nie pokazuje na samochodzie, Jezeli bedzie u?atwienie to dodam ?e Mam serwer na PYS 3.0 a wzi??em z itsa wls maskowanie.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-05-19, 15:26


!hejcob

Twórca Botów Discord.






Wiek: 25
Na forum: 1511 dni
Posty: 27
Nick w MP: Hejcob.gg

Piwa: 90

Respekt: 55,3

XnoryzPL, hmm to nie wiem nigdy nie przytrafi?a mi si? taka sytuacja..sprawd? czy skrypt jest poprawianie wgrany

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-05-19, 20:01


NotPaladyn







Wiek: 23
Na forum: 2790 dni
Posty: 866
Nick w MP: NotPaladyn

Piwa: 3135

Respekt: 690
Respekt: 690Respekt: 690


   Vice Admin: Jeśli potrzebujesz pomocy w sprawach organizacyjnych lub technicznych - skontaktuj się ze mną.
XnoryzPL, podaj kod i ewentualne b??dy z db3, nikt nie wywr??y Ci odpowiedzi nie widz?c kodu

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-05-20, 19:59


XnoryzPL

Skrypter LUA






Wiek: 25
Na forum: 3248 dni
Posty: 44
Nick w MP: XnoryzPL

Piwa: 771

Respekt: 50

Kod:

s_lua
createBlip(1013.77, -1364.44, 13.38, 63)

function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable[property]

if value then
return value
end
end

return false
end

addEvent("mk2", true)
addEventHandler("mk2", getRootElement(), function()
local hajs = getPlayerMoney(source)
local ccar = getPedOccupiedVehicle(source)
if not ccar then outputChatBox("Musisz by? w poje?dzie", source, 255, 255, 255) return end
if getElementData(source, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", source, 255, 255, 255) return end
if hajs < 480000 then outputChatBox("Nie sta? Ci? na te ulepszenie", source, 255, 255, 255) return end
local id = getElementData(ccar, "vehicle:id")
if not id then return end
local qr = exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND mk2=?",getElementData(ccar, "vehicle:id"), "1")
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
exports["ogrpg-vehicles"]:onSaveVehicle(ccar)
destroyElement(ccar)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","MONTAZ US2", id)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET mk2=1 WHERE id=?", id)
outputChatBox("Monta? systemu US2 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni", source, 255, 255, 255)
takePlayerMoney(source, 480000)
end)

addEvent("mk1", true)
addEventHandler("mk1", getRootElement(), function()
local hajs = getPlayerMoney(source)
local ccar = getPedOccupiedVehicle(source)
if not ccar then outputChatBox("Musisz by? w poje?dzie", source, 255, 255, 255) return end
if getElementData(source, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", source, 255, 255, 255) return end
if hajs < 280000 then outputChatBox("Nie sta? Ci? na te ulepszenie", source, 255, 255, 255) return end
local id = getElementData(ccar, "vehicle:id")
if not id then return end
local qr = exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND mk1=?",getElementData(ccar, "vehicle:id"), "1")
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
--exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET mk1=1 WHERE ownedPlayer=? AND id=?", getElementData(source, "player:uid"), getElementData(ccar, "vehicle:id"))
exports["ogrpg-vehicles"]:onSaveVehicle(ccar)
destroyElement(ccar)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET mk1=1 WHERE id=?", id)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","MONTAZ US1", id)
outputChatBox("Monta? systemu US1 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni", source, 255, 255, 255)
takePlayerMoney(source, 280000)
end)

addEvent("naped", true)
addEventHandler("naped", getRootElement(), function()
local hajs = getPlayerMoney(source)
local ccar = getPedOccupiedVehicle(source)
if not ccar then outputChatBox("Musisz by? w poje?dzie", source, 255, 255, 255) return end
if getElementData(source, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", source, 255, 255, 255) return end
if hajs < 90000 then outputChatBox("Nie sta? Ci? na te ulepszenie", source, 255, 255, 255) return end
local id = getElementData(ccar, "vehicle:id")
if not id then return end
local qr = exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND naped=?",getElementData(ccar, "vehicle:id"), "1")
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
--exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET naped=1 WHERE ownedPlayer=? AND id=?", getElementData(source, "player:uid"), getElementData(ccar, "vehicle:id"))
exports["ogrpg-vehicles"]:onSaveVehicle(ccar)
destroyElement(ccar)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","MONTAZ NAPEDU", id)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET naped=1 WHERE id=?", id)
outputChatBox("Monta? nap?du 4x4 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni", source, 255, 255, 255)
takePlayerMoney(source, 90000)
end)

***** = {
['czerwony'] = 1,
['niebieski'] = 2,
['zielony'] = 3,
['zolty'] = 4,
['rozowy'] = 5,
['bialy'] = 6,
['usun'] = 0,
}

maskowanie = {
['polowa'] = {1,380000},
['caly'] = {2,880000},
['usun'] = {false,0},
}

addCommandHandler("*****",function(plr,cmd,tekst)
if getElementData(plr, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", plr, 255, 255, 255) return end
if not tekst then outputChatBox("/"..cmd.."[polowa,caly,usun]",plr) return end
if not maskowanie[tekst] then outputChatBox("/"..cmd.."[polowa,caly,usun]",plr) return end
local veh = getPedOccupiedVehicle(plr)
if not veh then outputChatBox("NO ALE k**** PANIE NA DUPE CI TEGO NIE ZAMONTUJE PROSZE WYDUPCZAC STAD NATYCHIAMST",plr) return end
if getPlayerMoney(plr) < maskowanie[tekst][2] then outputChatBox("* Nie masz pienionzkow",plr) return end
takePlayerMoney(plr,maskowanie[tekst][2])
setElementData(veh,"vehicle:masked",false)
setTimer(setElementData,200,1,veh,"vehicle:masked",maskowanie[tekst][1])
outputChatBox(("* ZAMONOTWALES WKYKRUWIONE PANIE JAK TALAL ULBUONE TWOJE MASKOWANIE TO %s"):format(tekst),plr)
end)
addCommandHandler("*****",function(plr,cmd,tekst)
if getElementData(plr, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", plr, 255, 255, 255) return end
if not tekst then outputChatBox("/"..cmd.."[czerwony,niebieski,zielony,zolty,rozowy,bialy,usun]",plr) return end
if not *****[tekst] then outputChatBox("/"..cmd.."[czerwony,niebieski,zielony,zolty,rozowy,bialy,usun]",plr) return end
local veh = getPedOccupiedVehicle(plr)
if not veh then outputChatBox("NO ALE k**** PANIE NA DUPE CI TEGO NIE ZAMONTUJE PROSZE WYDUPCZAC STAD NATYCHIAMST",plr) return end
setElementData(veh,"neony",*****[tekst])
outputChatBox(("* ZAMONOTWALES WKYKRUWIONE PANIE JAK TALAL ULBUONE TWOJE PERFEKCYJE DUPERELE KOLORU %s"):format(tekst),plr)
end)


addCommandHandler("k***",function(plr,cmd)
if getElementData(plr, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", plr, 255, 255, 255) return end
local veh = getPedOccupiedVehicle(plr)
if not veh then outputChatBox("/k*** w pojezdzie a nie k**** na dupie !",plr) return end
local x= getVehicleUpgradeOnSlot(veh,8)
if x == 1010 then
removeVehicleUpgrade(veh,1010)
else
addVehicleUpgrade(veh,1010)
end
outputChatBox("UZYLES ZAJEBISTEJ KOMENDY ZIEMNIAKU",plr)
end)


addCommandHandler("demontazmaski",function(plr,cmd)
if getElementData(plr, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", plr, 255, 255, 255) return end
local veh = getPedOccupiedVehicle(plr)
if not veh then outputChatBox("Nie siedzisz w poje?dzie :) ",plr,255,0,0) return end
local cena = 8000
local id = getElementData(veh,"vehicle:id")
if not id then return end
local query = exports['ogrpg-db']:dbGet("SELECT removehood from ogrpg_vehicles where id=?",id)
if query and #query > 0 then
local status = tonumber(query[1].removehood)
if status == 0 then
if getPlayerMoney(plr) < cena then outputChatBox("** Nie masz kwoty!",plr,255,0,0) return end
outputChatBox("**Zdemontowa?e? mask? w pojezdzie zabrano "..cena.." PLN",plr,255,0,0)
takePlayerMoney(plr,cena)
setElementData(veh,"vehicle:bonnet",true)
exports['ogrpg-db']:dbSet("UPDATE ogrpg_vehicles set removehood=1 where id=?",id)
elseif status == 1 then
setElementData(veh,"vehicle:bonnet",false)
exports['ogrpg-db']:dbSet("UPDATE ogrpg_vehicles set removehood=0 where id=?",id)
end
end
end)

addCommandHandler("gzcfelu",function(plr,cmd)
if getElementData(plr, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", plr, 255, 255, 255) return end
local veh = getPedOccupiedVehicle(plr)
if not veh then outputChatBox("NIE JESTE? W POJE?DZIE ?YSY CWELU!",plr,255,0,0) return end
local cena = 45000
id = getElementData(veh,"vehicle:id")
if not id then outputChatBox("BAO BAO CI? CWELU",plr,255,0,0) return end
local query = exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND rh=?",getElementData(veh, "vehicle:id"), "1")
if query then
if #query == 0 then
if getPlayerMoney(plr) < cena then outputChatBox("NIE MASZ TYLE HAJSU G?UPIA SZMATO! (18500 PLN)",plr,255,0,0) return end
exports['ogrpg-db']:dbSet("UPDATE ogrpg_vehicles set rh=1 where id=?",id)
exports["ogrpg-vehicles"]:onSaveVehicle(veh)
destroyElement(veh)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","Montaz GZ", id)
outputChatBox("Pojazd zosta? przeniesiony do przechowywalni, GZ ZAMONTOWANE DO ****!",plr,255,0,0)
takePlayerMoney(plr,cena)
elseif #query == 1 then
exports['ogrpg-db']:dbSet("UPDATE ogrpg_vehicles set rh=0 where id=?",id)
exports["ogrpg-vehicles"]:onSaveVehicle(veh)
destroyElement(veh)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","DEMONTAZ GZ", id)
givePlayerMoney(plr,math.floor(cena/2))
outputChatBox("Pojazd zosta? przeniesiony do przechowywalni, GZ ZDEMONTOWANE DO ****! DOSTAJESZ "..math.floor(cena/2).."",plr,255,0,0)
end
end
end)

addCommandHandler("k***?",function(plr,cmd)
if (isGarageOpen(24)) then
-- close the door
setGarageOpen(24, false)
return
end
setGarageOpen(24, true)
end)

addCommandHandler("lickaaa",function(plr,cmd)
if (isGarageOpen(8)) then
-- close the door
setGarageOpen(8, false)
return
end
setGarageOpen(8, true)
end)


Kod:

local car = createMarker(1013.77, -1364.44, 13.38-0.9, "cylinder", 3.5, 255, 0, 0, 125)
local text=createElement("text")
setElementData(text, "scale", 1.6)
setElementData(text, "name", "Modernizacja pojazd?w\nZwi?kszanie osi?g?w auta!")
setElementPosition(text, 1013.77, -1364.44, 13.38)
local Player = getLocalPlayer()

addEventHandler("onClientResourceStart", resourceRoot,
function()
local screenW, screenH = guiGetScreenSize()
gui = guiCreateWindow((screenW - 544) / 2, (screenH - 479) / 2, 544, 479, "Panel modernizacji pojazdu", false)
guiWindowSetSizable(gui, false)
guiSetAlpha(gui, 1.00)

napis = guiCreateLabel(10, 20, 528, 58, "Witaj w systemie modernizacji pr?dko?ci, poni?ej wy?wietlono nasz? ofert?. Ka?da z opcji jest opisana, pami?taj ?e nie akceptujemy zwrot?w za zam?wion? modernizacje, zastan?w si? kilka razy zanim klikniesz przycisk, po klikni?ciu, nie b?dzie odwrotu.", false, gui)
guiSetFont(napis, "default-bold-small")
guiLabelSetHorizontalAlign(napis, "left", true)
montui = guiCreateButton(111, 160, 325, 64, "US1\nKoszt: 280.000 PLN\nDolicz: 20.000 PLN", false, gui)
textxxd = guiCreateLabel(111, 234, 325, 47, "Dzi?ki temu ulepszeniu, pojazd gracza jest bardziej przyczepny i potrafi osi?gn?? a? o 10 km/h wi?cej ni? zwyk?y pojazd.", false, gui)
guiSetFont(textxxd, "default-bold-small")
guiLabelSetHorizontalAlign(textxxd, "left", true)
naped = guiCreateButton(111, 291, 325, 64, "US2\nKoszt: 480.000 PLN\nDolicz: 20.000 PLN", false, gui)
text = guiCreateLabel(111, 365, 325, 47, "Dzi?ki temu ulepszeniu, pojazd gracza jest bardziej przyczepny i potrafi osi?gn?? a? o 20 km/h wi?cej ni? zwyk?y pojazd.", false, gui)
guiSetFont(text, "default-bold-small")
guiLabelSetHorizontalAlign(text, "left", true)
closex = guiCreateButton(111, 422, 325, 47, "Zako?cz", false, gui)
cznacz = guiCreateButton(111, 86, 325, 64, "Naped 4x4\nKoszt: 90.000 PLN\nDolicz: 10.000 PLN", false, gui)
guiSetVisible(gui, false)
end
)

function hit(el)
if el == localPlayer then
if getPedOccupiedVehicle(el) then
if getElementData(el, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", 255, 255, 255) return end
if getPlayerName(getVehicleController(getPedOccupiedVehicle(el))) == getPlayerName(el) then
setElementFrozen(getPedOccupiedVehicle(el), true)
guiSetVisible(gui, true)
showCursor(true)
end
end
end
end
addEventHandler("onClientMarkerHit", car, hit)

addEventHandler("onClientGUIClick", resourceRoot,
function()
if source == closex then
guiSetVisible(gui,false)
showCursor(false)
end
if source == naped then
if isElementWithinMarker(Player, car) then
triggerServerEvent ("mk2", Player, Player)
end
end
if source == cznacz then
if isElementWithinMarker(Player, car) then
triggerServerEvent ("naped", Player, Player)
end
end
if source == montui then
if isElementWithinMarker(Player, car) then
triggerServerEvent ("mk1", Player, Player)
end
end
end
)



B?ed?w nie bylo w z db3

Postaw piwo autorowi tego posta
 

 
Tagi: maskowanie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Maskowanie Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku