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

Wysłany: 2014-11-29, 04:04


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Witam chcia?bym aby marker dzia?a? tylko dla odpowiedniego teamu , ?eby by? ale po wej?ciu gracze z nie odpowiednim teamem wyskakiwa?a wiadomo??.Za pomoc piwko :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 10:13


Dixers

No-Life






Wiek: 26
Na forum: 4312 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Mo?na zrobi? te? przez ACL


Więcej informacji znajdziesz w Wikipedii MTA:


isObjectInACLGroup


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 11:41


KukiX







Wiek: 34
Na forum: 6718 dni
Posty: 567

Piwa: 17560

Respekt: 160
Respekt: 160Respekt: 160

Mo?esz zrobi? w ten spos?b:

if getPlayerTeam(gracz) == getTeamFromName("Policja"then
    outputChatBox("jestes w druzynie policja",gracz)
else
    outputChatBox("nie jestes w druzynie policja",gracz)
end

Oczywi?cie to jest tylko przyk?ad.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 16:04


Tostuch







Wiek: 27
Na forum: 4931 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

addEventHandler("onMarkerHit"root, function(el)
 if getElementType(el) == "player" then
  if getPlayerTeam(el) == getTeamFromName("Team"then
   outputChatBox("Jeste? w teamie 'Team'."el)
  else
   outputChatBox("Nie jeste? w teamie 'Team'."el)
  end
 end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 21:33


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Tostuch, Ech zawsze mam z tym problem gdzie tu wstawi? marker ?
addEventHandler("onMarkerHit"root, function(el)
 if getElementType(el) == "player" then
  if getPlayerTeam(el) == getTeamFromName("Team"then
   outputChatBox("Jeste? w teamie 'Team'."el)
  else
   outputChatBox("Nie jeste? w teamie 'Team'."el)
  end
 end
end)



Bo w przypadku KukiX, to wiem gdzie

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 21:42


Tostuch







Wiek: 27
Na forum: 4931 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

To m?j b??d wybacz, niedopatrzy?em :D

addEventHandler("onMarkerHit"root, function(el)
if source == NAZWAMARKERA then
 if getElementType(el) == "player" then
  if getPlayerTeam(el) == getTeamFromName("Team"then
   outputChatBox("Jeste? w teamie 'Team'."el)
  else
   outputChatBox("Nie jeste? w teamie 'Team'."el)
  end
 end
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 21:59


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Tostuch, Nie wiem czemu nie dzia?a chce ?eby to si? w??czy?o je?li gracz wejdzie w marker "marker" i b?dzie w teamie "Policja

addEventHandler"onMarkerHit"getResourceRootElementgetThisResource( ) ),
    function( playerdimension )
        if dimension and getElementTypeplayer ) == "player" then
            local vehicle getPlayerOccupiedVehicleplayer )
            if vehicle then
                local driver getVehicleControllervehicle )
                if driver == player and not getVehicleInModShopsource then
                    for k,v in ipairsmodShops ) do
                        if modShops].marker == source and getElementTypevehicle ) == "vehicle" then
                            timersvehicle ] = setTimerunfreezeVehicleInModShop60000 TIME_IN_MODSHOP1vehicle )
                            timersClientvehicle ] = setTimertriggerClientEvent60000 TIME_IN_MODSHOP 2001driver"modShop_clientResetVehicleUpgrades"driver )
                            setModShopBusysourcevehicle )
                            freezVehicleInModShopvehiclemodShops].marker )
                            triggerClientEventdriver"onClientPlayerEnterModShop"playervehiclegetPlayerMoneyplayer ), modShops].name )
                        end
                    end
                end
            end
        end
    end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 22:49


Tostuch







Wiek: 27
Na forum: 4931 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

addEventHandler"onMarkerHit"root,
    function( playerdimension )
if source == marker then
        if dimension and getElementTypeplayer ) == "player" then
            local vehicle getPlayerOccupiedVehicleplayer )
            if vehicle then
                local driver getVehicleControllervehicle )
                if driver == player and not getVehicleInModShopsource ) and getPlayerTeam(driver) == getTeamFromName("Policja"then
                    for k,v in ipairsmodShops ) do
                        if modShops].marker == source and getElementTypevehicle ) == "vehicle" then
                            timersvehicle ] = setTimerunfreezeVehicleInModShop60000 TIME_IN_MODSHOP1vehicle )
                            timersClientvehicle ] = setTimertriggerClientEvent60000 TIME_IN_MODSHOP 2001driver"modShop_clientResetVehicleUpgrades"driver )
                            setModShopBusysourcevehicle )
                            freezVehicleInModShopvehiclemodShops].marker )
                            triggerClientEventdriver"onClientPlayerEnterModShop"playervehiclegetPlayerMoneyplayer ), modShops].name )
                        end
                    end
                end
            end
        end
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 23:12


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Tostuch, Nadal nic, nie wa?ne czy jestem w teamie po wjechaniu nic si? nie dzieje. W db3 nic niema.

Postaw piwo autorowi tego posta
 

 
Tagi: marker :: działa :: tylko :: dla :: teamu
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