Nerdzik Posted January 8, 2021 Share Posted January 8, 2021 (edited) Hi it's me again, my simple gamemode working but I have problem with drive cars. When I spawn Vehicle by the command /veh [name car] and I get in the car, the engine is not on and I cannot drive. Sory for so many unnecessary topics and all but I'm new and I'm learning. My Code: [Command("veh", "Użyj: /veh [Nazwa pojazdu]", Alias = "vehicle")] public void CMD_Veh(Player player, string vehName) { if (!IPlayer.IsPlayerLoggedIn(player)) return; IPlayer iplayer = player.GetData<IPlayer>("PlayerData"); if(!iplayer.HasAdminLevel((int)AdminRanks.Admin)) { player.SendChatMessage("Nie masz wystarczających uprawnień."); return; } VehicleHash vehHash = NAPI.Util.VehicleNameToModel(vehName); if(vehHash == 0) { player.SendChatMessage("Nieprawidłowa nazwa pojazdu."); return; } if(player.HasData("PlayerData.Temp.Adminveh")) { Vehicle old_veh = player.GetData<Vehicle>("PlayerData.Temp.Adminveh"); old_veh.Delete(); } Vehicle veh = NAPI.Vehicle.CreateVehicle(vehHash, player.Position, player.Rotation, 5, 5, "LS-BRAK", 0, false, true); player.SetIntoVehicle(veh, 0); player.SendNotification($"Pojazd {vehHash}, został stworzony poprawnie "); player.SetData("PlayerData.Temp.Adminveh", veh); } And he adds a video of how it works. https://streamable.com/6ugvd9 The video shows that the car does not respond to the "W" button, and it is not even turned on. Edited January 8, 2021 by Nerdzik Link to comment Share on other sites More sharing options...
Nerdzik Posted January 11, 2021 Author Share Posted January 11, 2021 (edited) Who's help me? When I run a clean server with vspawner, I can move normally. Edited January 11, 2021 by Nerdzik Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now