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

Wysłany: 2014-10-25, 18:55


GumiS0000







Wiek: 29
Na forum: 4555 dni
Posty: 98
Nick w MP: After

Piwa: 227

Respekt: 40

Ostrzeżeń: 20%
Cze??
Jak zrobi? ?e tylko jak gracz z teamu Mechanik wjedzie w marker to si? naprawi a jak kto? inny to nie

marker createMarker (1601.6, -16268.4"cylinder"8.05020457255)

addEventHandler "onMarkerHit",marker, function (gpojazd)
local auto getPedOccupiedVehicle(gpojazd) 
if auto and getVehicleController(auto) == gpojazd then 
    setElementFrozen autotrue )
    fixVehicle (auto)
    setElementFrozen autofalse )
end
end)


Podpis
Jeśli pomogłem liczę na :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-25, 19:14


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

By?o ju? wiele razy, zapraszam do wyszukiwarki.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-25, 19:27


GumiS0000







Wiek: 29
Na forum: 4555 dni
Posty: 98
Nick w MP: After

Piwa: 227

Respekt: 40

Ostrzeżeń: 20%
nie moge znale?? m?g?by? mi to zrobic?

[ Dodano: 2014-10-25, 19:29 ]
marker createMarker (1601.6, -16268.4"cylinder"8.05020457255)

addEventHandler "onMarkerHit",marker, function (gpojazd,hitElement)
if getPlayerTeam(hitElement) == "Mechanik" then
local auto getPedOccupiedVehicle(gpojazd)
if auto and getVehicleController(auto) == gpojazd then 
    setElementFrozen autotrue )
    fixVehicle (auto)
    setElementFrozen autofalse )
end
end
end)


Zrobi?em takie co?ale nie dzia?a

Podpis
Jeśli pomogłem liczę na :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-25, 20:59


LexuS







Wiek: 25
Na forum: 4240 dni
Posty: 7
Nick w MP: LexuS



Respekt: 40

hmmm nie lepiej tutaj u?y? getElementData ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-25, 23:05


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Jezusicku, jakiego getElementData?


marker createMarker (1601.6, -16268.4"cylinder"8.05020457255)

addEventHandler "onMarkerHit"marker,
    function ( gpojazd )
        if getPlayerTeam(gpojazd) == getTeamFromName("Mechanik"then
            local auto getPedOccupiedVehicle(gpojazd)
            if auto and getVehicleController(auto) == gpojazd then 
                setElementFrozen autotrue )
                fixVehicle (auto)
                setElementFrozen autofalse )
            end
        end
    end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-26, 00:10


GumiS0000







Wiek: 29
Na forum: 4555 dni
Posty: 98
Nick w MP: After

Piwa: 227

Respekt: 40

Ostrzeżeń: 20%
nie dzia?a ka?dy mo?e :/

Podpis
Jeśli pomogłem liczę na :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-26, 09:24


LexuS







Wiek: 25
Na forum: 4240 dni
Posty: 7
Nick w MP: LexuS



Respekt: 40

zamiast teamu spr?buj co? takiego:

if getElementData(thePlayer"mechanik"then



setElementData(thePlayer"mechanik")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-26, 10:20


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

marker createMarker (1601.6, -16268.4"cylinder"8.05020457255)

addEventHandler "onMarkerHit"marker,
    function ( gpojazd )
        if ( getElementType gpojazd ) == "vehicle" then
            local player getVehicleOccupant gpojazd )
            if ( player then
                local playerTeam getPlayerTeam player )
                if ( playerTeam == getTeamFromName "Mechanik" ) ) then
                    setElementFrozen gpojazdtrue )
                    fixVehicle gpojazd )
                    setElementFrozen gpojazdfalse )
                end
            end
        end
    end
)

Jak nie dzia?a to poka? b??dy w debugu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-26, 17:57


GumiS0000







Wiek: 29
Na forum: 4555 dni
Posty: 98
Nick w MP: After

Piwa: 227

Respekt: 40

Ostrzeżeń: 20%
w?a?nie nie ma db ale nie dzia?a :/

[ Dodano: 2014-10-28, 19:40 ]

addEventHandler "onMarkerHit"marker,
    function ( gpojazd )
        if ( getElementType gpojazd ) == "vehicle" then
            local player getVehicleOccupant gpojazd )
            if ( player then
                 local accName getAccountName getPlayerAccount gpojazd ) ) -- get his account name
     if isObjectInACLGroup ("user."..accNameaclGetGroup "test" ) ) then
                    setElementFrozen gpojazdtrue )
                    fixVehicle gpojazd )
                    setElementFrozen gpojazdfalse )
                end
            end
        end
    end
)
zrobilem pod acl ale tez nie dzia?a

Podpis
Jeśli pomogłem liczę na :piwo:
Postaw piwo autorowi tego posta
 

 
Tagi: naprawa :: pod :: team
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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