Blackvein Posted July 10, 2010 Share Posted July 10, 2010 Hey, I'm trying to make a script so that when a new player registers, they are automatically assigned to a team called ''Survivors''. Everything works fine except for the core part of it , new players aren't automatically assigned to it. Here's my script: *Spawn part* function login() local taccount = getPlayerAccount ( source ) if isZarAccount(taccount) then setPlayerTeam ( source, team) outputChatBox ("You're a survivor.", source) spawnPlayer (source, 246.61526489258, 1860.2613525391, 14.084012985229, 90, 70, team ) fadeCamera (source, true) setCameraTarget (source, true) else end *isZarAccount part* function isZarAccount(account) local nick = "" local group = aclGetGroup("Everyone") if (account and group) then nick = string.lower(getAccountName(account) or "") for _, object in ipairs(aclGroupListObjects(group) or {}) do if (gettok(object, 1, string.byte('.')) == "user") then if (nick == string.lower(gettok(object, 2, string.byte('.')))) then return true --------------------------------------------------------------------------------- I think the problem is that it doesn't automatically assign new players to the Everyone acl group. Can anyone help? Link to comment
Castillo Posted July 10, 2010 Share Posted July 10, 2010 You actually copied my script from another thread and dint even know how to make it? Link to comment
Lordy Posted July 10, 2010 Share Posted July 10, 2010 Doesn't matter if he copied, you posted it into help sector But Blackvein, please DO read the whole thread https://forum.multitheftauto.com/viewtop ... 91&t=28300 . There is a working autoteam script there (from where you copied only a few lines) Link to comment
Castillo Posted July 10, 2010 Share Posted July 10, 2010 Doesn't matter if he copied, you posted it into help sector But Blackvein, please DO read the whole thread https://forum.multitheftauto.com/viewtop ... 91&t=28300 . There is a working autoteam script there (from where you copied only a few lines) Thats exactly what i mean, i dont care that he copied cause this is about help others. Link to comment
Blackvein Posted July 10, 2010 Author Share Posted July 10, 2010 Yes I have tried using that script, but I can't seem to get it to automatically assign new players to a team. I set the aclgetgroup to Everyone, but it doesnt change newly registered players to the designated team. 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