PaiN^ Posted March 1, 2013 Posted March 1, 2013 addEvent("del", true) addEventHandler("del", root, function(duser) if string.len(duser) > 0 then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then local check = getAccountName(duser) if check then removeAccount(duser) outputChatBox("The Account [ "..duser.." ] was removed by [ "..getPlayerName(source).." ]", root, 255, 0, 0, true) else outputChatBox("Username was not found ..!", source, 255, 0, 0, true) end else outputChatBox("You are not Admin ..!", source, 255, 0, 0, true) end else outputChatBox("Username was not found ..!", source, 255, 0, 0, true) end end ) debugscript : ERROR: Add-DelAcc\Add-Del_S.lua:25: attempt to concatenate a boolean value ** Line 5 in the above code is the line 25 .. " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
csiguusz Posted March 1, 2013 Posted March 1, 2013 (edited) Maybe source is not a valid player element? Edited March 1, 2013 by Guest Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
TAPL Posted March 1, 2013 Posted March 1, 2013 addEvent("del", true) addEventHandler("del", root, function(duser) if string.len(duser) > 0 then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then local account = getAccount(duser) if account then removeAccount(account) outputChatBox("The Account [ "..duser.." ] was removed by [ "..getPlayerName(source).." ]", root, 255, 0, 0, true) else outputChatBox("Username was not found ..!", source, 255, 0, 0, true) end else outputChatBox("You are not Admin ..!", source, 255, 0, 0, true) end else outputChatBox("Username was not found ..!", source, 255, 0, 0, true) end end )
PaiN^ Posted March 1, 2013 Author Posted March 1, 2013 Mabye source is not a valid player element? I didn't understand you ? " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
PaiN^ Posted March 1, 2013 Author Posted March 1, 2013 TAPL's code didn't work debugscript : WARNING: Add-DelAcc\Add-Del_S.lua:24: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean} ERROR: Add-DelAcc\Add-Del_S.lua:24 attempt to concatenate a boolean value **( Sorry for late post, Had to do something .. ) " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Castillo Posted March 1, 2013 Posted March 1, 2013 if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then On that line? if so, post how you trigger your event. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
PaiN^ Posted March 1, 2013 Author Posted March 1, 2013 GUIEditor_Button[4] = guiCreateButton(286,110,109,46,"Del",false,GUIEditor_Window[3]) --------- addEventHandler("onClientGUIClick", root, function (auser, pass, duser) if (source == GUIEditor_Button[4]) then local duser = guiGetText(GUIEditor_Edit[3]) guiSetText(GUIEditor_Edit[3], "") triggerServerEvent("del", root, duser) guiSetVisible (GUIEditor_Window[3], false) showCursor(false) guiSetInputEnabled(false) end end ) " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
csiguusz Posted March 1, 2013 Posted March 1, 2013 triggerServerEvent("del", root, duser) Use localPlayer instead of root: triggerServerEvent("del", localPlayer, duser) Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
PaiN^ Posted March 1, 2013 Author Posted March 1, 2013 It worked !! Thank you very much for helping me .. " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
csiguusz Posted March 1, 2013 Posted March 1, 2013 You are welcome. Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
Castillo Posted March 1, 2013 Posted March 1, 2013 Could have never worked with the error he had on the client side. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted March 1, 2013 Posted March 1, 2013 Could have never worked with the error he had on the client side. Yes i know that but also if he didn't use "TAPL" "Code" won't remove the account (= .
PaiN^ Posted March 1, 2013 Author Posted March 1, 2013 Could have never worked with the error he had on the client side. Yes i know that but also if he didn't use "TAPL" "Code" won't remove the account (= . I know that, And i appreciate his help .. " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
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