Anyelberth Posted July 11, 2013 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)
AlvareZ_ Posted July 11, 2013 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)
Alexs Posted July 11, 2013 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.
Anyelberth Posted July 11, 2013 Author 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?
Alexs Posted July 11, 2013 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.
Alexs Posted July 12, 2013 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.
Recommended Posts