JkR Posted February 28, 2014 Posted February 28, 2014 Buenas, tengo un problema con unos marker que hize para una base, estan reservados por ACL solo para miembros, funcionan bien pero si intentas usarlos con un vehciulo no funcionan, espero que me puedan ayudar... gracias. local tele = createMarker ( -473, -512.7001953125, 24.5, 'cylinder', 2, 0, 89, 97, 255 ) function Teleport( player, matchingDimension ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("TLAT")) then setElementPosition ( player, 3239.3999023438, 253.19999694824, 19) end end addEventHandler( "onMarkerHit", tele, Teleport )
Castillo Posted February 28, 2014 Posted February 28, 2014 local tele = createMarker ( -473, -512.7001953125, 24.5, 'cylinder', 2, 0, 89, 97, 255 ) function Teleport ( player, matchingDimension ) if ( getElementType ( player ) == "player" ) then if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "TLAT" ) ) then setElementPosition ( player, 3239.3999023438, 253.19999694824, 19 ) end end end addEventHandler ( "onMarkerHit", tele, Teleport ) Proba eso.
JkR Posted February 28, 2014 Author Posted February 28, 2014 Perdona pero el problema sigue, no se teletransporta con el auto, necesito una solución lo más rapido posible...
BorderLine Posted February 28, 2014 Posted February 28, 2014 local tele = createMarker ( -473, -512.7001953125, 24.5, 'cylinder', 2, 0, 89, 97, 255 ) function Teleport ( player, matchingDimension ) cVeh = getPedOccupiedVehicle ( player ) if ( getElementType ( player ) == "player" ) then if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "TLAT" ) ) then setElementPosition ( cVeh, 3239.3999023438, 253.19999694824, 19 ) end end end addEventHandler ( "onMarkerHit", tele, Teleport ) intenta asi
Alexs Posted February 28, 2014 Posted February 28, 2014 Perdona pero el problema sigue, no se teletransporta con el auto, necesito una solución lo más rapido posible... En tu código nunca incluyes el vehículo, es por eso que no se teletransporta, prueba con el código de @BorderLine aunque ese solo funciona si el jugador esta en un vehículo.
Castillo Posted February 28, 2014 Posted February 28, 2014 local tele = createMarker ( -473, -512.7001953125, 24.5, 'cylinder', 2, 0, 89, 97, 255 ) function Teleport ( player, matchingDimension ) if ( getElementType ( player ) == "player" ) then if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "TLAT" ) ) then local element = ( isPedInVehicle ( player ) and getPedOccupiedVehicle ( player ) or player ) setElementPosition ( element, 3239.3999023438, 253.19999694824, 19 ) end end end addEventHandler ( "onMarkerHit", tele, Teleport )
Recommended Posts