A3kri Posted July 20, 2012 Share Posted July 20, 2012 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
TwiX! Posted July 20, 2012 Share Posted July 20, 2012 bool spawnPlayer ( player thePlayer, float x, float y, float z, [ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil ] ) Link to comment
A3kri Posted July 20, 2012 Author Share Posted July 20, 2012 it didn't work .. sorry I'm a beginner x.x Link to comment
Castillo Posted July 20, 2012 Share Posted July 20, 2012 Because he didn't gave you that to copy and paste it on your script. Link to comment
top sniper Posted July 20, 2012 Share Posted July 20, 2012 it didn't work .. sorry I'm a beginner x.x https://wiki.multitheftauto.com/wiki/Scr ... troduction Link to comment
KrSoFA Posted July 20, 2012 Share Posted July 20, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now