Jump to content

Script set team and skin


Jullul7000

Recommended Posts

you can do it using :

setElementModel 
createTeam 
setPlayerTeam 
addCommandHandler 

And i think what you are going to do should to be like that? :

Server Side --

local Unemployed = createTeam ( Unemployed ) 
  
function SetSkinAndTeam(player) 
       setElementModel ( player, 239 ) 
   setPlayerTeam ( player, Unemployed ) 
end 
addCommandHandler ( "resign", SetSkinAndTeam ) 
  
  

https://forum.multitheftauto.com/viewtopic.php?f=91&t=53366

Link to comment
I tried to make it:

But it doenst work.... :oops:

addCommandHandler( "resign",  
    setPlayerTeam ( source, Unemployed ) 
            setElementModel ( Skin theElement, 239 model ) 
            end ) 

Try This Server Side! :

local Unemployed = createTeam ( Unemployed ) 
  
function SetSkinAndTeam(player) 
       setElementModel ( player, 239 ) 
   setPlayerTeam ( player, Unemployed ) 
end 
addCommandHandler ( "resign", SetSkinAndTeam ) 
  
  

And It seems you forgot to create a team?

Not Tested But Should To Work **

Link to comment
local Unemployed = createTeam ( "Unemployed", 255, 255, 255 ) 
  
function SetSkinAndTeam ( player ) 
    setElementModel ( player, 239 ) 
    setPlayerTeam ( player, Unemployed ) 
end 
addCommandHandler ( "resign", SetSkinAndTeam ) 

I have a question!What's wrong with the create of the team have?I have learned this from the wiki!Supposed to work I try to change the way the create of the team was working properly!Damn! my fault I'm sorry ,Thank you anyway!

try :

Unemployed = createTeam ( "Unemployed", 0, 255, 0 ) 
  
function SetSkinAndTeam(player) 
       setElementModel ( player, 239 ) 
   setPlayerTeam ( player, Unemployed ) 
end 
addCommandHandler ( "resign", SetSkinAndTeam ) 
  
  

Link to comment
local Unemployed = createTeam ( "Unemployed", 255, 255, 255 ) 
  
function SetSkinAndTeam ( player ) 
    setElementModel ( player, 239 ) 
    setPlayerTeam ( player, Unemployed ) 
end 
addCommandHandler ( "resign", SetSkinAndTeam ) 

Again skin. No team..

Works perfect here.

Link to comment
local Unemployed = createTeam ( "Unemployed", 255, 255, 255 ) 
  
function SetSkinAndTeam ( player ) 
    setElementModel ( player, 239 ) 
    setPlayerTeam ( player, Unemployed ) 
end 
addCommandHandler ( "resign", SetSkinAndTeam ) 

Again skin. No team..

Works perfect here.

I try it now and it works correctly ^ ^ i think he is use it @ client side maybe | show you,r meta.xml and Castillo please answer my question up ^

Link to comment
At createTeam you put Unemployed, which is not a string, you should've put "Unemployed", also, you had forgot to define the color arguments.

also, you had forgot to define the color arguments.

Hmm.. So, Who put this example?Does this mean that wrong example?

function gimmeATeam ( source, commandName, teamName ) 
  local newTeam = createTeam ( teamName ) -- create a new team with the specified name 
  if newTeam then -- if it was successfully created 
    setPlayerTeam ( source, newTeam ) -- add the player to the new team 
  end 
end 
addCommandHandler("giveteam", gimmeATeam) 

Link to comment
also, you had forgot to define the color arguments.

Hmm.. So, Who put this example?Does this mean that wrong example?

function gimmeATeam ( source, commandName, teamName ) 
  local newTeam = createTeam ( teamName ) -- create a new team with the specified name 
  if newTeam then -- if it was successfully created 
    setPlayerTeam ( source, newTeam ) -- add the player to the new team 
  end 
end 
addCommandHandler("giveteam", gimmeATeam) 

Not important to add Colors,

And at The Wiki Example, You can do this :

/giveteam PrestigeTeam

Link to comment
also, you had forgot to define the color arguments.

Hmm.. So, Who put this example?Does this mean that wrong example?

function gimmeATeam ( source, commandName, teamName ) 
  local newTeam = createTeam ( teamName ) -- create a new team with the specified name 
  if newTeam then -- if it was successfully created 
    setPlayerTeam ( source, newTeam ) -- add the player to the new team 
  end 
end 
addCommandHandler("giveteam", gimmeATeam) 

Not important to add Colors,

And at The Wiki Example, You can do this :

/giveteam PrestigeTeam

Thanks.

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