Jump to content

[HELP] I want to create team but what wrong with it??


KainDepZai

Recommended Posts

function createTeam ( source, commandName, teamName, thePlayer ) 
  local money = getPlayerMoney (thePlayer) 
  local newTeam = createTeam ( teamName )  
  if money >= 888888 and newTeam then 
    takePlayerMoney (thePlayer, 888888) 
    setPlayerTeam ( source, newTeam )  
else 
outputChatBox("Bạn không đủ tiền để tạo nhóm",thePlayer,255,0,0) 
  end 
end 
addCommandHandler("createteam", createTeam)  

Link to comment
function createTeam1 ( source, commandName, teamName, thePlayer ) 
  local money = getPlayerMoney (thePlayer) 
  local newTeam = createTeam ( teamName ) 
  if money >= 888888 and newTeam then 
    takePlayerMoney (thePlayer, 888888) 
    setPlayerTeam ( source, newTeam ) 
else 
outputChatBox("Bạn không đủ tiền để tạo nhóm",thePlayer,255,0,0) 
  end 
end 
addCommandHandler("createteam", createTeam1) 

Link to comment
function createTeam1 ( thePlayer, commandName, teamName  ) 
  local money = getPlayerMoney (thePlayer) 
  local newTeam = createTeam ( teamName ) 
  if money >= 888888 and newTeam then 
    takePlayerMoney (thePlayer, 888888) 
    setPlayerTeam ( thePlayer, newTeam ) 
else 
outputChatBox("Bạn không đủ tiền để tạo nhóm",thePlayer,255,0,0) 
  end 
end 
addCommandHandler("createteam", createTeam1) 

Link to comment
function createTeaml(thePlayer, commandName, teamName) 
      local money = getPlayerMoney(thePlayer) 
      local newTeam = createTeam(teamName) 
      if money >= 888888 and newTeam then 
          takePlayerMoney(source, 888888) 
          setPlayerTeam(source, newTeam) 
      else 
          outputChatBox("Bạn không đủ tiền để tạo nhóm", thePlayer, 255, 0, 0) 
     end 
end 
addCommandHandler("createteam", createTeaml) 

Edited by Guest
Link to comment
function createTeaml(thePlayer, commandName, teamName) 
      local money = getPlayerMoney(thePlayer) 
      local newTeam = createTeam(teamName) 
      if money >= 888888 and newTeam then 
          takePlayerMoney(source, 888888) 
          setPlayerTeam(source, newTeam) 
      else 
          outputChatBox("Bạn không đủ tiền để tạo nhóm", thePlayer, 255, 0, 0) 
     end 
end 
addComandHandler("createteam", createTeaml) 

It's "addCommandHandler" not "addComandHandler".

Link to comment

here we go

addCommandHandler('ct', 
function ( player , cmd , team , r,g,b) 
    if getPlayerMoney ( player ) >= 10000 then 
         takePlayerMoney ( player , 10000 )  
         theteam = createTeam ( team , r,g,b or 255,255,255 ) 
         setPlayerTeam ( player , theteam ) 
         outputChatBox ( 'Successfully create the team ! '..team..' congrats',player ,0,255,0) 
            else 
         outputChatBox ( 'You dont have enough money',player,255,0,0) 
    end 
end ) 

how to use it

./ct teamname colour r g b or 255,255,255 ( white colour )

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