El.Stark Posted October 19, 2011 Share Posted October 19, 2011 (edited) Basicamente tengo este problema, Tengo un script este: teamAdmin = createTeam ( "Ejemplo", 255, 0, 0 ) function addtoteam(player) if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then setPlayerTeam ( player,teamAdmin ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then setPlayerTeam ( player,teamAdmin ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then setPlayerTeam ( player,teamAdmin ) end end function addtoteamtimer() setTimer(addtoteam,3000,1,source) end addEventHandler("onPlayerLogin",getRootElement(),addtoteamtimer) Que lo que hace es que los administradores o moderadores al logearse entren a un equipo, todo bien pero queria saber si es posible que al logearse y al entrar al equipo le ponga un tag por ejemplo [Admin]+nombre osea: [Admin]El.Stark... Seria eso posible? Help me please. PD: Muchas gracias a todos por averme ayudado en los temas anteriores, solo me queda esta ultima duda. Edited October 19, 2011 by Guest Link to comment
Castillo Posted October 19, 2011 Share Posted October 19, 2011 teamAdmin = createTeam ( "Ejemplo", 255, 0, 0 ) function addtoteam(player) if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then setPlayerTeam ( player,teamAdmin ) setPlayerNametagText(player, "[Admin]".. getPlayerName(player)) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then setPlayerTeam ( player,teamAdmin ) setPlayerNametagText(player, "[s.Moderator]".. getPlayerName(player)) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then setPlayerTeam ( player,teamAdmin ) setPlayerNametagText(player, "[Moderator]".. getPlayerName(player)) end end function addtoteamtimer() setTimer(addtoteam,3000,1,source) end addEventHandler("onPlayerLogin",getRootElement(),addtoteamtimer) Link to comment
El.Stark Posted October 19, 2011 Author Share Posted October 19, 2011 No me cambio el nombre osea me cambio de equipo al equipo de admins pero no me cambio el nombre osea el nombre sigue igual que podria ser? Gracias por responder Solidsnake14. Link to comment
Castillo Posted October 19, 2011 Share Posted October 19, 2011 Es porque no te cambia el nombre, te cambia el nametag. Link to comment
El.Stark Posted October 19, 2011 Author Share Posted October 19, 2011 ok, pero el tag o nametag no sale en el scoreboard, osea sale mi nombre supongamos El.Stark y aparece en el equipo de los administradores pero no tiene el tag puesto por detras del nombre, o no es visible Link to comment
12p Posted October 19, 2011 Share Posted October 19, 2011 setPlayerName Castillo te dio la base, haz click en el enlace de la función y averigua cómo hacerlo. Link to comment
El.Stark Posted October 19, 2011 Author Share Posted October 19, 2011 Bueno, estube intentando como unos 20 minutos con el setPlayerName y el scrpt deja de funcinar ahora no sale el equipo en el scoreboard Por eso es que estoy pidiendo ayuda llevo casi toda la tarde tratando de hacerlo funcionar y nada Link to comment
Castillo Posted October 19, 2011 Share Posted October 19, 2011 20 minutos? es un chiste? solo tenias que cambiar dos cosas... teamAdmin = createTeam ( "Ejemplo", 255, 0, 0 ) function addtoteam(player) local name = getPlayerName(player) if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then setPlayerTeam ( player,teamAdmin ) setPlayerName(player, "[Admin]".. name) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then setPlayerTeam ( player,teamAdmin ) setPlayerName(player, "[s.Moderator]".. name) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then setPlayerTeam ( player,teamAdmin ) setPlayerName(player, "[Moderator]".. name) end end function addtoteamtimer() setTimer(addtoteam,3000,1,source) end addEventHandler("onPlayerLogin",getRootElement(),addtoteamtimer) Fijate si funca. Link to comment
El.Stark Posted October 19, 2011 Author Share Posted October 19, 2011 Ahora si funciona!!! Gracias Solidsnake14 Muchas gracias deveras. Link to comment
Recommended Posts