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

Wysłany: 2015-08-17, 12:28


Dexnes_

Tiger






Wiek: 26
Na forum: 4401 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

Witam mam problem , dosta?em od kolegi kod na komendy i bajery admina , ale mam problem z teleportacj?.

addCommandHandler("test", function(el,md)
    local gracz el
    if isPedInVehicle(elthen gracz getPedOccupiedVehicle(elend
    setElementPosition(gracz2500.5952, -1669.445413.3532)
    outputChatBox("test."el2552550)
end)


ten kod dzia?a tylko ?e mo?e tepa? si? tam normalny gracz.

wi?c prosz? o pomoc jak zrobi? aby m?g? tepa? si? tam Moderator,Admin,Rcon

za pomoc :arrow: :piwo: R*

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-17, 12:34


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3


addCommandHandler("test", function(el,md)
    local gracz el
acc getPlayerAccount(el)
accName getAccountName(acc)
if isObjectInACLGroup("user."..accNameaclGetGroup("Moderator")) then
    if isPedInVehicle(elthen gracz getPedOccupiedVehicle(elend
    setElementPosition(gracz2500.5952, -1669.445413.3532)
    outputChatBox("test."el2552550)
end
end)



tak to powinno wygladac, reszte sam dorob uzywajac if / or

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-17, 12:59


Dexnes_

Tiger






Wiek: 26
Na forum: 4401 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

Nie dzia?a mi ten kod :(

Jestem w acl moderator ale nie dzia?a :/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-17, 13:28


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

s-side

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-17, 20:33


Dexnes_

Tiger






Wiek: 26
Na forum: 4401 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

nadal nic :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-18, 21:21


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

addCommandHandler("test", function(el,md)
    local gracz el
      if isObjectInACLGroup'user.'..getAccountNamegetPlayerAccount(el)), aclGetGroupModerator' ) ) then
    if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
    setElementPosition(gracz, 2500.5952, -1669.4454, 13.3532)
    outputChatBox("test", el, 255, 255, 0)
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-18, 21:41


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

Fanciak, w Twoim kodzie brakuje endow, poza tym grupa musi zosta? podana jako string :

Sprobuj tak i powiedz co si? dzieje w konsoli pod f8 :


function x(plrcmd)
print("Test")
acc getPlayerAccount(plr)
accName getAccountName(acc)
print("test2")
if isObjectInACLGroup("user."..accNameaclGetGroup("Moderator")) then
print("test3")
setElementPosition(plrustaw.xustaw.yustaw.z)
end
end
addCommandHandler("testowe"x)



Wpisz testowe i powiedz czy przenosi i co wypisuje w konsoli f8

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-19, 10:27


Dexnes_

Tiger






Wiek: 26
Na forum: 4401 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

Dzia?a :)

ale nic nie pokazuje sie w konsoli f8

Postaw piwo autorowi tego posta
 

 
Tagi: teleportowanie :: się :: adminów
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Teleportowanie się adminów 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