iFoReX Posted September 19, 2012 Share Posted September 19, 2012 como puedo solucionar este resource ?? addCommandHandler("addTDF",function(playerSource, commandName, jugador) local admn = getAccountName(getPlayerAccount(playerSource)) local account = getAccountName(getPlayerAccount(jugador)) if isObjectInACLGroup("user." .. admn, aclGetGroup("admin")) then if account then local added = aclGroupAddObject ( aclGetGroup("TDF"), "user."..account ) elseif not account then outputChatBox("Este Jugador no tiene cuenta.",playerSource,255,255,0) elseif not isObjectInACLGroup("user." .. admn, aclGetGroup("admin")) then outputChatBox("No eres admin !!.",playerSource,255,0,0) end if added then outputChatBox(jugador.." Añadido correctamente",playerSource,0,255,0) end end end ) Link to comment
Castillo Posted September 19, 2012 Share Posted September 19, 2012 Que es lo que anda mal? Link to comment
Alexs Posted September 19, 2012 Share Posted September 19, 2012 Cual es el problema, error en el debug? Ya vi, jugador es un string, estas consiguiendo la cuenta de un string, primero consigue al jugador. Link to comment
iFoReX Posted September 19, 2012 Author Share Posted September 19, 2012 como lo consigo ? $ Link to comment
Alexs Posted September 19, 2012 Share Posted September 19, 2012 como lo consigo ? $ getPlayerFromName o usa esto que es mas util: function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end es una Useful Function. Link to comment
iFoReX Posted September 19, 2012 Author Share Posted September 19, 2012 player == getPlayerFromNamePart(jugador) ?? algo asi seria Link to comment
Alexs Posted September 19, 2012 Share Posted September 19, 2012 player == getPlayerFromNamePart(jugador) ?? algo asi seria Si, mas o menos. Link to comment
Castillo Posted September 19, 2012 Share Posted September 19, 2012 jugador = getPlayerFromNamePart ( jugador ) Link to comment
Recommended Posts