Anyelberth Posted July 11, 2013 Share Posted July 11, 2013 Hola Chicos. Como Podría Modificar Para que Cuando Spawee Un Un User de el Grupo Acl "Admin" Spawee Con una M4 ? function giveWeapons ( theSpawnpont ) giveWeapon ( source, 31, 200 ) -- end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeapons) Link to comment
AlvareZ_ Posted July 11, 2013 Share Posted July 11, 2013 function giveWeapons ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then giveWeapon ( thePlayer, 31, 200 ) end end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeapons) Link to comment
Alexs Posted July 11, 2013 Share Posted July 11, 2013 function giveWeapons ( ) if isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( source ) ), aclGetGroup( "Admin" ) ) then giveWeapon ( source, 31, 200 ) end end addEventHandler ( "onPlayerSpawn", root, giveWeapons) @AlvareZ_ 'thePlayer' en tu código representa un numero, no un jugador. Link to comment
Anyelberth Posted July 11, 2013 Author Share Posted July 11, 2013 function giveWeapons ( ) if isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( source ) ), aclGetGroup( "Admin" ) ) then giveWeapon ( source, 31, 200 ) end end addEventHandler ( "onPlayerSpawn", root, giveWeapons) Gracias EDIT: Hey, Pero El "root" Aria que Cada Vez que Un Admin spawea, se le dara También La M4 a los Demas Admins, Así que Debería Quitarlo Creo Yo, No? Link to comment
Alexs Posted July 11, 2013 Share Posted July 11, 2013 function giveWeapons ( ) if isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( source ) ), aclGetGroup( "Admin" ) ) then giveWeapon ( source, 31, 200 ) end end addEventHandler ( "onPlayerSpawn", root, giveWeapons) Gracias EDIT: Hey, Pero El "root" Aria que Cada Vez que Un Admin spawea, se le dara También La M4 a los Demas Admins, Así que Debería Quitarlo Creo Yo, No? No, eso no pasara. Link to comment
AlvareZ_ Posted July 12, 2013 Share Posted July 12, 2013 Creo con con el thePlayer igual serviría Link to comment
Alexs Posted July 12, 2013 Share Posted July 12, 2013 Creo con con el thePlayer igual serviría Fíjate en el primer parámetro de 'onPlayerSpawn', es la coordenada 'X' de donde el jugador 'spawneo', así que no, no serviría, te recomiendo leer la wiki para la próxima. Link to comment
Recommended Posts