Wysłany: 2019-08-26, 12:45
toster.
Wiek: 26 Na forum: 2475 dni Posty: 8
Nick w MP: Kocham LUA / Mapper
Witam mam problem mianowice z skryptem jak zrobi?, aby przebieralnia by?a w LS i LV np ? skopiowa?em PLIK i przerobi?em lecz cos nie wychodzi prosze o szybk? pomoc.
Wysłany: 2019-08-26, 12:52
Nexisten
Moderator
Wiek: 22 Na forum: 4108 dni Posty: 551
Nick w MP: Nexisten
Piwa : 1479
Nikt nie jest jasnowidzem, poka? sw?j kod i ewentualne b??dy pod /debugscript 3.
Wysłany: 2019-08-26, 12:57
toster.
Wiek: 26 Na forum: 2475 dni Posty: 8
Nick w MP: Kocham LUA / Mapper
po stronie SERWERA Kod: local skinypremium = {167,168,57,26,271,270,120,238,237,233,11,264,40,45,75,87,83,63,177,191,59}
addEvent("zmien:skina", true)
addEventHandler("zmien:skina", root, function(model)
local model = tonumber(model)
--outputChatBox(model)
for i,v in ipairs(skinypremium) do
if model == v then
if not getElementData(client,"player:premium") then
outputChatBox("* Przykro nam ale Nie posiadasz Konta Premium",client,255 ,255 ,0)
return
end
end
end
setElementModel(client, model)
local uid=getElementData(client,"player:uid")
local query=exports["ogrpg-db"]:dbSet("UPDATE ogrpg_users SET skin=? WHERE id=?", model, uid)
setElementData(client, "player:skin", model)
end)
local wejscie_fc = createMarker (2101.89429,2257.49194,11.02344+1, "arrow", 2, 128,192,0)
local wyjscie_fc = createMarker (204.31,-168.85,1000.52+1, "arrow", 2, 128,192,0)
setElementInterior(wyjscie_fc, 14)
addEventHandler("onMarkerHit", wejscie_fc, function(el,md)
if getElementType(el) == "player" then
if isPedInVehicle(el) then return end
setElementInterior(el, 14)
setElementPosition(el, 204.44,-166.98,1000.52)
end
end)
addEventHandler("onMarkerHit", wyjscie_fc, function(el,md)
if getElementType(el) == "player" then
if isPedInVehicle(el) then return end
setElementInterior(el, 0)
setElementPosition(el, 2104.47046,2257.56152,11.02344)
end
end)
createBlip(2104.47046,2257.56152,11.02344,45)
po stronie CLIENTA Cytat: local sx, sy = guiGetScreenSize()
local screenW, screenH = guiGetScreenSize()
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 then
return true,cx,cy
else
return false
end
end
function gui()
--dxDrawLine((screenW * 0.7269) - 1, (screenH * 0.2513) - 1, (screenW * 0.7269) - 1, screenH * 0.8659, tocolor(51, 255, 204), 2, false)
--dxDrawLine(screenW * 0.9802, (screenH * 0.2513) - 1, (screenW * 0.7269) - 1, (screenH * 0.2513) - 1, tocolor(51, 255, 204), 2, false)
--dxDrawLine((screenW * 0.7269) - 1, screenH * 0.8659, screenW * 0.9802, screenH * 0.8659, tocolor(51, 255, 204), 2, false)
--dxDrawLine(screenW * 0.9802, screenH * 0.8659, screenW * 0.9802, (screenH * 0.2513) - 1, tocolor(51, 255, 204), 2, false)
--dxDrawRectangle(screenW * 0.7269, screenH * 0.2513, screenW * 0.2533, screenH * 0.6146, tocolor(0, 255, 153, 50), false)
exports["YNE-Buttons"]:createCustomWindow("", screenW * 0.7269, screenH * 0.2513, screenW * 0.2533, screenH * 0.6146)
dxDrawText("Przebieralnia", (screenW * 0.7269) + 1, (screenH * 0.2500) + 1, (screenW * 0.9802) + 1, (screenH * 0.4141) + 1, tocolor(0, 0, 0, 255), 2.00, "clear", "center", "center", false, false, false, false, false)
dxDrawText("Przebieralnia", screenW * 0.7269, screenH * 0.2500, screenW * 0.9802, screenH * 0.4141, tocolor(255, 255, 255, 255), 2.00, "clear", "center", "center", false, false, false, false, false)
dxDrawLine((screenW * 0.7328) - 1, (screenH * 0.7201) - 1, (screenW * 0.7328) - 1, screenH * 0.7760, tocolor(51, 255, 204), 2, false)
dxDrawLine(screenW * 0.9729, (screenH * 0.7201) - 1, (screenW * 0.7328) - 1, (screenH * 0.7201) - 1, tocolor(51, 255, 204), 2, false)
dxDrawLine((screenW * 0.7328) - 1, screenH * 0.7760, screenW * 0.9729, screenH * 0.7760, tocolor(51, 255, 204), 2, false)
dxDrawLine(screenW * 0.9729, screenH * 0.7760, screenW * 0.9729, (screenH * 0.7201) - 1, tocolor(51, 255, 204), 2, false)
if isMouseIn(screenW * 0.7328, screenH * 0.7201, screenW * 0.2401, screenH * 0.0560) then
dxDrawRectangle(screenW * 0.7328, screenH * 0.7201, screenW * 0.2401, screenH * 0.0560, tocolor(255, 239, 239, 125), false)
else
dxDrawRectangle(screenW * 0.7328, screenH * 0.7201, screenW * 0.2401, screenH * 0.0560, tocolor(255, 239, 239, 64), false)
end
dxDrawLine((screenW * 0.7328) - 1, (screenH * 0.7969) - 1, (screenW * 0.7328) - 1, screenH * 0.8529, tocolor(51, 255, 204), 2, false)
dxDrawLine(screenW * 0.9729, (screenH * 0.7969) - 1, (screenW * 0.7328) - 1, (screenH * 0.7969) - 1, tocolor(51, 255, 204), 2, false)
dxDrawLine((screenW * 0.7328) - 1, screenH * 0.8529, screenW * 0.9729, screenH * 0.8529, tocolor(51, 255, 204), 2, false)
dxDrawLine(screenW * 0.9729, screenH * 0.8529, screenW * 0.9729, (screenH * 0.7969) - 1, tocolor(51, 255, 204), 2, false)
if isMouseIn(screenW * 0.7328, screenH * 0.7969, screenW * 0.2401, screenH * 0.0560) then
dxDrawRectangle(screenW * 0.7328, screenH * 0.7969, screenW * 0.2401, screenH * 0.0560, tocolor(255, 239, 239, 125), false)
else
dxDrawRectangle(screenW * 0.7328, screenH * 0.7969, screenW * 0.2401, screenH * 0.0560, tocolor(255, 239, 239, 64), false)
end
dxDrawText("Zapisz", (screenW * 0.7328) + 1, (screenH * 0.7201) + 1, (screenW * 0.9729) + 1, (screenH * 0.7760) + 1, tocolor(0, 0, 0, 255), 1.00, "clear", "center", "center", false, false, false, false, false)
dxDrawText("Zapisz", screenW * 0.7328, screenH * 0.7201, screenW * 0.9729, screenH * 0.7760, tocolor(255, 255, 255, 255), 1.00, "clear", "center", "center", false, false, false, false, false)
dxDrawText("Zamknij", (screenW * 0.7328) + 1, (screenH * 0.7969) + 1, (screenW * 0.9729) + 1, (screenH * 0.8529) + 1, tocolor(0, 0, 0, 255), 1.00, "clear", "center", "center", false, false, false, false, false)
dxDrawText("Zamknij", screenW * 0.7328, screenH * 0.7969, screenW * 0.9729, screenH * 0.8529, tocolor(255, 255, 255, 255), 1.00, "clear", "center", "center", false, false, false, false, false)
end
local data = { pokazane = nil }
local skinypremium = {167,168,57,26,271,270,120,238,237,233,11,264,40,45,75,87,83,63,177,191,59}
local skiny = {0,1,2,7,12,14,17,19,20,21,23,24,25,28,29,35,46,47,66,105,113,170,186,294,292,58,169,91,69,129,141}
local ubrania = createMarker(204.33429,-159.88971,1000.52344-1, "cylinder", 1.5, 255, 255, 255)
setElementInterior(ubrania, 14)
--setElementDimension(ubrania, 14)
gridlist = guiCreateGridList(0.74, 0.37, 0.23, 0.34, true)
guiGridListAddColumn(gridlist, "ID", 0.9)
guiSetVisible(gridlist, false)
for e,f in ipairs(skinypremium) do
local row = guiGridListAddRow(gridlist)
guiGridListSetItemText(gridlist, row, 1, string.format(""..f..""), false,false)
guiGridListSetItemColor(gridlist, row, 1, 255,255,0)
end
for i,v in ipairs(skiny) do
local row = guiGridListAddRow(gridlist)
guiGridListSetItemText(gridlist, row, 1, string.format(""..v..""), false,false)
guiGridListSetItemColor(gridlist, row, 1, 255,255,255)
end
addEventHandler("onClientClick", root, function(btn, state)
if btn == "left" and state == "down" then
if isMouseIn(screenW * 0.7328, screenH * 0.7969, screenW * 0.2401, screenH * 0.0560) and data.pokazane then
guiSetVisible(gridlist, false)
showCursor(false)
data.pokazane = false
removeEventHandler ("onClientRender", root, gui)
elseif isMouseIn(screenW * 0.7328, screenH * 0.7201, screenW * 0.2401, screenH * 0.0560) and data.pokazane then
local text = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist))
local model = tonumber(string.match(text, "(%d+)"))
if model then
triggerServerEvent("zmien:skina", localPlayer, model)
end
end
end
end)
addEventHandler("onClientMarkerHit", ubrania, function(el)
if el ~= localPlayer then return end
guiSetVisible(gridlist, true)
addEventHandler ("onClientRender", root, gui)
showCursor(true, false)
data.pokazane = true
end)
addEventHandler("onClientMarkerLeave", ubrania, function(el)
if el ~= localPlayer then return end
guiSetVisible(gridlist, false)
showCursor(false)
data.pokazane = false
removeEventHandler ("onClientRender", root, gui)
end)
[ Dodano : 2019-08-26, 12:57 ]
i taka przebieralnie mam w LV i chcia?bym zrobic tak? sam? w takim samym interiorze w LS
[ Dodano : 2019-08-26, 15:34 ]
@refresh
[ Dodano : 2019-08-26, 15:34 ]
pomo?e kto?? daje oraz respekt jak zadzia?a
Wysłany: 2019-08-26, 15:45
Gravgor
Wiek: 22 Na forum: 3620 dni Posty: 380
Nick w MP: 1944
Piwa : 702
Musisz zmie? to
server
local wejscie_fc = createMarker ( 2101.89429 , 2257.49194 , 11.02344 + 1 , "arrow" , 2 , 128 , 192 , 0 )
local wyjscie_fc = createMarker ( 204.31 ,- 168.85 , 1000.52 + 1 , "arrow" , 2 , 128 , 192 , 0 )
setElementInterior ( wyjscie_fc , 14 )
addEventHandler ( "onMarkerHit" , wejscie_fc , function( el , md )
if getElementType ( el ) == "player" then
if isPedInVehicle ( el ) then return end
setElementInterior ( el , 14 )
setElementPosition ( el , 204.44 ,- 166.98 , 1000.52 )
end
end )
addEventHandler ( "onMarkerHit" , wyjscie_fc , function( el , md )
if getElementType ( el ) == "player" then
if isPedInVehicle ( el ) then return end
setElementInterior ( el , 0 )
setElementPosition ( el , 2104.47046 , 2257.56152 , 11.02344 )
end
end )
createBlip ( 2104.47046 , 2257.56152 , 11.02344 , 45 )
i to
client
local ubrania = createMarker ( 204.33429 ,- 159.88971 , 1000.52344 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 )
Wysłany: 2019-08-26, 16:24
toster.
Wiek: 26 Na forum: 2475 dni Posty: 8
Nick w MP: Kocham LUA / Mapper
a mog? wiedzie? co dok?adnie ?
[ Dodano : 2019-08-26, 16:25 ]
chodzi mi o cos takiego jak pyl ma te przebieralnie po SA
Wysłany: 2019-08-27, 14:57
Zex
Wiek: 26 Na forum: 2554 dni Posty: 4
Nick w MP: ZeX
"toster." napisał/a :a mog? wiedzie? co dok?adnie ?
[ Dodano : 2019-08-26, 16:25 ]
chodzi mi o cos takiego jak pyl ma te przebieralnie po SA
koordy
Tagi: przebieralnie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: