Jump to content

Problem with player auto join team.


djm105

Recommended Posts

Hi, I want do a command /jointeam teamName, or players in rangs in ACL auto join to their teams example Admin join to team '~|EG|~Admin'

I did it:

function setPlayerTeam (thePlayer, commandName, teamName) 
end 
  
addCommandHandler ("jointeam", teamName) 

Yes, yes I know. This script is bad :D, but I'm newbie in Lua.

Can you help me?

(I'm Polish so sorry for my Language)

Link to comment
Hi, I want do a command /jointeam teamName, or players in rangs in ACL auto join to their teams example Admin join to team '~|EG|~Admin'

I did it:

function setPlayerTeam (thePlayer, commandName, teamName) 
endb 
  
addCommandHandler ("jointeam", teamName) 

Yes, yes I know. This script is bad :D, but I'm newbie in Lua.

Can you help me?

(I'm Polish so sorry for my Language)

you read the wiki https://wiki.multitheftauto.com/wiki/SetPlayerTeam

setPlayerTeam

Link to comment
I read it and I can't do this ;(
function assignNewTeam ( source ) 
  theTest = createTeam ( "~|EG|~Admin", 200, 0, 100 ) 
  if theTest then                           
    setPlayerTeam ( source,  theTest )     
  end 
end 
addCommandHandler ( "jointeam", assignNewTeam ) 

Link to comment
function assignNewTeam ( source ) 
  theTest = createTeam ( "~|EG|~Admin", 200, 0, 100 ) 
  if theTest then                           
    setPlayerTeam ( source,  theTest )     
  end 
end 
addCommandHandler ( "jointeam", assignNewTeam ) 

Your code well add him to the ~|EG|~Admin team !

What he wants is :

Hi, I want do a command /jointeam teamName...
Link to comment
function assignNewTeam ( source ) 
  theTest = createTeam ( "~|EG|~Admin", 200, 0, 100 ) 
  if theTest then                           
    setPlayerTeam ( source,  theTest )     
  end 
end 
addCommandHandler ( "jointeam", assignNewTeam ) 

Your code well add him to the ~|EG|~Admin team !

What he wants is :

Hi, I want do a command /jointeam teamName...

I do not understand

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