Turbe$Z Posted March 1, 2017 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? My Fun server: My DD server:
Mr.Loki Posted March 1, 2017 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 [REL]Cinema Experience Beta 2.0 [TUT]Object offsets with OOP. [TUT] Adding a Discord bot to your server. Discord: Loki#7355
itHyperoX Posted March 1, 2017 Posted March 1, 2017 Try to use setAccountData, getAccountData, setElementData, getElementData for admin system. So easier.
Moderators Citizen Posted March 1, 2017 Moderators 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 The rEvolution is coming ...
Mr.Loki Posted March 1, 2017 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 ._. [REL]Cinema Experience Beta 2.0 [TUT]Object offsets with OOP. [TUT] Adding a Discord bot to your server. Discord: Loki#7355
Moderators Citizen Posted March 1, 2017 Moderators 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. The rEvolution is coming ...
Turbe$Z Posted March 1, 2017 Author 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) My Fun server: My DD server:
Mr.Loki Posted March 1, 2017 Posted March 1, 2017 Post your current code. [REL]Cinema Experience Beta 2.0 [TUT]Object offsets with OOP. [TUT] Adding a Discord bot to your server. Discord: Loki#7355
Turbe$Z Posted March 1, 2017 Author 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) My Fun server: My DD server:
Mr.Loki Posted March 1, 2017 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 [REL]Cinema Experience Beta 2.0 [TUT]Object offsets with OOP. [TUT] Adding a Discord bot to your server. Discord: Loki#7355
Turbe$Z Posted March 1, 2017 Author 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 My Fun server: My DD server:
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