ahmedfef Posted March 31, 2012 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!!
sckatchof Posted March 31, 2012 Posted March 31, 2012 try this : local accountname = getAccountName (getPlayerAccount (thePlayer)) aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountname)
sckatchof Posted March 31, 2012 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
ahmedfef Posted March 31, 2012 Author 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
ahmedfef Posted March 31, 2012 Author 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
drk Posted March 31, 2012 Posted March 31, 2012 You think we will get your code? Haha Post the code or we can't help. What is accountname?
sckatchof Posted March 31, 2012 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
GanJaRuleZ Posted March 31, 2012 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
ahmedfef Posted March 31, 2012 Author 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
ahmedfef Posted March 31, 2012 Author Posted March 31, 2012 And what is source GanJaRuleZ?We need the code. hahahahahaha you say my to put code for you hahahahahahaha
drk Posted March 31, 2012 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.
sckatchof Posted March 31, 2012 Posted March 31, 2012 ahmedfef , If you don't post your code nobody can help you .
ahmedfef Posted March 31, 2012 Author Posted March 31, 2012 ahmedfef , If you don't post your code nobody can help you . i Analyzed the problem Thank you
Khtsjefen Posted March 31, 2012 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.
sckatchof Posted March 31, 2012 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
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