Wysłany: 2016-02-20, 12:28
KRRRECIK123
Wiek: 25 Na forum: 3935 dni Posty: 51
Nick w MP: Krrrecik
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
Wysłany: 2016-02-20, 12:36
AteX
Wiek: 26 Na forum: 4015 dni Posty: 927
Nick w MP: #AteX
Piwa : 8360
Po pierwsze z?y dzia?, a po drugie u?ywaj znacznik?w lua.
addCommandHandler zmie? na
addEventHandler ( "onMarkerHit" , marker , praca )
Wysłany: 2016-02-20, 15:00
KRRRECIK123
Wiek: 25 Na forum: 3935 dni Posty: 51
Nick w MP: Krrrecik
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
Wysłany: 2016-02-20, 15:02
#404
Wiek: 26 Na forum: 4772 dni Posty: 1438
Piwa : 2512
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 )
Wysłany: 2016-02-20, 16:26
KRRRECIK123
Wiek: 25 Na forum: 3935 dni Posty: 51
Nick w MP: Krrrecik
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)
Wysłany: 2016-02-20, 17:06
Patrix100
Amator LUA.
Wiek: 26 Na forum: 3887 dni Posty: 182
Nick w MP: .:Patrix:.
Piwa : 952
To:
local playerName = getAccountName ( getPlayerAccount ( he ) )
Zamien na to:
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
i wszystkie "he" zmieniasz na thePlayer
Wysłany: 2016-02-20, 17:38
KRRRECIK123
Wiek: 25 Na forum: 3935 dni Posty: 51
Nick w MP: Krrrecik
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
Tagi: logowanie :: policji :: przez :: marker
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: