Jump to content

[Help] Spawning skin


A3kri

Recommended Posts

Hello,

I need help in my team spawn

there is 3 teams and i fixed the coordinates

but I'm trying to fix their skin , as I want each team to have a specified skin

this is my code

local teamsTable = {
[ "Police" ] = { 1577 , -1694 , 6 } ,
[ "Destructive" ] = { 2498 , -1684 , 13 } ,
[ "Rebel" ] = { 1474 , -2247 , 13 } ,
}
 
addEvent ( "onPlayerChooseTeam" , true )
addEventHandler ( "onPlayerChooseTeam" , root ,
function ( teamName )
local team = getTeamFromName ( teamName )
setPlayerTeam ( source , team )
local spawnX , spawnY , spawnZ = unpack ( teamsTable [ teamName ] )
spawnPlayer ( source , spawnX , spawnY , spawnZ )
end )

I've added skin to the coordinates but it doesn't work

[ "Police" ] = { 1474 , -2247 , 13 , 280 } ,

Help please ..

Link to comment

Hello,

I need help in my team spawn

there is 3 teams and i fixed the coordinates

but I'm trying to fix their skin , as I want each team to have a specified skin

this is my code

local teamsTable = {
[ "Police" ] = { 1577 , -1694 , 6 } ,
[ "Destructive" ] = { 2498 , -1684 , 13 } ,
[ "Rebel" ] = { 1474 , -2247 , 13 } ,
}
 
addEvent ( "onPlayerChooseTeam" , true )
addEventHandler ( "onPlayerChooseTeam" , root ,
function ( teamName )
local team = getTeamFromName ( teamName )
setPlayerTeam ( source , team )
local spawnX , spawnY , spawnZ = unpack ( teamsTable [ teamName ] )
spawnPlayer ( source , spawnX , spawnY , spawnZ )
end )

I've added skin to the coordinates but it doesn't work

[ "Police" ] = { 1474 , -2247 , 13 , 280 } ,

Help please ..

police = createTeam ( "police",255,255,0) 
  
addEventHandler ( "onPlayerJoin", getRootElement(), 
  
function() 
  
outputChatBox ( "police team > /police" , source, 255, 255, 0 ) 
  
end 
) 
  
  
  
function policeteam ( playerSource ) 
    if ( playerSource ) then 
setPlayerTeam ( playerSource , police ) 
spawnPlayer ( playerSource , 1474 , -2247 , 13 ) 
  
    end 
end 
addCommandHandler ( "police",policeteam) 
  

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