Jump to content

Se puede hacer esto?


El.Stark

Recommended Posts

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 by Guest
Link to comment
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

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
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...