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

Wysłany: 2017-04-09, 12:04


Atroth







Wiek: 24
Na forum: 3818 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4813

Respekt: 540
Respekt: 540

Witam.

Zrobi?em tutaj taki kod. Jak zrobi?, aby z jednego markeru tworzy?o paczk? (theObject), a w drugim j? usuwa?o i animacja si? wy??cza?a?


local wez = createMarker ( 2491.28809, -1670.03906, 13.33595 - 1, "cylinder", 2.5, 255, 255, 0, 170 )
local usun = createMarker ( 2500.28809, -1685.03906, 13.33595 - 1, "cylinder", 2.5, 255, 255, 0, 170 )

function animacja ()
    if wez then
        setPedAnimation ( localPlayer, "CARRY", "crry_prtial", 1,true )
        local x, y, z = getElementPosition ( localPlayer )
        local theObject = createObject ( 1220, x , y, z, 0, 0, 0 )
        attachElements ( theObject, localPlayer, 0, 0.8, 0.6 )
    end
end
addEventHandler("onClientMarkerHit", root, animacja)


Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-09, 12:38


Barcioo

Kiedyś to było ST






Wiek: 26
Na forum: 4189 dni
Posty: 458
Nick w MP: Bartek.

Piwa: 1892

Respekt: 460
Respekt: 460

Rookspack, dodaj element date w pierwszym markerze nadawa?o i w drugim ?eby sprawdzi?o czy ma i u?niecie element daty

Podpis
Kanał Youtube;
A tu zapraszam
, pomogłem Ci? Wynagrodź mnie :piwo: :)


SUPPORT TEAM- 2016-09-03 do 2018-05-25
Test Mod- 2018-05-25
1k dni na Forum - 2018-01-28


GG: 62111935
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-09, 13:01


Atroth







Wiek: 24
Na forum: 3818 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4813

Respekt: 540
Respekt: 540

Barcioo, M?g?by? mi powiedzie? dok?adnie na co nada??

[ Dodano: 2017-04-09, 13:07 ]
Zrobi?em co? takiego:


local wez = createMarker ( 2491.28809, -1670.03906, 13.33595 - 1, "cylinder", 2.5, 255, 255, 0, 170 )
local usun = createMarker ( 2500.28809, -1685.03906, 13.33595 - 1, "cylinder", 2.5, 255, 255, 0, 170 )

function animacja (thePlayer, theObject)
    if wez then
        setPedAnimation ( thePlayer, "CARRY", "crry_prtial", 1,true )
        local x, y, z = getElementPosition ( source )
        local theObject = createObject ( 1220, x , y, z, 0, 0, 0 )
        attachElements ( theObject, thePlayer, 0, 0.8, 0.6 )
    end
end
addEventHandler("onMarkerHit", root, animacja)

function usun (theObject, thePlayer)
    if usun then
        setPedAnimation(source,false)
        destroyElement(theObject)
end
end
addEventHandler("onMarkerHit", root, usun)


A jak zrobi? element date to nie umiem :/ .

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-09, 14:23


Barcioo

Kiedyś to było ST






Wiek: 26
Na forum: 4189 dni
Posty: 458
Nick w MP: Bartek.

Piwa: 1892

Respekt: 460
Respekt: 460

Pewny to ja nie jestem ale zobacz


local wez = createMarker ( 2491.28809, -1670.03906, 13.33595 - 1, "cylinder", 2.5, 255, 255, 0, 170 )
local usun = createMarker ( 2500.28809, -1685.03906, 13.33595 - 1, "cylinder", 2.5, 255, 255, 0, 170 )

function animacja (thePlayer, theObject)
        setPedAnimation ( thePlayer, "CARRY", "crry_prtial", 1,true )
        local x, y, z = getElementPosition ( source )
        local theObject = createObject ( 1220, x , y, z, 0, 0, 0 )
        attachElements ( theObject, thePlayer, 0, 0.8, 0.6 )
        setElementData(thePlayer,"wez",true)
end
addEventHandler("onMarkerHit", root, animacja)

function usun (theObject, thePlayer)
    if getElementData(thePlayer,"wez") == true then 
       setPedAnimation(source,false)
        destroyElement(theObject)
        setElementData(thePlayer,"wez",false)
        else
        outputChatBox(thePlayer,"Nie masz rozpoczetej pracy")
end
end
addEventHandler("onMarkerHit", root, usun)



Podpis
Kanał Youtube;
A tu zapraszam
, pomogłem Ci? Wynagrodź mnie :piwo: :)


SUPPORT TEAM- 2016-09-03 do 2018-05-25
Test Mod- 2018-05-25
1k dni na Forum - 2018-01-28


GG: 62111935
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-09, 14:39


Atroth







Wiek: 24
Na forum: 3818 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4813

Respekt: 540
Respekt: 540

Barcioo,

DB3:

http://imgur.com/a/NJPdd

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Tagi: markery
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