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

Wysłany: 2018-02-09, 13:43


Kuksss

guwno






Wiek: 22
Na forum: 3781 dni
Posty: 102
Nick w MP: guwnp

Piwa: 732

Respekt: 70,5

Ostrzeżeń: 100%
Siema.
Robi? skrypt na prace dorywcz?, ale gdy chcia?em zrobi? przenikanie nie uda?o mi si?.
Chodzi o to, ?eby samoch?d z za?adunkiem przenika? przez inne.
Za pomoc stawiam :piwo:
Kod: https://pastebin.com/B734UCP0

Podpis
c***
Ostatnio zmieniony przez ToxiC. 2018-02-09, 17:20, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 19:25


Gpla

Loading...






Wiek: 26
Na forum: 3853 dni
Posty: 84
Nick w MP: Loading...

Piwa: 174

Respekt: 55,3

Nie jestem pewien ale spr?buj tym

Więcej informacji znajdziesz w Wikipedii MTA:

SetElementVisibleTo


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 19:30


NyAngel







Wiek: 22
Na forum: 3950 dni
Posty: 128
Nick w MP: NyAngel

Piwa: 556

Respekt: 86,8

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 19:36


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

Po stronie clienta dodajesz to:


addEvent("przenikaniePojazdow"true)
addEventHandler("przenikaniePojazdow"root, function(v)
    for i,pojazd in ipairs(getElementsByType("vehicle")) do
        setElementCollidableWith(pojazdvfalse)
    end
    for i,vv in ipairs(getElementsByType("player")) do
        setElementCollidableWith(vvvfalse)
    end
end)


To dodajesz po stronie serwera do tworzenia pojazdu ( createVehicle, przy tej funkcji )


triggerClientEvent("przenikaniePojazdow"plrpojazd*)


Tam gdzie jest pojazd* - dodajesz tam nazw? funkcji, kt?ra wsp?dzia?a z tworzeniem pojazdu

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 20:51


Kuksss

guwno






Wiek: 22
Na forum: 3781 dni
Posty: 102
Nick w MP: guwnp

Piwa: 732

Respekt: 70,5

Ostrzeżeń: 100%
Ciastuu?, Kurde nie dzia?a
C:


local screenWscreenH guiGetScreenSize()
panelpraca false

function GuiPracka()
local r,g,b=interpolateBetween(255,255,255,20,250,0,(getTickCount()-czas)/1100,"SineCurve")
local r2,g2,b2=interpolateBetween(255,255,255,255,0,0,(getTickCount()-czas)/1100,"SineCurve")
dxDrawImage(screenW 0.3111screenH 0.1953screenW 0.3777screenH 0.3893"okn.png"000tocolor(000212), false)
 
