Wysłany: 2016-10-23, 12:17
czak
Wiek: 29 Na forum: 3512 dni Posty: 7
Nick w MP: czak
Witam od wczoraj mam problem z tym kodem i acl
cywile = createTeam ( "Cywile" , 255 , 255 , 255 )
admi = createTeam ( "Administracja" , 255 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 255 )
ta = createTeam ( "Taxi" , 255 , 255 , 0 )
function logintax ( thePlayer )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "taxi" )) then
setPlayerTeam ( player , ta )
giveWeapon ( player , 12 , 1000 )
setPedSkin ( player , 281 )
spawnPlayer ( player , - 2660.984453125 , 609.30276123047 , 14.4575 )
setPlayerNametagColor ( player , 255 , 255 , 0 )
end
addCommandHandler ( "taxi" , logintax )
function wyloguj ( player )
setPlayerTeam ( player , cywile )
setPlayerNametagColor ( player , 255 , 255 , 255 )
end
addCommandHandler ( "wylogujtaxi" , wyloguj )
Chodzi o to ?e gdy mam linie z if isObjectInACLGroup nie dzia?a to ?e mog? uzywa? tej komendy osoby tylko zapisane w acl (KOD w ACL)
Kod: <group name="taxi">
<acl name="Default"></acl>
<object name="user.czak"></object>
</group>
To wy?wietla si? w konsoli MTA przy w??czaniu skryptu
Kod: SCRIPT ERROR: pogo\teampogo.lua:25: 'end' expected (to close 'function' at line 8) near '<eof>'
[11:57] ERROR: Loading script failed: pogo\teampogo.lua:25: 'end' expected (to close 'function' at line 8) near '<eof>'
Gdy kod wygl?da tak:
cywile = createTeam ( "Cywile" , 255 , 255 , 255 )
admi = createTeam ( "Administracja" , 255 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 255 )
ta = createTeam ( "Taxi" , 255 , 255 , 0 )
function logintax ( thePlayer )
setPlayerTeam ( player , ta )
giveWeapon ( player , 12 , 1000 )
setPedSkin ( player , 281 )
spawnPlayer ( player , - 2660.984453125 , 609.30276123047 , 14.4575 )
setPlayerNametagColor ( player , 255 , 255 , 0 )
end
addCommandHandler ( "taxi" , logintax )
function wyloguj ( player )
setPlayerTeam ( player , cywile )
setPlayerNametagColor ( player , 255 , 255 , 255 )
end
addCommandHandler ( "wylogujtaxi" , wyloguj )
Wszystko ?adnie dzia?a
TUTAJ SS:
http://scr.hu/0wus4/y514w to si? wyswietla z linijka if Object
http://scr.hu/0wus4/tqd1u bez linijki if Object
http://scr.hu/0wus4/s7tru SS z ACL
Licze na pomoc
Wysłany: 2016-10-23, 13:14
PapaSmerf
Wiek: 25 Na forum: 3525 dni Posty: 237
Piwa : 3857
nie ma endu zamykaj?cego funkcje
Wysłany: 2016-10-23, 13:17
czak
Wiek: 29 Na forum: 3512 dni Posty: 7
Nick w MP: czak
gdzie dok?adnie ma by??
[ Dodano : 2016-10-23, 13:21 ]
CEO , ?
Wysłany: 2016-10-23, 14:00
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
czak , Dlaczego nie przeczytasz b??du ? Pisze tam jak byk ?e brakuje enda zamykaj?cego funkcj? w 8 linijce.
cywile = createTeam ( "Cywile" , 255 , 255 , 255 )
admi = createTeam ( "Administracja" , 255 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 255 )
ta = createTeam ( "Taxi" , 255 , 255 , 0 )
function logintax ( thePlayer )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "taxi" )) then
setPlayerTeam ( player , ta )
giveWeapon ( player , 12 , 1000 )
setPedSkin ( player , 281 )
spawnPlayer ( player , - 2660.984453125 , 609.30276123047 , 14.4575 )
setPlayerNametagColor ( player , 255 , 255 , 0 )
end
end
addCommandHandler ( "taxi" , logintax )
function wyloguj ( player )
setPlayerTeam ( player , cywile )
setPlayerNametagColor ( player , 255 , 255 , 255 )
end
addCommandHandler ( "wylogujtaxi" , wyloguj )
Podpis
"amited" napisał/a :
Wysłany: 2016-10-23, 14:17
czak
Wiek: 29 Na forum: 3512 dni Posty: 7
Nick w MP: czak
amited , Gdy mam tak
createBlip (- 787.59997558594 , 1555.6999511719 , 38.799999237061 , 6 )
cywile = createTeam ( "Cywile" , 255 , 255 , 255 )
admi = createTeam ( "Administracja" , 255 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 255 )
ta = createTeam ( "Taxi" , 255 , 255 , 0 )
function logintax ( player )
setPlayerTeam ( player , ta )
giveWeapon ( player , 12 , 1000 )
setPedSkin ( player , 255 )
spawnPlayer ( player , - 2660.984453125 , 609.30276123047 , 14.4575 )
setPlayerNametagColor ( player , 255 , 255 , 0 )
end
end
addCommandHandler ( "taxi" , logintax )
function wyloguj ( player )
setPlayerTeam ( player , cywile )
setPlayerNametagColor ( player , 255 , 255 , 255 )
end
end
addCommandHandler ( "wylogujtaxi" , wyloguj )
Wyskakuje to
Kod: [14:16] SCRIPT ERROR: pogo\teampogo.lua:16: '<eof>' expected near 'end'
[14:16] ERROR: Loading script failed: pogo\teampogo.lua:16: '<eof>' expected near 'end'
Wysłany: 2016-10-23, 14:23
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
czak ,
createBlip (- 787.59997558594 , 1555.6999511719 , 38.799999237061 , 6 )
cywile = createTeam ( "Cywile" , 255 , 255 , 255 )
admi = createTeam ( "Administracja" , 255 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 255 )
ta = createTeam ( "Taxi" , 255 , 255 , 0 )
function logintax ( player )
setPlayerTeam ( player , ta )
giveWeapon ( player , 12 , 1000 )
setPedSkin ( player , 255 )
spawnPlayer ( player , - 2660.984453125 , 609.30276123047 , 14.4575 )
setPlayerNametagColor ( player , 255 , 255 , 0 )
end
addCommandHandler ( "taxi" , logintax )
function wyloguj ( player )
setPlayerTeam ( player , cywile )
setPlayerNametagColor ( player , 255 , 255 , 255 )
end
addCommandHandler ( "wylogujtaxi" , wyloguj )
Podpis
"amited" napisał/a :
Wysłany: 2016-10-23, 14:25
czak
Wiek: 29 Na forum: 3512 dni Posty: 7
Nick w MP: czak
amited , ale ka?dy gracz b?dzie m?g? si? zalogowac
[ Dodano : 2016-10-23, 14:29 ]
Dobra teraz mam tak createBlip (- 787.59997558594 , 1555.6999511719 , 38.799999237061 , 6 )
cywile = createTeam ( "Cywile" , 255 , 255 , 255 )
admi = createTeam ( "Administracja" , 255 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 255 )
ta = createTeam ( "Taxi" , 255 , 255 , 0 )
function logintax ( player )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "taxi" )) then
setPlayerTeam ( player , ta )
giveWeapon ( player , 12 , 1000 )
setPedSkin ( player , 255 )
spawnPlayer ( player , - 2660.984453125 , 609.30276123047 , 14.4575 )
setPlayerNametagColor ( player , 255 , 255 , 0 )
else
outputChatBox ( "Nie pracujesz w taxi" )
end
end
addCommandHandler ( "taxi" , logintax )
function wyloguj ( player )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "taxi" )) then
setPlayerTeam ( player , cywile )
setPlayerNametagColor ( player , 255 , 255 , 255 )
end
end
addCommandHandler ( "wylogujtaxi" , wyloguj )
Nie wywala b??du ale komendy nie dzia?aj?
[ Dodano : 2016-10-23, 14:40 ]
Dobra ju? wszystko ogarn??em PRAWID?OWY KOD
createBlip (- 787.59997558594 , 1555.6999511719 , 38.799999237061 , 6 )
cywile = createTeam ( "Cywile" , 255 , 255 , 255 )
admi = createTeam ( "Administracja" , 255 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 255 )
ta = createTeam ( "Taxi" , 255 , 255 , 0 )
function logintax ( player )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "taxi" )) then
setPlayerTeam ( player , ta )
giveWeapon ( player , 12 , 1000 )
setPedSkin ( player , 255 )
spawnPlayer ( player , - 2660.984453125 , 609.30276123047 , 14.4575 )
setPlayerNametagColor ( player , 255 , 255 , 0 )
else
outputChatBox ( "Nie pracujesz w taxi" )
end
end
addCommandHandler ( "taxi" , logintax )
function wyloguj ( player )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "taxi" )) then
setPlayerTeam ( player , cywile )
setPlayerNametagColor ( player , 255 , 255 , 255 )
outputChatBox ( "Wylogowano z Taxi!" )
end
end
addCommandHandler ( "wylogujtaxi" , wyloguj )
Wysłany: 2016-10-23, 14:43
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
czak , To dzia?a czy nie bo nie zrozumia?em... Tamten nie dzia?a a ten?
Podpis
"amited" napisał/a :
Tagi: kłopot :: kodem :: lua :: frakcje :: acl
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: