Plate Posted August 2, 2012 Share Posted August 2, 2012 Hola quisiera que en un outputChatBox apareciera lo siguiente por que en el que tengo cuando una persona agrega a un grupo a otra por ejemplo enves de aparecer EL_X agrego a asesino a Marine Force aparece asesino agrego a asesino a Marine Force y queda re nada que ver jeje alguien sabe como podria hacer para arreglarlo Link to comment
Castillo Posted August 2, 2012 Share Posted August 2, 2012 Si no posteas el script como vamos a ayudarte? Link to comment
Plate Posted August 2, 2012 Author Share Posted August 2, 2012 addEvent("clan",true) function clanes(player, groupname) local account = getPlayerAccount(player) if ( not isGuestAccount ( account ) ) then local group = aclGetGroup ( groupname ) if ( group ) then local isInACLGroup = isObjectInACLGroup ( "user." .. getAccountName ( account ), group) if ( not isInACLGroup ) then aclGroupAddObject ( group, "user."..getAccountName ( account ) ) local pname = getPlayerName(player) setPlayerTeam ( player, Um ) outputChatBox(tostring(pname) .." agrego a '".. getPlayerName(player) .."' a el clan " .. groupname .. ".", getRootElement(), 0, 255 ,255 ) elseif ( isInACLGroup ) then aclGroupRemoveObject ( group, "user."..getAccountName ( account ) ) local pname2 = getPlayerName( player ) outputChatBox (tostring(pname2) .." removio a " .. getPlayerName(player) .. " del clan " .. groupname .. ".", getRootElement(), 0, 255 ,255 ) setPlayerTeam(player, nil) end else outputChatBox ( "el grupo " .. groupname .. " no existe.", source, 255, 0 ,0 ) end else outputChatBox ( "Error el jugador no esta logeado.", source, 255, 100 ,100 ) end end addEventHandler("clan", getRootElement(), clanes) Link to comment
Castillo Posted August 2, 2012 Share Posted August 2, 2012 function clanes ( player, groupname ) local account = getPlayerAccount ( player ) local pname = getPlayerName ( source ) if ( not isGuestAccount ( account ) ) then local group = aclGetGroup ( groupname ) if ( group ) then local isInACLGroup = isObjectInACLGroup ( "user." .. getAccountName ( account ), group ) if ( not isInACLGroup ) then aclGroupAddObject ( group, "user.".. getAccountName ( account ) ) setPlayerTeam ( player, Um ) outputChatBox ( tostring ( pname ) .." agrego a '".. getPlayerName ( player ) .."' a el clan " .. groupname .. ".", root, 0, 255, 255 ) elseif ( isInACLGroup ) then aclGroupRemoveObject ( group, "user.".. getAccountName ( account ) ) outputChatBox ( tostring ( pname ) .." removio a '".. getPlayerName ( player ) .."' del clan " .. groupname .. ".", root, 0, 255, 255 ) setPlayerTeam ( player, nil ) end else outputChatBox ( "el grupo ".. groupname .." no existe.", source, 255, 0, 0 ) end else outputChatBox ( "Error el jugador no esta logeado.", source, 255, 100, 100 ) end end addEvent ( "clan", true ) addEventHandler ( "clan", root, clanes ) En: local pname = getPlayerName ( source ) tendrias que haber usado: 'source' no 'player. Link to comment
Plate Posted August 2, 2012 Author Share Posted August 2, 2012 Funciona muchas gracias solid Link to comment
Recommended Posts