jdcu Posted April 4, 2016 Posted April 4, 2016 local groupName = 'SurvariumZ' markerDoor = createMarker(-2879.455078125, 1234.548828125, 7.0988426208496,"cylinder",2, 0, 255, 0, 150) addEventHandler("onMarkerHit",root, function ( hPlayer ) if ( source == markerDoor ) then if ( getElementData ( hPlayer, "gang" ) == "SurvariumZ" ) or isPedInVehicle( hPlayer ) then setElementPosition ( hPlayer , -2852.0888671875, 1258.0458984375, 7.1015625 ) else outputChatBox( 'Only '..groupName..' !', hPlayer, 255, 0, 255 ) end end end ) El problema es el siguiente quiero que funcione con autos tambien no solo que teletransporte al jugador sino tambien, que si el jugador va en auto lo teletransporte con el auto tambien, por favor si alguien me puede ayudar gracias
aka Blue Posted April 4, 2016 Posted April 4, 2016 (edited) Esto debería funcionar. local groupName = 'SurvariumZ' markerDoor = createMarker(-2879.455078125, 1234.548828125, 7.0988426208496,"cylinder",2, 0, 255, 0, 150) addEventHandler ( "onMarkerHit", root, function ( hPlayer ) local vehicle = getPedOccupiedVehicle ( hPlayer ) if ( source == markerDoor ) then if ( getElementData ( hPlayer, "gang" ) == "SurvariumZ" or isPedInVehicle ( hPlayer ) ) then setElementPosition ( hPlayer , -2852.0888671875, 1258.0458984375, 7.1015625 ) setElementPosition ( vehicle , -2852.0888671875, 1258.0458984375, 7.1015625 ) else outputChatBox( 'Only '..groupName..' !', hPlayer, 255, 0, 255 ) end end end ) Edited April 4, 2016 by Guest
Tomas Posted April 4, 2016 Posted April 4, 2016 Esto debería funcionar. local groupName = 'SurvariumZ' markerDoor = createMarker(-2879.455078125, 1234.548828125, 7.0988426208496,"cylinder",2, 0, 255, 0, 150) addEventHandler ( "onMarkerHit", root, function ( hPlayer ) local vehicle = getPedVehicle ( hPlayer ) if ( source == markerDoor ) then if ( getElementData ( hPlayer, "gang" ) == "SurvariumZ" or isPedInVehicle ( hPlayer ) ) then setElementPosition ( hPlayer , -2852.0888671875, 1258.0458984375, 7.1015625 ) setElementPosition ( vehicle , -2852.0888671875, 1258.0458984375, 7.1015625 ) else outputChatBox( 'Only '..groupName..' !', hPlayer, 255, 0, 255 ) end end end ) *getPedOccupiedVehicle Currently developing for International Gaming Community - Join us!
Tomas Posted April 4, 2016 Posted April 4, 2016 Listo, gracias, se me pasó . Si no eres del clan y estás en un vehículo entras igual Currently developing for International Gaming Community - Join us!
jdcu Posted April 5, 2016 Author Posted April 5, 2016 ahorita lo pruebo y te avisa muchisimas gracias
aka Blue Posted April 7, 2016 Posted April 7, 2016 (edited) Esto ya debería funcionar. local groupName = 'SurvariumZ' markerDoor = createMarker(-2879.455078125, 1234.548828125, 7.0988426208496,"cylinder",2, 0, 255, 0, 150) addEventHandler ( "onMarkerHit", root, function ( hPlayer ) local vehicle = getPedOccupiedVehicle ( hPlayer ) if ( source == markerDoor ) then if ( getElementData ( hPlayer, "gang" ) == "SurvariumZ" ) then if not isPedInVehicle ( hPlayer ) then setElementPosition ( hPlayer , -2852.0888671875, 1258.0458984375, 7.1015625 ) else isPedInVehicle ( hPlayer ) then setElementPosition ( hPlayer , -2852.0888671875, 1258.0458984375, 7.1015625 ) setElementPosition ( vehicle , -2852.0888671875, 1258.0458984375, 7.1015625 ) end else outputChatBox ( "Only "..groupName.."!", hPlayer, 255, 0, 0 ) end end end ) Edited April 7, 2016 by Guest
aka Blue Posted April 7, 2016 Posted April 7, 2016 (edited) Esto ya debería funcionar. local groupName = 'SurvariumZ' markerDoor = createMarker(-2879.455078125, 1234.548828125, 7.0988426208496,"cylinder",2, 0, 255, 0, 150) addEventHandler ( "onMarkerHit", root, function ( hPlayer ) local vehicle = getPedOccupiedVehicle ( hPlayer ) if ( source == markerDoor ) then if ( getElementData ( hPlayer, "gang" ) == "SurvariumZ" ) then if not isPedInVehicle ( hPlayer ) then setElementPosition ( hPlayer , -2852.0888671875, 1258.0458984375, 7.1015625 ) else isPedInVehicle ( hPlayer ) then setElementPosition ( hPlayer , -2852.0888671875, 1258.0458984375, 7.1015625 ) setElementPosition ( vehicle , -2852.0888671875, 1258.0458984375, 7.1015625 ) end else outputChatBox ( "Only "..groupName.."!", hPlayer, 255, 0, 0 ) end end end ) Edited April 7, 2016 by Guest
Tomas Posted April 7, 2016 Posted April 7, 2016 elseif isPedInVehicle ( hPlayer ) then Mejor usar else Currently developing for International Gaming Community - Join us!
Tomas Posted April 7, 2016 Posted April 7, 2016 elseif isPedInVehicle ( hPlayer ) then Mejor usar else Currently developing for International Gaming Community - Join us!
Tomas Posted April 7, 2016 Posted April 7, 2016 Cambiado. else isPedInVehicle ( hPlayer ) then el else no lleva then ni argumentos Currently developing for International Gaming Community - Join us!
Tomas Posted April 7, 2016 Posted April 7, 2016 Cambiado. else isPedInVehicle ( hPlayer ) then el else no lleva then ni argumentos Currently developing for International Gaming Community - Join us!
Recommended Posts