dolmen62
Members-
Posts
42 -
Joined
-
Last visited
Everything posted by dolmen62
-
Yes, I actually use it to control the train.
-
No ! A real player who is all the time in the train.
-
I've test it, and it's really annoying ! We need a gost player ! But I don't know if it exist.
-
No change, it don't stop.
-
well, I've an error when i modify "getrootelement" function makeTrain(source) loco = createVehicle(537,1725.9,-1954,16) locool = createVehicle(538,1840,-1954,16) setTrainDerailable(loco, false) setTrainDerailable(locool, false) removeStreamable( loco ) removeStreamable( locool ) local pilot1 = createPed(241,1693.38,-1959,15.6) local pilot2 = createPed(241,1711,-1959,15.6) warpPedIntoVehicle (pilot1, loco) warpPedIntoVehicle (pilot2, locool) removeStreamable( pilot1 ) removeStreamable( pilot2 ) createBlipAttachedTo(loco, 42) setTrainSpeed(loco, 0) setTrainSpeed(locool,0.203) outputChatBox("Train is here", source, 255, 255, 0) removeStreamable(markerGare2) setTimer(depart, 20000, 1) end addCommandHandler("traintest", makeTrain) local markerGare2 = createMarker(787, -1341.8, -1.8, "cylinder", 3, 255, 255, 255, 5) function markerHit(hitElement, matchingDimension) if matchingDimension and hitElement == loco then setTrainSpeed(hitElement, 0) outputChatBox("Your message here") setTimer(depart, 20000, 1) end setTimer(depart, 20000, 1) end addEventHandler( "onMarkerHit", markerGare2, stop ) function depart () setTrainSpeed(loco, 1) setTrainSpeed(locool, 1) end function removeStreamable( theElement ) triggerClientEvent( "removeStreamable", getRootElement(), theElement ) end
-
It don't work ! The train don't stop if I'm not in !
-
thank you, I will try it now !
-
I've create a client side. And it work perfectly. It's because 5 stations exist.
-
No ! It's for the client only !
-
Well, citizen help me, and he had do this for me : function makeTrain(source) loco = createVehicle(537,1725.9,-1954,16) locool = createVehicle(538,1840,-1954,16) setTrainDerailable(loco, false) setTrainDerailable(locool, false) removeStreamable( loco ) removeStreamable( locool ) local pilot1 = createPed(241,1693.38,-1959,15.6) local pilot2 = createPed(241,1711,-1959,15.6) warpPedIntoVehicle (pilot1, loco) warpPedIntoVehicle (pilot2, locool) removeStreamable( pilot1 ) removeStreamable( pilot2 ) createBlipAttachedTo(loco, 42) setTrainSpeed(loco, 0) setTrainSpeed(locool,0.203) outputChatBox("Train is here", source, 255, 255, 0) removeStreamable(markerGare2) setTimer(depart, 20000, 1) nextStation = 1 setTimer( check, 2000, 0 ) end addCommandHandler("traintest", makeTrain) local markerGare2 = createMarker(787, -1341.8, -1.8, "cylinder", 3, 255, 255, 255, 5) function stop (hitElement) outputChatBox("HIT") if not( getElementType( hitElement ) == "vehicle" ) then return end outputChatBox("c'est un vehicule") if not( getElementModel( hitElement ) == 537 ) then return end outputChatBox("et c'est la loco => Freine") setTrainSpeed(loco, 0) setTrainSpeed(locool, 0) if ( source ) then if ( source == markerGare2 )then outputChatBox("Le Train est dans Market Station.", getRootElement(), 255, 255, 0) end end setTimer(depart, 20000, 1) end addEventHandler( "onMarkerHit", getRootElement(), stop ) function depart () nextStation = nextStation+1 setTrainSpeed(loco, 1) setTrainSpeed(locool, 1) end function removeStreamable( theElement ) triggerClientEvent( "removeStreamable", getRootElement(), theElement ) end function check() local x, y, z = getElementPosition( loco ) if nextgare == 2 then if y >= -1341.8 then stop( loco ) end else if nextgare == 3 then if >= then stop( loco ) end end end end It don't work for the moment. The new system don't use marker, but the coordinates.
-
I have already do it, and it work. But When no real player is in the train, it don't stop.
-
I nedd help ! The train don't stop on the marker, when no body is near it.
-
It work, but only for the second train And when I change, it don't work I've found the problem
-
Now, I can't use "addEventHandler"
-
Thank you citizen, I will try to use it. I'm working for The Gamer/Modder Comunity. It's a Roleplay server, and Dragonofdark is the administrator. I have seen a subject in French category. I'm sure you knom him. 0.21 is for a slow assembly of the train. Because I cant place the train on the same rail.
-
I've made a little script. It work. But the train can't stop, and it's very laggy function makeTrain(source) local loco = createVehicle(537,1725.9,-1954,16) local locool = createVehicle(538,1840,-1954,16) setTrainDerailable(loco, false) setTrainDerailable(locool, false) local pilot1 = createPed(241,1693.38,-1959,15.6) local pilot2 = createPed(241,1711,-1959,15.6) warpPedIntoVehicle (pilot1, loco) warpPedIntoVehicle (pilot2, locool) setTrainSpeed(loco, 0) setTrainSpeed(locool,0.21) outputChatBox("Train is here", source, 255, 255, 0) function stop (source) setTrainSpeed(locool, 0) outputChatBox("Le Train est en gare", source, 255, 255, 0) end timer = setTimer(stop, 10000, 1, source) function depart (source) setTrainSpeed(loco, 0.5) setTrainSpeed(locool, 0.5) end timer = setTimer(depart, 20000, 0, source) end addCommandHandler("traintest", makeTrain)
-
Hi ! I'm actually working for The gamer/modder community. I want to create an automatic train system. My first problem is to put 2 train in the same rail.
