LANS Posted January 12, 2013 Share Posted January 12, 2013 hola, tengo el siguiente script que para poner mensajes de administradores en chatbox y que solo lo vean ellos, mi problema es que al poner el comando /chat sale el texto diciendo ejemplo: admin-LANS:chat blablabla y lo que no salga la palabra chat en el texto aqui el script function adminchat(thePlayer, ...) local word = ( ... ) local word = { ... } local message = table.concat(word, " ") local account = getPlayerAccount ( thePlayer ) if (isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup ( "Moderator" ) ) or isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup ( "SuperModerator" ) ) ) then outputChatBox ( "#FF0000[Admin]" .. getPlayerName ( thePlayer ) .. ": " .. message, getRootElement(), 0, 255, 0, true ) else outputChatBox("#C6FA78No.", getRootElement(), 255, 255, 255, true) end end addCommandHandler("chat", adminchat) Link to comment
Castillo Posted January 12, 2013 Share Posted January 12, 2013 Eso es porque pusiste "..." en el segundo argumento, eso es el nombre del comando. function adminchat(thePlayer, cmd, ...) local word = { ... } local message = table.concat(word, " ") local account = getPlayerAccount ( thePlayer ) if (isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup ( "Moderator" ) ) or isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup ( "SuperModerator" ) ) ) then outputChatBox ( "#FF0000[Admin]" .. getPlayerName ( thePlayer ) .. ": " .. message, getRootElement(), 0, 255, 0, true ) else outputChatBox("#C6FA78No.", getRootElement(), 255, 255, 255, true) end end addCommandHandler("chat", adminchat) Link to comment
Recommended Posts