ahmedfef Posted March 31, 2012 Share Posted March 31, 2012 Hi, i'm new in Scripting So Today i Do Code for add But i had Error in aclGroupRemoveObject aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) What's The Error? please Help me!! Link to comment
sckatchof Posted March 31, 2012 Share Posted March 31, 2012 try this : local accountname = getAccountName (getPlayerAccount (thePlayer)) aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) Link to comment
drk Posted March 31, 2012 Share Posted March 31, 2012 sckatchof, your code is wrong. thePlayer is nil. Link to comment
sckatchof Posted March 31, 2012 Share Posted March 31, 2012 sckatchof, your code is wrong. thePlayer is nil. i know cause he don't post full code idk what he use , that's why Link to comment
ahmedfef Posted March 31, 2012 Author Share Posted March 31, 2012 try this : local accountname = getAccountName (getPlayerAccount (thePlayer)) aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) local accountname = getAccountName (getPlayerAccount (thePlayer)) local is Error aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) I will Try This Link to comment
drk Posted March 31, 2012 Share Posted March 31, 2012 ahmedfef, post the fucking code so we can help. Link to comment
sckatchof Posted March 31, 2012 Share Posted March 31, 2012 ahmedfef post your code us Draken say ! Link to comment
ahmedfef Posted March 31, 2012 Author Share Posted March 31, 2012 i can't put my Code but i Can put This Only aclGroupAddObject (aclGetGroup("Admin"), "user."..accountname) outputChatBox ( "#ffff00[" ..name .. "]:#C0C0C0 Has Bought #00ff00{ Add }", getRootElement(), 255, 0, 0, true ) aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) so it's give player admin and remove admin after add Link to comment
drk Posted March 31, 2012 Share Posted March 31, 2012 You think we will get your code? Haha Post the code or we can't help. What is accountname? Link to comment
sckatchof Posted March 31, 2012 Share Posted March 31, 2012 i can't put my Code but i Can put This Only aclGroupAddObject (aclGetGroup("Admin"), "user."..accountname) outputChatBox ( "#ffff00[" ..name .. "]:#C0C0C0 Has Bought #00ff00{ Add }", getRootElement(), 255, 0, 0, true ) aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname) so it's give player admin and remove admin after add we cant help u with that code Link to comment
GanJaRuleZ Posted March 31, 2012 Share Posted March 31, 2012 local time = 3000 -- Here put the time in miliseconds , in wich the admin will be removed : P local timesToExecute = 1 local account = getPlayerAccount(source) local accountName = getAccountName(account) aclGroupAddObject (aclGetGroup("Admin"), "user."..accountname) outputChatBox ( "#ffff00[" ..name .. "]:#C0C0C0 Has Bought #00ff00{ Add }", getRootElement(), 255, 0, 0, true ) setTimer( function () aclGroupRemoveObject(group,"user."..accountName) end , time , timesToExecute ) Just do like this Link to comment
drk Posted March 31, 2012 Share Posted March 31, 2012 And what is source GanJaRuleZ? We need the code. Link to comment
ahmedfef Posted March 31, 2012 Author Share Posted March 31, 2012 local time = 3000 -- Here put the time in miliseconds , in wich the admin will be removed : P local timesToExecute = 1 local account = getPlayerAccount(source) local accountName = getAccountName(account) aclGroupAddObject (aclGetGroup("Admin"), "user."..accountname) outputChatBox ( "#ffff00[" ..name .. "]:#C0C0C0 Has Bought #00ff00{ Add }", getRootElement(), 255, 0, 0, true ) setTimer( function () aclGroupRemoveObject(group,"user."..accountName) end , time , timesToExecute ) Just do like this Ok I will try this if do'nt work i do new Event To remove Object Link to comment
ahmedfef Posted March 31, 2012 Author Share Posted March 31, 2012 And what is source GanJaRuleZ?We need the code. hahahahahaha you say my to put code for you hahahahahahaha Link to comment
drk Posted March 31, 2012 Share Posted March 31, 2012 What? You think I will get your fucking code? Better you start learning. I don't need your code, I'm trying to help you. Link to comment
ahmedfef Posted March 31, 2012 Author Share Posted March 31, 2012 I have known error Thank you Link to comment
sckatchof Posted March 31, 2012 Share Posted March 31, 2012 ahmedfef , If you don't post your code nobody can help you . Link to comment
ahmedfef Posted March 31, 2012 Author Share Posted March 31, 2012 ahmedfef , If you don't post your code nobody can help you . i Analyzed the problem Thank you Link to comment
Khtsjefen Posted March 31, 2012 Share Posted March 31, 2012 As I posted in an example at the wiki just a moment ago: function deladm (playerSource, commandName, accountName) if accountName then --Make the script able to detect if a user is given. aclGroupRemoveObject (aclGetGroup("Admin"), "user."..accountName) --Removing the admin. outputChatBox ("ACL: Account '"..accountName.."' succesfully removed as admin.", playerSource) -- Giving you a messsage. outputChatBox ("ACL: Someone have removed you as admin.", accountName) -- giving the poor removed guy a message. else --Make the Syntax display. outputChatBox ("ACL: No account name specified.", playerSource) outputChatBox ("ACL: Syntax: /deladmin [accountName]", playerSource) end end addCommandHandler ("deladmin", deladm) I am using it, though at a ACL group with another name. Server side. Link to comment
sckatchof Posted March 31, 2012 Share Posted March 31, 2012 ahmedfef , If you don't post your code nobody can help you . i Analyzed the problem Thank you you're welcome 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