MTA Team 0xCiBeR Posted February 28, 2013 MTA Team Posted February 28, 2013 Bueno el problema esta cuando le indico q despues que spawnee, me agregue el jugador a un team especifico... PD:No da errores, solo no lo agrega function createTeamsOnStart () createTeam ( "RAAZ", 255, 255, 255 ) createTeam ( "PDz", 255, 0, 0 ) createTeam ( "CEA", 255, 255, 0 ) createTeam ( "Army", 0, 192, 0 ) createTeam ( "Police", 0, 0, 200 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) addEventHandler( "onPlayerLogin", resourceRoot, function() resetMapInfo() for _,player in ipairs( getElementsByType 'player' ) do spawn( player ) end end ) function spawn( player ) if not isElement( player ) then return end showChat( player, true ) local acc = getPlayerAccount( player ) if acc and not isGuestAccount( acc ) then if isObjectInACLGroup ( "user.".. getAccountName( acc ), aclGetGroup ( "RAAZ" ) ) then setPlayerTeam ( player, "RAAZ" ) spawnPlayer ( player, -2477.9606933594, 494.64392089844, 30.07054901123, 90, 287 ) elseif isObjectInACLGroup ( "user.".. getAccountName( acc ), aclGetGroup ( "PDz" ) ) then setPlayerTeam ( player, "PDz" ) spawnPlayer ( player, -2477.9606933594, 494.64392089844, 30.07054901123, 90, 287 ) elseif isObjectInACLGroup ( "user.".. getAccountName( acc ), aclGetGroup ( "CEA" ) ) then setPlayerTeam ( player, "CEA" ) spawnPlayer ( player, -2477.9606933594, 494.64392089844, 30.07054901123, 90, 287 ) elseif isObjectInACLGroup ( "user.".. getAccountName( acc ), aclGetGroup ( "USFU" ) ) then setPlayerTeam ( player, "CEA" ) spawnPlayer ( player, -2477.9606933594, 494.64392089844, 30.07054901123, 90, 287 ) end end fadeCamera( player, true ) setCameraTarget( player, player ) end addEventHandler( "onPlayerJoin", root, function( ) spawn( source ) end) addEventHandler( "onPlayerWasted", root, function( ) setTimer( spawn, 500, 1, source ) end) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Castillo Posted February 28, 2013 Posted February 28, 2013 setPlayerTeam necesita un elemento de un team, no el nombre, usa getTeamFromName. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Sasu Posted March 1, 2013 Posted March 1, 2013 Ademas puedes remplazar el onPlayerJoin y onPlayerWasted por onPlayerSpawn State: Inactive
MTA Team 0xCiBeR Posted March 3, 2013 Author MTA Team Posted March 3, 2013 Gracias Solid y Sasuke DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Castillo Posted March 3, 2013 Posted March 3, 2013 De nada. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts