Created
May 17, 2017 19:45
-
-
Save ejb1123/102fafa42ddf74d9542f35da2fb53e83 to your computer and use it in GitHub Desktop.
FiveMTraintest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CitizenFX.Core; | |
using CitizenFX.Core.Native; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace test | |
{ | |
class train : BaseScript | |
{ | |
public train() | |
{ | |
Tick += Train_Tick; | |
} | |
private async Task Train_Tick() | |
{ | |
if (Game.IsControlJustPressed(0, Control.Cover)) LocalPlayer.Character.Position = new Vector3(2057.99f, 3651.983f, 37.5503f); | |
if (Game.IsControlJustPressed(0, Control.MultiplayerInfo)) | |
{ | |
VehicleHash[] h = { VehicleHash.Freight, VehicleHash.FreightCar, VehicleHash.FreightGrain, VehicleHash.FreightCont1, VehicleHash.FreightCont2, VehicleHash.FreightTrailer }; | |
foreach (var t in h) | |
{ | |
await new Model(t).Request(-1); | |
} | |
Function.Call(Hash.CREATE_MISSION_TRAIN, 2, 2057.99, 3651.983, 37.5503, true); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment