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

Wysłany: 2016-02-20, 12:28


KRRRECIK123







Wiek: 25
Na forum: 4076 dni
Posty: 51
Nick w MP: Krrrecik



Respekt: 50


marker = createMarker (-1615, 686, 7, "cylinder", 2, 0, 0, 155, 255)
Policja = createTeam ( "Policja", 0, 0, 155 )

function praca ( thePlayer, player )
local playerName = getAccountName ( getPlayerAccount ( player ) ) 
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then 

giveWeapon ( thePlayer, 3, 9999 )
setPlayerTeam ( thePlayer, Policja )
giveWeapon ( thePlayer, 23, 9999 )
setSkin ( thePlayer, 281 )
giveWeapon ( thePlayer, 31, 9999 )
giveWeapon ( thePlayer, 41, 9999 )
end
end

addCommandHandler ("onMarkerHit, praca")

ERROR:
[2016-02-20 12] WARNING: Marker\server.lua:17: Bad argument @ 'addCommandHandler' [Expected function at argument 2, got none]


Pomo?e kto? ?

Ostatnio zmieniony przez #404 2016-02-20, 15:00, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-20, 12:36


AteX







Wiek: 27
Na forum: 4156 dni
Posty: 925
Nick w MP: #AteX

Piwa: 8366

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

Po pierwsze z?y dzia?, a po drugie u?ywaj znacznik?w lua.

addCommandHandler zmie? na
addEventHandler("onMarkerHit",marker,praca)


Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-20, 15:00


KRRRECIK123







Wiek: 25
Na forum: 4076 dni
Posty: 51
Nick w MP: Krrrecik



Respekt: 50


marker = createMarker (-1615, 686, 7, "cylinder", 2, 0, 0, 155, 255) 
Policja = createTeam ("Policja", 0, 0, 155)

function praca ( thePlayer, player )
local playerName = getAccountName ( getPlayerAccount ( player ) ) 
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then 

giveWeapon ( thePlayer, 3, 9999 )
setPlayerTeam ( thePlayer, Policja )
giveWeapon ( thePlayer, 23, 9999 )
setSkin ( thePlayer, 281 )
giveWeapon ( thePlayer, 31, 9999 )
giveWeapon ( thePlayer, 41, 9999 )
end
end

addEventHandler("onMarkerHit",marker,praca)

A teraz wyskakuj? errory
ERRORY:


[2016-02-20 14] WARNING: Policjanamarker\server.lua:5: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got boolean]
[2016-02-20 14] WARNING: Policjanamarker\server.lua:5: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean]
[2016-02-20 14] ERROR: Policjanamarker\server.lua:6: attempt to concatenate local 'playerName' (a boolean value)

Ostatnio zmieniony przez #404 2016-02-20, 15:01, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-20, 15:02


#404







Wiek: 27
Na forum: 4912 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%


marker = createMarker (-1615, 686, 7, "cylinder", 2, 0, 0, 155, 255) 
Policja = createTeam ("Policja", 0, 0, 155)

function praca ( he, md )
if not md then return end
local playerName = getAccountName ( getPlayerAccount ( he ) ) 
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then 

giveWeapon ( he, 3, 9999 )
setPlayerTeam ( he, Policja )
giveWeapon ( he, 23, 9999 )
setSkin ( he, 281 )
giveWeapon ( he, 31, 9999 )
giveWeapon ( he, 41, 9999 )
end
end

addEventHandler("onMarkerHit",marker,praca)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-20, 16:26


KRRRECIK123







Wiek: 25
Na forum: 4076 dni
Posty: 51
Nick w MP: Krrrecik



Respekt: 50

Nadal nie robi tego co ma robic
ERRORY:
[2016-02-20 16:28] WARNING: Policjanamarker\server.lua:5: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got boolean]
[2016-02-20 16:28] WARNING: Policjanamarker\server.lua:5: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean]
[2016-02-20 16:28] ERROR: Policjanamarker\server.lua:6: attempt to concatenate local 'playerName' (a boolean value)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-20, 17:06


Patrix100

Amator LUA.






Wiek: 26
Na forum: 4028 dni
Posty: 182
Nick w MP: .:Patrix:.

Piwa: 953

Respekt: 40,5

To:
local playerName = getAccountName ( getPlayerAccount ( he ) ) 


Zamien na to:

local playerName = getAccountName ( getPlayerAccount ( thePlayer ) ) 


i wszystkie "he" zmieniasz na thePlayer

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-20, 17:38


KRRRECIK123







Wiek: 25
Na forum: 4076 dni
Posty: 51
Nick w MP: Krrrecik



Respekt: 50

Ok dzi?ki temat do zamkni?cia, stawiam wam piwo :)
Tak wyglada dzialajacy skrypt, jakby ktos chcial go uzyc

marker = createMarker (-1615, 686, 7, "cylinder", 2, 0, 0, 155, 255) 
Policja = createTeam ("Policja", 0, 0, 155)

function praca ( thePlayer, md )
if not md then return end
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then 

giveWeapon ( thePlayer, 3, 9999 )
setPlayerTeam ( thePlayer, Policja )
giveWeapon ( thePlayer, 23, 9999 )
setPedSkin ( thePlayer, 281 )
giveWeapon ( thePlayer, 31, 9999 )
giveWeapon ( thePlayer, 41, 9999 )
end
end

addEventHandler("onMarkerHit",marker,praca)


[ Komentarz dodany przez: Iggy: 2016-02-20, 18:07 ]
Doda?em tagi [lua]//Iggy.

Ostatnio zmieniony przez Iggy 2016-02-20, 18:07, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Tagi: logowanie :: policji :: przez :: marker
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