Turbe$Z Posted March 1, 2017 Share Posted March 1, 2017 --server-- function kivesz() local accountName = getPlayerAccount(source) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" )) then aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountName) end end addCommandHandler("rangki", kivesz) function betesz() local accountName = getPlayerAccount(source) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" )) then aclGroupAddObject (aclGetGroup("Admin1"), "user."..accountName) end end addCommandHandler("rangbe", betesz) and i got this errors and warnings: http://imgur.com/a/tI7mJ how to fix this? Link to comment
Mr.Loki Posted March 1, 2017 Share Posted March 1, 2017 addCommandHandler (server) has 2 main parameters player playerSource, string commandName, [string arg1, string arg2, ...] so it should be: function kivesz (player, command) then you can use player for your functions instead of source or can just change player to source in the function parameters. 1 Link to comment
itHyperoX Posted March 1, 2017 Share Posted March 1, 2017 Try to use setAccountData, getAccountData, setElementData, getElementData for admin system. So easier. Link to comment
Moderators Citizen Posted March 1, 2017 Moderators Share Posted March 1, 2017 (edited) 11 minutes ago, Mr.Loki said: so it should be: function kivesz (player, command) close but it should be :function kivesz (source, command) EDIT: and as we don't use 'command' neither additional parameters we can shorten it to:function kivesz (source) Edited March 1, 2017 by Citizen Link to comment
Mr.Loki Posted March 1, 2017 Share Posted March 1, 2017 1 minute ago, Citizen said: close but it should be :function kivesz (source, command) that's what i explained in the rest of my post ._. Link to comment
Moderators Citizen Posted March 1, 2017 Moderators Share Posted March 1, 2017 Just now, Mr.Loki said: that's what i explained in the rest of my post ._. Alright, read it too fast, sorry for that. Link to comment
Turbe$Z Posted March 1, 2017 Author Share Posted March 1, 2017 11 minutes ago, Mr.Loki said: 11 minutes ago, Mr.Loki said: addCommandHandler (server) has 2 main parameters player playerSource, string commandName, [string arg1, string arg2, ...] so it should be: function kivesz (player, command) then you can use player for your functions instead of source or can just change player to source in the function parameters. addCommandHandler (server) has 2 main parameters player playerSource, string commandName, [string arg1, string arg2, ...] so it should be: function kivesz (player, command) then you can use player for your functions instead of source or can just change player to source in the function parameters. attempt to concatenate local 'accountName' (a userdata value) Link to comment
Turbe$Z Posted March 1, 2017 Author Share Posted March 1, 2017 15 minutes ago, Mr.Loki said: 15 minutes ago, Mr.Loki said: 1 minute ago, Mr.Loki said: Post your current code. addCommandHandler (server) has 2 main parameters player playerSource, string commandName, [string arg1, string arg2, ...] so it should be: function kivesz (player, command) then you can use player for your functions instead of source or can just change player to source in the function parameters. addCommandHandler (server) has 2 main parameters player playerSource, string commandName, [string arg1, string arg2, ...] so it should be: function kivesz (player, command) then you can use player for your functions instead of source or can just change player to source in the function parameters function kivesz(player, command) local accountName = getPlayerAccount(player) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin" )) then aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountName) end end addCommandHandler("rangki", kivesz) function betesz(player, command) local accountName = getPlayerAccount(player) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin1" )) then aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) end end addCommandHandler("rangbe", betesz) Link to comment
Mr.Loki Posted March 1, 2017 Share Posted March 1, 2017 function kivesz(player, command) local accountName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" )) then aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountName) end end addCommandHandler("rangki", kivesz) function betesz(player, command) local accountName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin1" )) then aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) end end addCommandHandler("rangbe", betesz) 1 Link to comment
Turbe$Z Posted March 1, 2017 Author Share Posted March 1, 2017 22 minutes ago, Mr.Loki said: 22 minutes ago, Mr.Loki said: 1 minute ago, Mr.Loki said: function kivesz(player, command) local accountName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" )) then aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountName) end end addCommandHandler("rangki", kivesz) function betesz(player, command) local accountName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin1" )) then aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) end end addCommandHandler("rangbe", betesz) addCommandHandler (server) has 2 main parameters player playerSource, string commandName, [string arg1, string arg2, ...] so it should be: function kivesz (player, command) then you can use player for your functions instead of source or can just change player to source in the function parameters. addCommandHandler (server) has 2 main parameters player playerSource, string commandName, [string arg1, string arg2, ...] so it should be: function kivesz (player, command) then you can use player for your functions instead of source or can just change player to source in the function parameters. Thanks Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now