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

Wysłany: 2017-10-26, 07:05


RodzyneQ







Wiek: 26
Na forum: 3735 dni
Posty: 87
Nick w MP: RodzyneQ

Piwa: 196

Respekt: 65,3

1. Witam, nie dzia?aj? mi paski jak si? kogo? kara. Jest do tego jaki? skrypt ogrpg-?
2. Nie dzia?aj? mi skiny do frakcji, wydaje mi si?, ?e wszystko dobrze. Kod:
local skins={
    ["PR"]={
        code="PR",
        positions={
            {-2733.76, 684.00, 51.23,275,"Skin ratownika",0,0,2},
            {-2630.54, 613.59, 1733.87,70,"Skin Kadra",0,0,9},
            {-2733.64, 686.31, 51.23,274,"Skin Pielegniarzy",0,0},
            {-2626.33, 612.88, 1733.87,178,"Skin Chirurga",0,0},
            {-2733.36, 691.20, 51.23,276,"Skin lekarza",0,0},
        },
        text="Brak uprawnie?",
    },
    ["Policja"]={
        code="Policja",
        positions={
              {-1636.93, 710.06, 48.94,166,"Kadra",0,0,10},
              {-1634.73, 710.06, 48.94,165,"Kadra",0,0,10},
              {-1633.05, 710.06, 48.94,285,"SWAT",0,0,2},
              {-1637.83, 705.20, 48.94,284,"#1",0,0,2},
              {-1636.26, 704.59, 48.94,283,"#2",0,0,2},
              {-1634.56, 704.66, 48.94,282,"#3",0,0,3},
              {-1633.29, 704.66, 48.94,281,"#4",0,0,1},
              {-1631.82, 704.66, 48.94,311,"#5",0,0,4},
              {-1639.97, 705.69, 48.94,286,"Gang Unit",0,0,4},
              {-1639.98, 709.53, 48.94,287,"Gen. Inspektor",0,0,98},
        },
        text="Brak uprawnie?",
    },
    --[["SWAT"]={
        code="SWAT",
        positions={
            --{-2735.89, 690.40, 51.23,276,"Skin akademii"},
            {-1934.95, 1037.91, 2389.16,285,"Skin Bojowy",0,0},
            {-1934.54, 1034.56, 2389.16,179,"Skin Koszarowy",0,0},
        },
        text="Brak uprawnie?",
    },--]]
    ["PSP"]={
        code="PSP",
        positions={
            {-2280.16, -149.20, 40.90, 278,"Koszarowka",0,0,1},
            {-2280.16, -147.52, 40.90, 201,"KDR",0,0,1},
            {-2280.16, -145.65, 40.90, 277,"Nomex",0,0,1},
            {-2281.11, -143.54, 40.90, 279,"AODO",0,0,1},
        },
        text="Brak uprawnie?",
      },
    ["TAXI"]={
        code="TAXI",
        positions={
            {2161.43-2, 2340.91, 3006.87,125,"Skin Elegancika",0,0,35},
            {2164.43-2, 2340.91, 3006.87,126,"Skin Gonciarza",0,0,20},
            {2167.43-2, 2340.91, 3006.87,61,"Skin Pilota",0,0,55},
            {2166.19, 2345.21, 3006.87,141,"Aplikantka",0,0,1}
        },
        text="Brak uprawnie?",
      },
    ["PD"]={
        code="PD",
        positions={
            {-1558.99, 378.25, 7.19,268,"Skin Mechazorda",0,0,1},
        },
        text="Brak uprawnie?",
      },
}

for _,skin in pairs(skins) do
    for _,pos in ipairs(skin.positions) do
        local pickup=createPickup(pos[1], pos[2], pos[3], 3, 1275, 2000)
        setElementDimension(pickup, pos[7] or 0)
        setElementInterior(pickup, pos[6] or 0)
        setElementData(pickup,"p:faction",tostring(skin.code))
        setElementData(pickup,"p:skin", tonumber(pos[4]))
        setElementData(pickup,"p:rank", pos[8] or 1)
        local t=createElement("text")
        setElementDimension(t, pos[7] or 0)
        setElementInterior(t, pos[6] or 0)
        setElementData(t,"name",pos[5] or "Skin")
        setElementPosition(t,pos[1],pos[2],pos[3])
    end
end

