spoty Posted February 9, 2014 Share Posted February 9, 2014 hi i need some help with my script only i realy dont know what i doing wrong mayby you guys can help me out? hereis the lua script function createAdminTeamOnStart () AdminTeam = createTeam ( "|J-Drift| Owner", 255, 0, 15 ) end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source, AdminTeam) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) addEventHandler ( "onPlayerChat", root, function ( msg, type ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) and type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#000000|#00FF00J#000000-#00FF00Drift#000000|#00FFFFOwner " .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) end ) Link to comment
Castillo Posted February 9, 2014 Share Posted February 9, 2014 And what is the problem? Link to comment
spoty Posted February 9, 2014 Author Share Posted February 9, 2014 well this is the problem sorry dind posted ERROR: Loading script failed: [J-Drift]Teams\JDO.lua:21: unexpected symbol near ')' so i tried to delete the ) at line 21 and now i goth this SCRIPT ERROR: [J-Drift]Teams\JDO.lua:20: 'end' expected (to close 'function' at line 15) near '' ERROR: Loading script failed: [J-Drift]Teams\JDO.lua:20: 'end' expected (to close 'function' at line 15) near '' Link to comment
Karuzo Posted February 9, 2014 Share Posted February 9, 2014 You've forgotten to close the if with an end. So there should be 2 ends. Link to comment
spoty Posted February 9, 2014 Author Share Posted February 9, 2014 yes you are right just did id and now it works and now i looked at forum and see it to 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