Plate Posted May 20, 2012 Share Posted May 20, 2012 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
BorderLine Posted May 20, 2012 Share Posted May 20, 2012 function addtoteamtimer() setTimer(addthem,1000,1) end addEventHandler ( "onPlayerLogin", root, addtoteamtimer ) addEventHandler ( "onPlayerSpawn", root, addtoteamtimer ) reemplaza Link to comment
Plate Posted May 20, 2012 Author Share Posted May 20, 2012 emm no funciona u.u pero gracias por tu ayuda si sabes otro metodo porfavor dimelo Link to comment
BorderLine Posted May 20, 2012 Share Posted May 20, 2012 (edited) no entiendo porq no te funciona, ami me funciona bien. ya no es primer script que no te funciona. a este script le as puesto codificacion utf-8? Edited May 20, 2012 by Guest Link to comment
Plate Posted May 20, 2012 Author Share Posted May 20, 2012 No es el segundo que no me funciona y no se lo que es uft8 Link to comment
BorderLine Posted May 20, 2012 Share Posted May 20, 2012 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
Plate Posted May 20, 2012 Author Share Posted May 20, 2012 se lo combie y no no funciono Link to comment
BorderLine Posted May 20, 2012 Share Posted May 20, 2012 y estas seguro que agregaste los grupos de ACL con el mismo nombre que señalas en el script? y supongo ke lo agregaste este script como serverside Link to comment
Plate Posted May 20, 2012 Author Share Posted May 20, 2012 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
Castillo Posted May 20, 2012 Share Posted May 20, 2012 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
Plate Posted May 20, 2012 Author Share Posted May 20, 2012 solid o une las personas al team Link to comment
BorderLine Posted May 20, 2012 Share Posted May 20, 2012 Lo testie y funciona bien. Hay algo que estas haciendo mal. Link to comment
Plate Posted May 20, 2012 Author Share Posted May 20, 2012 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
Plate Posted May 20, 2012 Author Share Posted May 20, 2012 "" version="" type="script" name="" description="" /> Link to comment
Edikosh998 Posted May 20, 2012 Share Posted May 20, 2012 Y si lo pones en MTA San Andreas/server/mods/deathmatch/resources/[gameplay] Link to comment
Plate Posted May 20, 2012 Author Share Posted May 20, 2012 ya funciono es que tenia un problema por que tenia el resoruce 2 veces pero creaba 4 teams me dirian como hacer que el resoruce cree 4 teams Link to comment
Recommended Posts