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: 25
Na forum: 3594 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.76684.0051.23,275,"Skin ratownika",0,0,2},
            {-2630.54613.591733.87,70,"Skin Kadra",0,0,9},
            {-2733.64686.3151.23,274,"Skin Pielegniarzy",0,0},
            {-2626.33612.881733.87,178,"Skin Chirurga",0,0},
            {-2733.36691.2051.23,276,"Skin lekarza",0,0},
        },
        text="Brak uprawnie?",
    },
    ["Policja"]={
        code="Policja",
        positions={
              {-1636.93710.0648.94,166,"Kadra",0,0,10},
              {-1634.73710.0648.94,165,"Kadra",0,0,10},
              {-1633.05710.0648.94,285,"SWAT",0,0,2},
              {-1637.83705.2048.94,284,"#1",0,0,2},
              {-1636.26704.5948.94,283,"#2",0,0,2},
              {-1634.56704.6648.94,282,"#3",0,0,3},
              {-1633.29704.6648.94,281,"#4",0,0,1},
              {-1631.82704.6648.94,311,"#5",0,0,4},
              {-1639.97705.6948.94,286,"Gang Unit",0,0,4},
              {-1639.98709.5348.94,287,"Gen. Inspektor",0,0,98},
        },
        text="Brak uprawnie?",
    },
    --[["SWAT"]={
        code="SWAT",
        positions={
            --{-2735.89690.4051.23,276,"Skin akademii"},
            {-1934.951037.912389.16,285,"Skin Bojowy",0,0},
            {-1934.541034.562389.16,179,"Skin Koszarowy",0,0},
        },
        text="Brak uprawnie?",
    },--]]
    ["PSP"]={
        code="PSP",
        positions={
            {-2280.16, -149.2040.90278,"Koszarowka",0,0,1},
            {-2280.16, -147.5240.90201,"KDR",0,0,1},
            {-2280.16, -145.6540.90277,"Nomex",0,0,1},
            {-2281.11, -143.5440.90279,"AODO",0,0,1},
        },
        text="Brak uprawnie?",
      },
    ["TAXI"]={
        code="TAXI",
        positions={
            {2161.43-22340.913006.87,125,"Skin Elegancika",0,0,35},
            {2164.43-22340.913006.87,126,"Skin Gonciarza",0,0,20},
            {2167.43-22340.913006.87,61,"Skin Pilota",0,0,55},
            {2166.192345.213006.87,141,"Aplikantka",0,0,1}
        },
        text="Brak uprawnie?",
      },
    ["PD"]={
        code="PD",
        positions={
            {-1558.99378.257.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], 312752000)
        setElementDimension(pickuppos[7] or 0)
        setElementInterior(pickuppos[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(tpos[7] or 0)
        setElementInterior(tpos[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].textel)
        cancelEvent()
        return end
    if rank then
    if rank getElementData(el,"player:rank")  then
        outputChatBox(skins[faction].textel)
        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: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

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: 25
Na forum: 3594 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: 24
Na forum: 4184 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: 25
Na forum: 3594 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: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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: 25
Na forum: 3594 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: 3489 dni
Posty: 330
Nick w MP: Eitho

Piwa: 746

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: 25
Na forum: 3594 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 isEventHandlerAddedsEventNamepElementAttachedTofunc )
    if 
        typesEventName ) == 'string' and 
        isElementpElementAttachedTo ) and 
        typefunc ) == 'function' 
    then
        local aAttachedFunctions getEventHandlerssEventNamepElementAttachedTo )
        if typeaAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then
            for iv in ipairsaAttachedFunctions ) do
                if == 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)/1024sy*(0)/768sx*(500)/1024sy*(23)/768tocolor(000195), false)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258+1)/1024sy*(0+1)/768sx*(758+1)/1024sy*(23+1)/768tocolor(000255), 1.00"default""center""center"falsetrue)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258)/1024sy*(0)/768sx*(758)/1024sy*(23)/768tocolor(25500255), 1.00"default""center""center"falsetrue)
end

function renderingInfo2()
dxDrawRectangle(sx*(258)/1024sy*(0)/768sx*(500)/1024sy*(23)/768tocolor(000195), false)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258+1)/1024sy*(0+1)/768sx*(758+1)/1024sy*(23+1)/768tocolor(000255), 1.00"default""center""center"falsetrue)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258)/1024sy*(0)/768sx*(758)/1024sy*(23)/768tocolor(01920255), 1.00"default""center""center"falsetrue)
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[1then table.insert(tt,c[1]) end
    end
    concat=table.concat(tt"\n")
    dxDrawText(concatsx*(698+1)/1024sy*(278+1)/768sx*(1014+1)/1024sy*(496+1)/768tocolor(000255), 1.00"default""right""top"falsetrue)
    dxDrawText(concatsx*(698)/1024sy*(278)/768sx*(1014)/1024sy*(496)/768tocolor(255255255255), 1.00"default""right""top"falsetrue)
end
addEventHandler("onClientRender"rootraporcik)

addEvent("admin:addText"true)
addEventHandler("admin:addText"root, function(text)
    table.insert(gameViewtext)    
    if #gameView > 10 then
        table.remove(gameView2)
    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[1then table.insert(tt,c[1]) end
    end
    concat=table.concat(tt"\n")
--    dxDrawText(concatsx*(10+1)/1024sy*(279+1)/768sx*(326+1)/1024sy*(497+1)/768tocolor(000255), 1.00"default""left""top"falsetrue)
    dxDrawText(concatsx*(10)/1024sy*(279)/768sx*(326)/1024sy*(497)/768white1.00"default-bold""left""top"falsefalse,false,true)
end
addEventHandler("onClientRender"rootraporcik2)

addEvent("admin:rendering"true)
addEventHandler("admin:rendering"root, function(text)
    xtext=text
    if isEventHandlerAdded("onClientRender",root,renderingInfothen
        removeEventHandler "onClientRender"rootrenderingInfo)
    end
    addEventHandler("onClientRender"rootrenderingInfo)
    setTimer(function()
        removeEventHandler("onClientRender"rootrenderingInfo)
    end80001)
end)

addEvent("admin:rendering2"true)
addEventHandler("admin:rendering2"root, function(text)
    xtext=text
    if isEventHandlerAdded("onClientRender",root,renderingInfo2then
        removeEventHandler "onClientRender"rootrenderingInfo2)
    end
    addEventHandler("onClientRender"rootrenderingInfo2)
    setTimer(function()
        removeEventHandler("onClientRender"rootrenderingInfo2)
    end80001)
end)


Postaw piwo autorowi tego posta
 

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


Eitho







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

Piwa: 746

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: 25
Na forum: 3594 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: 3489 dni
Posty: 330
Nick w MP: Eitho

Piwa: 746

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: 25
Na forum: 3594 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