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

Wysłany: 2015-06-08, 19:13


GamerHD11







Wiek: 24
Na forum: 4260 dni
Posty: 259
Nick w MP: SzokoHD

Piwa: 23

Respekt: 50

Witam napisa?em kodzik na logowanie si? do frakcji poprzez wej?cie w marker lecz skrypt nie dzia?a, po wej?ciu w marker nic si? nie dzieje. ?adnych b??d?w w DB 3. Jak bym m?g? naprawi? kod ?

createMarker (002"cylinder"225500255 )
team createTeam "LSPD"25500)

addEventHandler("onMarkerHit"thePlayer, function()
if isObjectInACLGroup "user." .. login aclGetGroup "LSPD" ) ) then
local login getAccountData getAccountName thePlayer ) )
setPlayerTeam thePlayer team )
else

outputChatBox("Nie jeste? pracownikiem Policji")
end
end)    


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-06-08, 19:15


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

addEventHandler("onMarkerHit"thePlayer, function()


Nie dziwi? si? jak ustalasz gracza jako marker :D

Podpis

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

 
Wysłany: 2015-06-08, 19:23


GamerHD11







Wiek: 24
Na forum: 4260 dni
Posty: 259
Nick w MP: SzokoHD

Piwa: 23

Respekt: 50

Dalej nie dzia?a :(

[ Dodano: 2015-06-08, 19:33 ]
Aha mam Debug Script 3:

ERROR: Frakcje/frakcje.lua:2: attempt to call global 'createTeam' (a nil value)
ERROR: [gameplay]/Frakcje/frakcje.lua:5: attempt to concatenate global 'login' (a nil value)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-06-08, 19:34


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

GamerHD11, bo on nie poprawi? tylko ci pokaza? b?ad zamie? z thePlayer na m

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-06-08, 19:40


GamerHD11







Wiek: 24
Na forum: 4260 dni
Posty: 259
Nick w MP: SzokoHD

Piwa: 23

Respekt: 50

Zrobi?em tak :)

[ Dodano: 2015-06-08, 19:41 ]
I nic + edytowa?em kod i teraz pokazuje, ?e nie pracuje w policji a jestem w ACL.

createMarker (002"cylinder"225500255 )
team createTeam "LSPD"25500)

addEventHandler("onMarkerHit"m, function()
if isObjectInACLGroup "user. login.." aclGetGroup "LSPD" ) ) then
local login getAccountData getAccountName thePlayer ) )
setPlayerTeam thePlayer team )
outputChatBox("Zalogowa?e? si? do Policji")
else

outputChatBox("Nie jeste? pracownikiem Policji")
end
end)           


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-06-08, 19:45


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

createMarker (002"cylinder"225500255 )
team createTeam "LSPD"25500)

addEventHandler("onMarkerHit"m, function()
local login getAccountName getPlayerAccount thePlayer ) )
    if isObjectInACLGroup ("user."..loginaclGetGroup "LSPD" ) ) then
    setPlayerTeam thePlayer team )
    outputChatBox("Zalogowa?e? si? do Policji")
    else
    outputChatBox("Nie jeste? pracownikiem Policji")
    end
end)           


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-06-08, 19:46


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

if isObjectInACLGroup "user. login.." aclGetGroup "LSPD" ) ) then


Przygl?dnij si? poprawno?ci tej linijki

Podpis

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

 
Wysłany: 2015-06-08, 19:48


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Z?e funkcje u?y?e? zamiast getAccountData to getAccountName a za getAccountName to getPlayerAccount
i ?le napisana
if isObjectInACLGroup ( "user. login.." , aclGetGroup ( "LSPD" ) ) then
if isObjectInACLGroup ("user."..login, aclGetGroup ( "LSPD" ) ) then

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-06-08, 19:51


GamerHD11







Wiek: 24
Na forum: 4260 dni
Posty: 259
Nick w MP: SzokoHD

Piwa: 23

Respekt: 50

Gdy zrobi? tak
if isObjectInACLGroup "user." .. login aclGetGroup ("LSPD") ) then
to mi wywala b??d i nie pokazuje si? nawet wiadomo?? nie jeste? zalogowany.

DB3: [gameplay]/Frakcje/frakcje.lua:5: attempt to concatenate global 'login' (a nil value)

[ Dodano: 2015-06-08, 20:00 ]
createMarker (002"cylinder"225500255 )
team createTeam "LSPD"25500)

addEventHandler("onMarkerHit"m, function()
if isObjectInACLGroup ("user."..loginaclGetGroup "LSPD" ) ) then
login getAccountName getPlayerAccount thePlayer ) )
setPlayerTeam thePlayer team )
outputChatBox("Zalogowa?e? si? do Policji")
else

outputChatBox("Nie jeste? pracownikiem Policji")
end
end)     


Kod wygl?da tak i wywala mi DB3:

ERROR: [gameplay]/Frakcje/frakcje.lua:5: attempt to concatenate global 'login' (a nil value)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-06-08, 20:35


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

createMarker (002"cylinder"225500255 )
team createTeam "LSPD"25500)

addEventHandler("onMarkerHit"root, function(e)
    if source~=m then return end
    login getAccountName getPlayerAccount ) )
    if isObjectInACLGroup ("user."..loginaclGetGroup "LSPD" ) ) then
        setPlayerTeam team )
        outputChatBox("Zalogowa?e? si? do Policji",e,255,255,255)
    else
        outputChatBox("Nie jeste? pracownikiem Policji",e,255,255,255)
    end
end)    


Podpis

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

 
Wysłany: 2015-06-08, 20:39


GamerHD11







Wiek: 24
Na forum: 4260 dni
Posty: 259
Nick w MP: SzokoHD

Piwa: 23

Respekt: 50

Dobrze dzia?a ju?, dzi?kuje wszystkim za pomoc i postawi? zimne :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-06-08, 20:48


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

[clo]

Podpis

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

 
Tagi: logowanie :: frakcji
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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