Jump to content

[Help]with team/tag


spoty

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...