addEventHandler("onPickupHit", resourceRoot, function(el,md)
    if getElementType(el)~="player" then return end
    local faction=getElementData(source,"p:faction")
    if not faction then return end
    local skin=getElementData(source,"p:skin")
    local rank=getElementData(source,"p:rank")
    if not skin then return end
    if not getPlayerFaction(el,faction) or getElementData(el,"player:duty") ~= faction then
        outputChatBox(skins[faction].text, el)
        cancelEvent()
        return end
    if rank then
    if rank > getElementData(el,"player:rank")  then
        outputChatBox(skins[faction].text, el)
        cancelEvent()
    return end
    end
    setElementModel(el,skin)
end)


Paczka OGRPG

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-26, 09:28


Avenged

Młodszy Szkrypter






Wiek: 24
Na forum: 3651 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1572

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

Dok?adniej? Jakie? db3?

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-26, 14:43


RodzyneQ







Wiek: 26
Na forum: 3735 dni
Posty: 87
Nick w MP: RodzyneQ

Piwa: 196

Respekt: 65,3

BarteQ03, tylko ogrpg-db, dac tu kod?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-26, 16:44


_Haze

Peace Yo!






Wiek: 25
Na forum: 4325 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

db3 to skr?t od komendy debugscript 3 kt?ra pokazuje b??dy skryptu + linijke, je?li masz jaki? b??d to zr?b screena i wy?lij go tu albo przepisz go

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
RodzyneQ
Wysłany: 2017-10-26, 16:50


RodzyneQ







Wiek: 26
Na forum: 3735 dni
Posty: 87
Nick w MP: RodzyneQ

Piwa: 196

Respekt: 65,3

X0neX, nie ka?dy ma a? tak du?? wiedz? o lua...
_Haze, teraz rozumiem, zrobi? to i zobacze jaki efekt

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-26, 17:18


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Od kar jest dutyadmin i plik po client.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-26, 20:44


RodzyneQ







Wiek: 26
Na forum: 3735 dni
Posty: 87
Nick w MP: RodzyneQ

Piwa: 196

Respekt: 65,3

Wpisa?em komende, pojawi?o mi si? co? na dole i jak wpisywa?em np /k to pisalo cos takiego: ERROR: Server trigged clientside event playerRender, but event is not added to clientside.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-26, 21:54


Eitho







Wiek: 24
Na forum: 3630 dni
Posty: 330
Nick w MP: Eitho

Piwa: 749

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

Poka? kod z
Kod:

dutyadmin\c_utility.lua


Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-27, 14:40


RodzyneQ







Wiek: 26
Na forum: 3735 dni
Posty: 87
Nick w MP: RodzyneQ

Piwa: 196

Respekt: 65,3

dawid2632, prosz;
for k,v in ipairs ( getElementsByType ( "object" ) ) do
    if getElementData ( v, "sciana:raportow" ) then
        scianaplaczu = v
    end
    if getElementData(v,"sciana:text") then
        scianatekstu = v
    end
end


function isEventHandlerAdded( sEventName, pElementAttachedTo, func )
    if 
        type( sEventName ) == 'string' and 
        isElement( pElementAttachedTo ) and 
        type( func ) == 'function' 
    then
        local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo )
        if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then
            for i, v in ipairs( aAttachedFunctions ) do
                if v == func then
                    return true
                end
            end
        end
    end
 
    return false
end


local xtext=nil
local gameView={"Logi serwerowe"}
local sx,sy=guiGetScreenSize()

function renderingInfo()
dxDrawRectangle(sx*(258)/1024, sy*(0)/768, sx*(500)/1024, sy*(23)/768, tocolor(0, 0, 0, 195), false)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258+1)/1024, sy*(0+1)/768, sx*(758+1)/1024, sy*(23+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, true)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258)/1024, sy*(0)/768, sx*(758)/1024, sy*(23)/768, tocolor(255, 0, 0, 255), 1.00, "default", "center", "center", false, true)
end

function renderingInfo2()
dxDrawRectangle(sx*(258)/1024, sy*(0)/768, sx*(500)/1024, sy*(23)/768, tocolor(0, 0, 0, 195), false)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258+1)/1024, sy*(0+1)/768, sx*(758+1)/1024, sy*(23+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, true)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258)/1024, sy*(0)/768, sx*(758)/1024, sy*(23)/768, tocolor(0, 192, 0, 255), 1.00, "default", "center", "center", false, true)
end

