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

Wysłany: 2016-07-25, 21:33


krystek77







Wiek: 28
Na forum: 4172 dni
Posty: 135
Nick w MP: Krystek

Piwa: 176

Respekt: 125,3
Respekt: 125,3

Witam chcia?bym zrobic aby brama otwiera?a sie na dwie "grupy" Admin i Moderator

O to kodzik ktory chcialem zrobic lecz cos nie chodzi:




bramapp1 = createMarker( 3201.83228, 461.13824, 14.70766, 'corona', 1, 0, 0, 255, 0)
bramapp2 = createObject ( 980, 3183.5, 469.60000610352, 16.5, 0, 0, 0 )






function bramapp  (hitPlayer, matchingDimension)
local playera = hitPlayer
if isObjectInACLGroup ("user."..konto, aclGetGroup("Admin")) or  isObjectInACLGroup ("user."..konto, aclGetGroup("Moderator")) then
for i,v in ipairs(getElementsByType("player")) do
moveObject ( bramapp2, 1500, 3183.5, 469.60000610352, 21)


end
end
end



function MarkerLeave43 (thePlayer)
moveObject ( bramapp2, 1500, 3183.5, 469.60000610352, 16.5)

end

addEventHandler ( "onMarkerLeave", bramapp, MarkerLeave43 )
addEventHandler ( "onMarkerHit", bramapp1, bramapp2 )


Za pomoc stawiam zimne piwko

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-25, 22:00


luki123luki123

Place Game






Wiek: 28
Na forum: 5416 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6103

Respekt: 611
Respekt: 611Respekt: 611

krystek77, naucz si? najpierw podstaw :D
function isPlayerInACL ( player, acl )
    local account = getPlayerAccount ( player )
    if ( isGuestAccount ( account ) ) then
        return false
    end
        return isObjectInACLGroup ( "user."..getAccountName ( account ), aclGetGroup ( acl ) )
end
bramapp1 = createMarker( 3201.83228, 461.13824, 14.70766, 'corona', 1, 0, 0, 255, 0)
bramapp2 = createObject ( 980, 3183.5, 469.60000610352, 16.5, 0, 0, 0 )

function bramapp( hitPlayer, matchingDimension )
    if source == bramapp1 then 
        if isPlayerInACL ( hitPlayer, "Admin" ) or isPlayerInACL ( hitPlayer, "Moderator" ) then
            moveObject ( bramapp2, 1500, 3183.5, 469.60000610352, 21)
        end
    end
end
addEventHandler ( "onMarkerHit", bramapp1, bramapp )


function MarkerLeave43 (hitPlayer)
    if source == bramapp1 then 
        if isPlayerInACL ( hitPlayer, "Admin" ) or isPlayerInACL ( hitPlayer, "Moderator" ) then
moveObject ( bramapp2, 1500, 3183.5, 469.60000610352, 16.5)
        end
    end
end
addEventHandler ( "onMarkerLeave", bramapp1, MarkerLeave43 )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-25, 22:14


krystek77







Wiek: 28
Na forum: 4172 dni
Posty: 135
Nick w MP: Krystek

Piwa: 176

Respekt: 125,3
Respekt: 125,3

Dzieki chodzi Piwko leci :)

Postaw piwo autorowi tego posta
 

 
Tagi: brama :: dwie :: grupy
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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