if not cursorPosition(screenW 0.3470screenH 0.4753screenW 0.1061screenH 0.0469then --Przycisk 1
dxDrawImage(screenW 0.3141screenH 0.4089screenW 0.1816screenH 0.1758"przycisk.png"000tocolor(255255255255), false)

dxDrawText("Rozpocznij", (screenW 0.3470) + 1, (screenH 0.4766) + 1, (screenW 0.4531) + 1, (screenH 0.5221) + 1tocolor(000255), 1.12"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Rozpocznij"screenW 0.3470screenH 0.4766screenW 0.4531screenH 0.5221tocolor(753145255), 1.12"default-bold""center""center"falsefalsefalsefalsefalse)
   
else 
dxDrawImage(screenW 0.3141screenH 0.4089screenW 0.1816screenH 0.1758"przycisk.png"000tocolor(r,g,b255), false)

dxDrawText("Rozpocznij", (screenW 0.3470) + 1, (screenH 0.4766) + 1, (screenW 0.4531) + 1, (screenH 0.5221) + 1tocolor(000255), 1.05"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Rozpocznij"screenW 0.3470screenH 0.4766screenW 0.4531screenH 0.5221tocolor(502072255), 1.05"default-bold""center""center"falsefalsefalsefalsefalse)
   
end
if not cursorPosition(screenW 0.5469screenH 0.4766screenW 0.1061screenH 0.0469then --Przycisk 2
dxDrawImage(screenW 0.5146screenH 0.4089screenW 0.1816screenH 0.1758"przycisk.png"000tocolor(255255255255), false)
 
dxDrawText("Zamknij okno", (screenW 0.5469) + 1, (screenH 0.4779) + 1, (screenW 0.6530) + 1, (screenH 0.5234) + 1tocolor(000255), 1.12"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Zamknij okno"screenW 0.5469screenH 0.4779screenW 0.6530screenH 0.5234tocolor(753145255), 1.12"default-bold""center""center"falsefalsefalsefalsefalse) 
else 
dxDrawImage(screenW 0.5146screenH 0.4089screenW 0.1816screenH 0.1758"przycisk.png"000tocolor(r,g,b255), false)

dxDrawText("Zamknij okno", (screenW 0.5469) + 1, (screenH 0.4779) + 1, (screenW 0.6530) + 1, (screenH 0.5234) + 1tocolor(000255), 1.05"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Zamknij okno"screenW 0.5469screenH 0.4779screenW 0.6530screenH 0.5234tocolor(502072255), 1.05"default-bold""center""center"falsefalsefalsefalsefalse)  
end
                     
dxDrawText("\nTa praca polega na rozwo?eniu paczek do klient?w!\nAby rozpocz?? t? prace wci?nij 'Rozpocznij'\n a nast?pnie udaj si? do r??owego 'C' na mapie aby odda? paczk? klientowi!\n\n Wymagania: Prawo jazdy kat. 'B'", (screenW 0.3463) + 1, (screenH 0.2995) + 1, (screenW 0.6530) + 1, (screenH 0.4661) + 1tocolor(000255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("\nTa praca polega na rozwo?eniu paczek do klient?w!\nAby rozpocz?? t? prace wci?nij 'Rozpocznij'\n a nast?pnie udaj si? do r??owego 'C' na mapie aby odda? paczk? klientowi!\n\n Wymagania: Prawo jazdy kat. 'B'"screenW 0.3463screenH 0.2995screenW 0.6530screenH 0.4661tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Praca dostawca paczek!", (screenW 0.3455) + 1, (screenH 0.2552) + 1, (screenW 0.6530) + 1, (screenH 0.2995) + 1tocolor(000255), 1.40"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Praca dostawca paczek!"screenW 0.3455screenH 0.2552screenW 0.6530screenH 0.2995tocolor(r2,g2,b2255), 1.40"default-bold""center""center"falsefalsefalsefalsefalse)
                   
end

function InfoPraca1()
        dxDrawLine((screenW 0.3375) - 1, (screenH 0.0924) - 1, (screenW 0.3375) - 1screenH 0.1497tocolor(13622411255), 1.9false)
        dxDrawLine(screenW 0.6478, (screenH 0.0924) - 1, (screenW 0.3375) - 1, (screenH 0.0924) - 1tocolor(13622411255), 1.9false)
        dxDrawLine((screenW 0.3375) - 1screenH 0.1497screenW 0.6478screenH 0.1497tocolor(13622411255), 1.9false)
        dxDrawLine(screenW 0.6478screenH 0.1497screenW 0.6478, (screenH 0.0924) - 1tocolor(13622411255), 1.9false)
        dxDrawRectangle(screenW 0.3375screenH 0.0924screenW 0.3103screenH 0.0573tocolor(000212), false)
        dxDrawLine((screenW 0.3375) - 1, (screenH 0.0794) - 1, (screenW 0.3375) - 1screenH 0.0924tocolor(13622411255), 2false)
        dxDrawLine(screenW 0.6478, (screenH 0.0794) - 1, (screenW 0.3375) - 1, (screenH 0.0794) - 1tocolor(13622411255), 2false)
        dxDrawLine((screenW 0.3375) - 1screenH 0.0924screenW 0.6478screenH 0.0924tocolor(13622411255), 2false)
        dxDrawLine(screenW 0.6478screenH 0.0924screenW 0.6478, (screenH 0.0794) - 1tocolor(13622411255), 2false)
        dxDrawRectangle(screenW 0.3375screenH 0.0794screenW 0.3103screenH 0.0130tocolor(13622411255), false)
        dxDrawLine((screenW 0.3375) - 1, (screenH 0.1497) - 1, (screenW 0.3375) - 1screenH 0.1628tocolor(13622411255), 2false)
        dxDrawLine(screenW 0.6478, (screenH 0.1497) - 1, (screenW 0.3375) - 1, (screenH 0.1497) - 1tocolor(13622411255), 2false)
        dxDrawLine((screenW 0.3375) - 1screenH 0.1628screenW 0.6478screenH 0.1628tocolor(13622411255), 2false)
        dxDrawLine(screenW 0.6478screenH 0.1628screenW 0.6478, (screenH 0.1497) - 1tocolor(13622411255), 2false)
        dxDrawRectangle(screenW 0.3375screenH 0.1497screenW 0.3103screenH 0.0130tocolor(13622411255), false)
        dxDrawText("Udaj si? do r??owego 'C' aby wy?adowa? paczki!", (screenW 0.3390) - 1, (screenH 0.0951) - 1, (screenW 0.6449) - 1, (screenH 0.1445) - 1tocolor(000255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Udaj si? do r??owego 'C' aby wy?adowa? paczki!", (screenW 0.3390) + 1, (screenH 0.0951) - 1, (screenW 0.6449) + 1, (screenH 0.1445) - 1tocolor(000255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Udaj si? do r??owego 'C' aby wy?adowa? paczki!", (screenW 0.3390) - 1, (screenH 0.0951) + 1, (screenW 0.6449) - 1, (screenH 0.1445) + 1tocolor(000255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Udaj si? do r??owego 'C' aby wy?adowa? paczki!", (screenW 0.3390) + 1, (screenH 0.0951) + 1, (screenW 0.6449) + 1, (screenH 0.1445) + 1tocolor(000255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Udaj si? do r??owego 'C' aby wy?adowa? paczki!"screenW 0.3390screenH 0.0951screenW 0.6449screenH 0.1445tocolor(254254254255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
end

function InfoPraca3()
        dxDrawLine((screenW 0.3375) - 1, (screenH 0.0924) - 1, (screenW 0.3375) - 1screenH 0.1497tocolor(13622411255), 1.9false)
        dxDrawLine(screenW 0.6478, (screenH 0.0924) - 1, (screenW 0.3375) - 1, (screenH 0.0924) - 1tocolor(13622411255), 1.9false)
        dxDrawLine((screenW 0.3375) - 1screenH 0.1497screenW 0.6478screenH 0.1497tocolor(13622411255), 1.9false)
        dxDrawLine(screenW 0.6478screenH 0.1497screenW 0.6478, (screenH 0.0924) - 1tocolor(13622411255), 1.9false)
        dxDrawRectangle(screenW 0.3375screenH 0.0924screenW 0.3103screenH 0.0573tocolor(000212), false)
        dxDrawLine((screenW 0.3375) - 1, (screenH 0.0794) - 1, (screenW 0.3375) - 1screenH 0.0924tocolor(13622411255), 2false)
        dxDrawLine(screenW 0.6478, (screenH 0.0794) - 1, (screenW 0.3375) - 1, (screenH 0.0794) - 1tocolor(13622411255), 2false)
        dxDrawLine((screenW 0.3375) - 1screenH 0.0924screenW 0.6478screenH 0.0924tocolor(13622411255), 2false)
        dxDrawLine(screenW 0.6478screenH 0.0924screenW 0.6478, (screenH 0.0794) - 1tocolor(13622411255), 2false)
        dxDrawRectangle(screenW 0.3375screenH 0.0794screenW 0.3103screenH 0.0130tocolor(13622411255), false)
        dxDrawLine((screenW 0.3375) - 1, (screenH 0.1497) - 1, (screenW 0.3375) - 1screenH 0.1628tocolor(13622411255), 2false)
        dxDrawLine(screenW 0.6478, (screenH 0.1497) - 1, (screenW 0.3375) - 1, (screenH 0.1497) - 1tocolor(13622411255), 2false)
        dxDrawLine((screenW 0.3375) - 1screenH 0.1628screenW 0.6478screenH 0.1628tocolor(13622411255), 2false)
        dxDrawLine(screenW 0.6478screenH 0.1628screenW 0.6478, (screenH 0.1497) - 1tocolor(13622411255), 2false)
        dxDrawRectangle(screenW 0.3375screenH 0.1497screenW 0.3103screenH 0.0130tocolor(13622411255), false)
        dxDrawText("Wy?adowywujesz paczki poczekaj (7 sekund)", (screenW 0.3390) - 1, (screenH 0.0951) - 1, (screenW 0.6449) - 1, (screenH 0.1445) - 1tocolor(000255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Wy?adowywujesz paczki poczekaj (7 sekund)", (screenW 0.3390) + 1, (screenH 0.0951) - 1, (screenW 0.6449) + 1, (screenH 0.1445) - 1tocolor(000255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Wy?adowywujesz paczki poczekaj (7 sekund)", (screenW 0.3390) - 1, (screenH 0.0951) + 1, (screenW 0.6449) - 1, (screenH 0.1445) + 1tocolor(000255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Wy?adowywujesz paczki poczekaj (7 sekund)", (screenW 0.3390) + 1, (screenH 0.0951) + 1, (screenW 0.6449) + 1, (screenH 0.1445) + 1tocolor(000255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Wy?adowywujesz paczki poczekaj (7 sekund)"screenW 0.3390screenH 0.0951screenW 0.6449screenH 0.1445tocolor(254254254255), 1.10"default-bold""center""center"falsefalsefalsefalsefalse)
end

function Ladowanie()
 
local rh interpolateBetween(000screenW 0.385100, (getTickCount()-tick)/10000"Linear")
local Alpha interpolateBetween(00025500, ((getTickCount() - tick) / 1500), "Linear")        
dxDrawRectangle(screenW * -0.0000screenH 0.0000screenW 1.0000screenH 1.0000tocolor(000Alpha), false)
    dxDrawLine((screenW 0.3075) - 1, (screenH 0.4557) - 1, (screenW 0.3075) - 1screenH 0.5260tocolor(000255), 1false)
        
dxDrawLine(screenW 0.6933, (screenH 0.4557) - 1, (screenW 0.3075) - 1, (screenH 0.4557) - 1tocolor(000Alpha), 1false)
        
dxDrawLine((screenW 0.3075) - 1screenH 0.5260screenW 0.6933screenH 0.5260tocolor(000Alpha), 1false)
 dxDrawLine(screenW 0.6933screenH 0.5260screenW 0.6933, (screenH 0.4557) - 1tocolor(000Alpha), 1false)
 dxDrawRectangle(screenW 0.3075screenH 0.4557screenW 0.3858screenH 0.0703tocolor(505050Alpha), false)
  dxDrawRectangle(screenW 0.3075screenH 0.4557rhscreenH 0.0690tocolor(71550Alpha), false)

dxDrawText("?adowanie paczek na pojazd...", (screenW 0.3067) + 1, (screenH 0.5443) + 1, (screenW 0.6933) + 1, (screenH 0.6237) + 1tocolor(000255), 1.50"default-bold""center""center"falsefalsefalsefalsefalse)
 dxDrawText("?adowanie paczek na pojazd..."screenW 0.3067screenH 0.5443screenW 0.6933screenH 0.6237tocolor(255255255255), 1.50"default-bold""center""center"falsefalsefalsefalsefalse)    
end

local praca createMarker(2127.26,-2275.05,20.67-1"cylinder"1.21620090160)
local jobText2=createElement("text")
setElementPosition(jobText2, -2182.90,-223.58,36.52)
setElementData(jobText2"name""Praca Dorywcza\nDostawca Paczek!")
local blip createBlip(2132.85,-2277.97,20.6746)
local strefa createColSphere(-2173.43,-208.16,35.324.9)

local miejscadostaw = {
    {2376.25,-2010.16,13.55},
    {1774.53,-2047.32,13.55},
    {1183.80,-1233.06,18.55},
    {1032.30,-1118.13,23.89},
    {691.90,-1572.78,14.24},
    {1809.04,-1427.51,13.43},
    {1978.19,-1277.64,23.82},
}

addEventHandler("onClientMarkerHit"praca, function(elmd)
    if not md or getElementType(el) ~= "player" then return end
    if el ~= localPlayer then return end
    if panelpraca == false then
    addEventHandler("onClientRender",root,GuiPracka)
    czas getTickCount()
    panelpraca true
    showCursor(true)
    end
end)


function RozpocznijPrace(buttonstate) 
if panelpraca and button == "left" and state == "down" then 
if cursorPosition(screenW 0.3470screenH 0.4753screenW 0.1061screenH 0.0469then 
if not isElementWithinMarker(localPlayerpracathen return end 
if not getElementData(localPlayer"player:job"then
local pojazdy getElementsWithinColShape(strefa,"vehicle")
if #pojazdy > 0 then
    outputChatBox("* Jaki? pojazd blokuje wyjazd!"25500)
      return
end 
removeEventHandler ("onClientRender"rootGuiPrackapanelpraca false 
showCursor(falselocal losuj math.random(2#miejscadostaw) 
setElementData(localPlayer"player:job"true)
triggerServerEvent ("DajAutkoPracka"localPlayer)
    local v getPedOccupiedVehicle(localPlayer) 
    for index,vehicle in ipairs(getElementsByType("vehicle")) do 
        setElementCollidableWith(vehiclevfalseend
addEventHandler("onClientRender",root,Ladowanietick getTickCount()
showChat(false)
toggleControl("enter_exit"false)
setTimer(function()
      removeEventHandler("onClientRender",root,Ladowanie) 
          showChat(true)
          triggerServerEvent ("niefrazuj"localPlayer)
          toggleControl("enter_exit"true)
end,10000,1) 
             addEventHandler("onClientRender",root,InfoPraca1)
setTimer(function()
      removeEventHandler("onClientRender",root,InfoPraca1)
end,10000,1)
 punkt createMarker(miejscadostaw[losuj][1], miejscadostaw[losuj][2], miejscadostaw[losuj][3]-1.0"cylinder"2.9582210blip createBlipAttachedTo(punkt12addEventHandler("onClientMarkerHit"punkt, function(elmd) 
if not md or el~=localPlayer then return end 
local veh=getPedOccupiedVehicle(el) 
if not veh then return end 
if getVehicleController(veh) ~= localPlayer then return end 
setElementFrozen(veh,truesetElementFrozen(eltrue) 
             addEventHandler("onClientRender",root,InfoPraca3)
setTimer(function()
      removeEventHandler("onClientRender",root,InfoPraca3)
end,5000,1setTimer(function() 
setElementFrozen(veh,falsesetElementFrozen(elfalsedestroyElement(punktdestroyElement(blipsetElementData(localPlayer"player:job"false) 
       local kasa math.random(290,310)
       local kasapremium math.random(510,540)
                 if getElementData(localPlayer,"player:premium"then
            triggerServerEvent("givePlayerMoney"localPlayerkasapremium)
                        outputChatBox ("* [PREMIUM] Dostarczy?e? paczki dostajesz "..kasapremium.." PLN!"61479true )
        else
            triggerServerEvent("givePlayerMoney"localPlayerkasa)
                        outputChatBox ("* Dostarczy?e? paczki dostajesz "..kasa.." PLN!"61479true )
        end
triggerServerEvent("UsunAutko"localPlayertriggerServerEvent ("WarpGraczaKurier"localPlayer)
             addEventHandler("onClientRender",root,InfoPraca2)
setTimer(function()
      removeEventHandler("onClientRender",root,InfoPraca2)
end,4500,1end70001end) 
else 
outputChatBox("* Posiadasz aktywn? prac?."25500end 
end 
end 
end 
addEventHandler("onClientClick"getRootElement(), RozpocznijPraceaddEventHandler("onClientVehicleExit"resourceRoot, function(plr,seat) 
if seat~=0 then return end 
if plr~=localPlayer then return end 
triggerServerEvent("UsunAutko"localPlayersetElementData(localPlayer,"player:job",falsedestroyElement(punktdestroyElement(blipoutputChatBox ("* Zako?czy?e?/a? prace!."25500true end)

addEvent("StopPracaKurier"true)
addEventHandler("StopPracaKurier"resourceRoot, function(veh)
    setElementData(localPlayer,"player:job",false)
                destroyElement(punkt) 
                destroyElement(blip) 
                removeEventHandler ("onClientRender"rootInfoPraca1)
                removeEventHandler ("onClientRender"rootLadowanie)
                       showChat(true)
end)

function ZamknijOkno(buttonstate)
if panelpraca and button == "left" and state == "down" then
           if cursorPosition(screenW 0.5469screenH 0.4766screenW 0.1061screenH 0.0469then
                panelpraca false 
                removeEventHandler ("onClientRender"rootGuiPracka)
                                        showCursor(false)
         end
    end
end
addEventHandler("onClientClick"getRootElement(), ZamknijOkno)

addEventHandler("onClientResourceStop"resourceRoot, function()
        setElementData(localPlayer,"player:job",false)
end)

function cursorPosition(xywh)
    if (not isCursorShowing()) then
        return false
    end
    local mxmy getCursorPosition()
    local fullxfully guiGetScreenSize()
    cursorxcursory mx*fullxmy*fully
    if cursorx and cursorx and cursory and cursory h then
        return true
    else
        return false
end
end

function filedelet ()
if fileExists("paczki_c.lua"then
   fileDelete("paczki_c.lua")
 end
end
addEventHandler("onClientResourceStart"getResourceRootElement(getThisResource()), filedelet)
addEventHandler("onClientPlayerQuit"getRootElement(), filedelet)
addEventHandler("onClientPlayerJoin"getRootElement(), filedelet)

addEvent("przenikaniePojazdow"true)
addEventHandler("przenikaniePojazdow"root, function(v)
    for i,auto in ipairs(getElementsByType("vehicle")) do
        setElementCollidableWith(autovfalse)
    end
    for i,vv in ipairs(getElementsByType("player")) do
        setElementCollidableWith(vvvfalse)
    end
end)

S:
addEvent("GiveMajneHajs"true)
addEventHandler("GiveMajneHajs"root, function(money)
    if not tonumber(moneythen return end
    givePlayerMoney(source,money)
    local rep=getElementData(source,"player:reputation") or 0
    local dajrp=rep+1
    setElementData(source,"player:reputation",dajrp)
end)

addEvent "DajAutkoPracka"true )
addEventHandler "DajAutkoPracka"root, function ()
if getElementData(source,"player:license:pjB") ~= 1 then
    outputChatBox("* Nie posiadasz prawa jazdy kategorii B!"source25500)
                triggerClientEvent(source"StopPracaKurier"resourceRoot)
      return
end
if exports["ogrpg-prace-settings"]:getVehicleLicense(source,"B"then return end
    auto createVehicle 499,2152.96,-2274.08,13.40,0.1,359.9,45.8)
    triggerClientEvent("przenikaniePojazdow"plrauto)
    warpPedIntoVehicle (sourceauto )
    setVehicleColor(auto51,255,025500)
    setElementData(auto"vehicle:desc""Praca Dorywcza\nDostawca Paczek")
    setVehicleHandling(auto,"maxVelocity",85)
    setElementData(auto"vehicle:fuel"100)
    setElementData(auto"vehicle.praca"true)
    setElementFrozen(auto,true)
    setVehiclePlateText(auto"skyGame")
    setElementData(auto"vehicle:BezynaWloczone"true)
    Paczka createObject(1271000)
    attachElements (Paczkaauto0.0, -1.01.090)
    setObjectScale(Paczka1.7)
    Paczka2 createObject(1271000)
    attachElements (Paczka2auto0.0, -2.21.090)
    setObjectScale(Paczka21.7)
    Pojazdy[source] = auto
    KamienKopalnia[source] = Paczka
    KamienKopalnia2[source] = Paczka2
end)

function WarpGraczaPracaKurier(player)
removePedFromVehicle(player)
setElementPosition(player,  2132.85,-2277.97,20.67)
end

addEvent("WarpGraczaKurier"trueaddEventHandler("WarpGraczaKurier"getRootElement(), function() 
WarpGraczaPracaKurier(source)
end)


addEvent("niefrazuj"trueaddEventHandler("niefrazuj"getRootElement(), function() 
setElementFrozen(auto,false)
end)

Pojazdy = {}
KamienKopalnia = {}
KamienKopalnia2 = {}

addEvent("UsunAutko"true)
addEventHandler("UsunAutko"getRootElement(),
function()
     if Pojazdy[sourcethen
          if isElement(Pojazdy[source]) then destroyElement(Pojazdy[source]) end
     end
     if KamienKopalnia[sourcethen
          if isElement(KamienKopalnia[source]) then destroyElement(KamienKopalnia[source]) end
     end
     if KamienKopalnia2[sourcethen
          if isElement(KamienKopalnia2[source]) then destroyElement(KamienKopalnia2[source]) end
     end
end)

addEventHandler("onPlayerQuit"getRootElement(), function()
     if Pojazdy[sourcethen
          if isElement(Pojazdy[source]) then destroyElement(Pojazdy[source]) end
     end
     if KamienKopalnia[sourcethen
          if isElement(KamienKopalnia[source]) then destroyElement(KamienKopalnia[source]) end
     end
     if KamienKopalnia2[sourcethen
          if isElement(KamienKopalnia2[source]) then destroyElement(KamienKopalnia2[source]) end
     end
end)


Podpis
c***
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 21:16


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

Musisz zdefiniowa? gracza, kt?ry siedzi w poje?dzie. Dodaj


local gracz localPlayer


Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 21:24


Kuksss

guwno






Wiek: 22
Na forum: 3781 dni
Posty: 102
Nick w MP: guwnp

Piwa: 732

Respekt: 70,5

Ostrzeżeń: 100%
Ciastuu?, zrobilem tak:
local gracz localPlayer
if exports["ogrpg-prace-settings"]:getVehicleLicense(source,"B"then return end
    auto createVehicle 499,2152.96,-2274.08,13.40,0.1,359.9,45.8)
    triggerClientEvent("przenikaniePojazdow"graczauto)
ale nie dziala

Podpis
c***
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 21:28


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

U mnie wszystko dzia?a poprawnie gdy? u?y?em ze Swojego kodu funkcje kt?re Tobie poda?em. Sprawd? wszystko poprawnie oraz patrz co masz za b??dy w /debugscript 3

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 21:34


Kuksss

guwno






Wiek: 22
Na forum: 3781 dni
Posty: 102
Nick w MP: guwnp

Piwa: 732

Respekt: 70,5

Ostrzeżeń: 100%
Ciastuu?, w db 3 mam: Bad argument @ 'setElementCollidableWith' [Expected element at argument 2, got boolean] [DUP x131]

Podpis
c***
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-11, 22:40


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Kolega zacz?? pomaga? a ju? nie sko?czy? :P

Kuksss,

Trybik LUA - Chyba czas zmieni? podpis bo ten jest nie na miejscu. Poda?by? chocia? linijk? tego kodu :x Bo w tym "syfie" to jak ig?y w stogu siana.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Ghost mode 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