function raporcik()
    if not getElementData(localPlayer,"player:admin") then return end
    local tt={}
    reportView=getElementData(scianaplaczu,"sciana:raportow")
    for i,c in ipairs(reportView) do
        if c[1] then table.insert(tt,c[1]) end
    end
    concat=table.concat(tt, "\n")
    dxDrawText(concat, sx*(698+1)/1024, sy*(278+1)/768, sx*(1014+1)/1024, sy*(496+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "right", "top", false, true)
    dxDrawText(concat, sx*(698)/1024, sy*(278)/768, sx*(1014)/1024, sy*(496)/768, tocolor(255, 255, 255, 255), 1.00, "default", "right", "top", false, true)
end
addEventHandler("onClientRender", root, raporcik)

addEvent("admin:addText", true)
addEventHandler("admin:addText", root, function(text)
    table.insert(gameView, text)    
    if #gameView > 10 then
        table.remove(gameView, 2)
    end
end)
function raporcik2()
    if not getElementData(localPlayer,"player:ucho") then return end
    local tt={}
    reportView=getElementData(scianatekstu,"sciana:text")
    for i,c in ipairs(reportView) do
        if c[1] then table.insert(tt,c[1]) end
    end
    concat=table.concat(tt, "\n")
--    dxDrawText(concat, sx*(10+1)/1024, sy*(279+1)/768, sx*(326+1)/1024, sy*(497+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "left", "top", false, true)
    dxDrawText(concat, sx*(10)/1024, sy*(279)/768, sx*(326)/1024, sy*(497)/768, white, 1.00, "default-bold", "left", "top", false, false,false,true)
end
addEventHandler("onClientRender", root, raporcik2)

addEvent("admin:rendering", true)
addEventHandler("admin:rendering", root, function(text)
    xtext=text
    if isEventHandlerAdded("onClientRender",root,renderingInfo) then
        removeEventHandler ( "onClientRender", root, renderingInfo)
    end
    addEventHandler("onClientRender", root, renderingInfo)
    setTimer(function()
        removeEventHandler("onClientRender", root, renderingInfo)
    end, 8000, 1)
end)

addEvent("admin:rendering2", true)
addEventHandler("admin:rendering2", root, function(text)
    xtext=text
    if isEventHandlerAdded("onClientRender",root,renderingInfo2) then
        removeEventHandler ( "onClientRender", root, renderingInfo2)
    end
    addEventHandler("onClientRender", root, renderingInfo2)
    setTimer(function()
        removeEventHandler("onClientRender", root, renderingInfo2)
    end, 8000, 1)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-28, 13:30


Eitho







Wiek: 24
Na forum: 3630 dni
Posty: 330
Nick w MP: Eitho

Piwa: 749

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

Mo?esz to zmieni? na to,



ale mo?esz te? wys?a? jeszcze zawarto?? pliku s_cmd.lua, wtedy dowiem si? bardziej o co biega xd

Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-28, 15:07


RodzyneQ







Wiek: 26
Na forum: 3735 dni
Posty: 87
Nick w MP: RodzyneQ

Piwa: 196

Respekt: 65,3

Nic z tego, dawid2632, to nie pomog?o. Kodu z s_cmd.lua ci nie dam, bo za d?ugi, ale w sumie masz linka do wklej.org:





[ Dodano: 2017-10-28, 15:08 ]
aha! Problem ze skinami rozwi?zany. Musia?em zrestartowa? serwer.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-28, 21:11


Eitho







Wiek: 24
Na forum: 3630 dni
Posty: 330
Nick w MP: Eitho

Piwa: 749

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

"RodzyneQ" napisał/a:

Wpisa?em komende, pojawi?o mi si? co? na dole i jak wpisywa?em np /k to pisalo cos takiego: ERROR: Server trigged clientside event playerRender, but event is not added to clientside.


ten error to chyba nie od tego, bo tutaj nigdzie nie ma playerRender, w kodzie od kicka XD





Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-28, 23:27


RodzyneQ







Wiek: 26
Na forum: 3735 dni
Posty: 87
Nick w MP: RodzyneQ

Piwa: 196

Respekt: 65,3

dawid2632, czyli tylko z tym problem?

Postaw piwo autorowi tego posta
 

 
Tagi: pasek :: przy :: karach :: skiny :: frakcyjne
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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