public override void OnStart() { this.InitEntitySync(); /** * Prepare the Events and route them to the controllers */ Alt.OnClient <IPlayer, Dictionary <string, string> >("pedSyncer:client:firstSpawn", Events.OnFirstSpawn); Alt.OnClient <IPlayer, string>("pedSyncer:client:positions", Events.OnPositionUpdate); Alt.OnClient <IPlayer, ulong, string, string[]>("pedSyncer:client:task", Events.OnTaskUpdate); Alt.OnClient <IPlayer>("pedSyncer:client:ready", Events.OnPlayerConnect); AltEntitySync.OnEntityRemove += Events.OnEntityRemove; Console.WriteLine("Started"); /** * Load all files (navMeshes & StreetCrossing) */ NavigationMesh.getInstance(); StreetCrossingControl.getInstance(); //Start serverside ped movement calculation PedMovement.GetInstance(); //Create citizen vehicles PedVehicles.GetInstance().SpawnRandomCitizenVehicles(1000); //Create citizen peds who wanders - delete this line if you don't wanna have citizens Ped.CreateCitizenPeds(2000); //NodeJS Wrapper PedSyncerWrapper.RegisterWrapperFunctions(); }
public static void CreateCitizenPeds() { Console.WriteLine("[INFO] PedSyncer Wrapper Create Citizens."); Ped.CreateCitizenPeds(2000); }