Jump to content

Problemas


Plate

Recommended Posts

function teams() 
SAS = createTeam("SAS",0,255,255) 
Umbrella = createTeam("Umbrella",0,255,255) 
end 
addEventHandler("onResourceStart", resourceRoot, teams) 
  
function addthem (player) 
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SAS" ) ) then 
    setPlayerTeam ( player, SAS ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Umbrella" ) ) then 
    setPlayerTeam ( player, Umbrella )  
    end 
end 
  
function addtoteamtimer() 
    setTimer(addthem,1000,1,source) 
end 
addEventHandler ( "onPlayerLogin", root, addtoteamtimer ) 
addEventHandler ( "onPlayerSpawn", root, addtoteamtimer ) 

tengo un problema con ese script que me paso Yakuza

1): cuando los agrego al acl les digo que reconnecten para que aparescan en el team y no aparecen hasta que los agrego con el panel admin

2): a los que saco del acl aparecen en el team

Link to comment

cuando guardes un script debes cambiarle la codificacion, mta esta exigiendo esa codificacion

abre el script con el bloc de notas,

cuando vallas a guardar, abajo sale para poner el nombre del archivo y mas abajo dice codificacion dise ANSI

le cambias a utf-8

Link to comment

sip pero ahora que veo me tira error el script mira

teams/auto.lua:8: attempt to concatenate a boolean valvue 

y esto de acl

<group name="SAS"> 
        <acl name="Default"></acl> 
        <object name="user.Plate"></object> 
    </group> 

Link to comment

Proba con esto:

function teams ( ) 
    SAS = createTeam ( "SAS", 0, 255, 255 ) 
    Umbrella = createTeam ( "Umbrella", 0, 255, 255 ) 
end 
addEventHandler ( "onResourceStart", resourceRoot, teams ) 
  
function addthem ( player ) 
    if ( not player ) then 
        return 
    end 
  
    local accountName = getAccountName ( getPlayerAccount ( player ) ) 
    if isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "SAS" ) ) then 
        setPlayerTeam ( player, SAS ) 
    elseif isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Umbrella" ) ) then 
        setPlayerTeam ( player, Umbrella ) 
    end 
end 
  
function addtoteamtimer ( ) 
    setTimer ( addthem, 1000, 1, source ) 
end 
addEventHandler ( "onPlayerLogin", root, addtoteamtimer ) 
addEventHandler ( "onPlayerSpawn", root, addtoteamtimer ) 

Link to comment

Mira yo hize esto

MTA San Andreas/server/mods/deathmatch/resources/teams 

hay cree esto

teams.lua 

function teams() 
SAS = createTeam("SAS",0,255,255) 
Umbrella = createTeam("Umbrella",0,255,255) 
end 
addEventHandler("onResourceStart", resourceRoot, teams) 
  
  
function addthem (player) 
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SAS" ) ) then 
    setPlayerTeam ( player, SAS )  
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Umbrella" ) ) then 
    setPlayerTeam ( player, Umbrella ) 
    end 
end 
  
function addtoteamtimer() 
    setTimer(addthem,1000,1) 
end 
addEventHandler ( "onPlayerLogin", root, addtoteamtimer ) 
addEventHandler ( "onPlayerSpawn", root, addtoteamtimer ) 

primero prove el tuyo y despues el de solid y no los combierte en el team a los players

Link to comment
  • Recently Browsing   0 members

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