Jump to content

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


Recommended Posts

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

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

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

Posted (edited)
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

 

 

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

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

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 )

آن يكون فكر المرء مختلآ , خيرآ من آن يكون فكره محتلآ !

my nick name in the game : =x=|DoN|=x= or 7eJAzZy- ( ͡° ͜ʖ ͡°)

http://community.multitheftauto.com/ind ... &id=337164 my profile

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