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: 30
Na forum: 4696 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, -1626, 8.4, "cylinder", 8.0, 50, 204, 57, 255)

addEventHandler ( "onMarkerHit",marker, function (gpojazd)
local auto = getPedOccupiedVehicle(gpojazd) 
if auto and getVehicleController(auto) == gpojazd then 
    setElementFrozen ( auto, true )
    fixVehicle (auto)
    setElementFrozen ( auto, false )
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: 33
Na forum: 4536 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

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: 30
Na forum: 4696 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, -1626, 8.4, "cylinder", 8.0, 50, 204, 57, 255)

addEventHandler ( "onMarkerHit",marker, function (gpojazd,hitElement)
if getPlayerTeam(hitElement) == "Mechanik" then
local auto = getPedOccupiedVehicle(gpojazd)
if auto and getVehicleController(auto) == gpojazd then 
    setElementFrozen ( auto, true )
    fixVehicle (auto)
    setElementFrozen ( auto, false )
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: 4381 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: 5643 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

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

Jezusicku, jakiego getElementData?


marker = createMarker (1601.6, -1626, 8.4, "cylinder", 8.0, 50, 204, 57, 255)

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


Postaw piwo autorowi tego posta
 

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


GumiS0000







Wiek: 30
Na forum: 4696 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: 4381 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: 5643 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

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

marker = createMarker (1601.6, -1626, 8.4, "cylinder", 8.0, 50, 204, 57, 255)

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 ( gpojazd, true )
                    fixVehicle ( gpojazd )
                    setElementFrozen ( gpojazd, false )
                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: 30
Na forum: 4696 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."..accName, aclGetGroup ( "test" ) ) then
                    setElementFrozen ( gpojazd, true )
                    fixVehicle ( gpojazd )
                    setElementFrozen ( gpojazd, false )
                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