Jump to content

New player auto-team script??


Recommended Posts

Posted

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 :roll: , 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?

Posted

You actually copied my script from another thread and dint even know how to make it?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

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...