Jaden_Adams Posted December 1, 2017 Share Posted December 1, 2017 (edited) Not to respawn vehicle. Following this command, no error receive, but the vehicle does not respawn! if (cmd[0] == 'towcar') { var pos = player.position; pos.x += 2.0; let car = "Rebel"; if(player.veh){ player.veh.destroy(); } player.veh = mp.vehicles.new(mp.joaat(car), pos); player.outputChatBox("Вы заспавнили !{0, 153, 0}" + car); return 1; } The team fulfills without errors, but the vehicle does not appear! Edited December 2, 2017 by Jaden_Adams Link to comment Share on other sites More sharing options...
Jaden_Adams Posted December 2, 2017 Author Share Posted December 2, 2017 The command works if you add the line: player.modelcar.dimension = player.dimension; Here on this template: if (cmd[0] == 'towcar') { var pos = player.position; pos.x += 2.0; let car = "Rebel"; if(player.modelcar){ player.modelcar.destroy(); } player.modelcar = mp.vehicles.new(mp.joaat(car), pos); player.modelcar.dimension = player.dimension; player.outputChatBox("Вы заспавнили !{0, 153, 0}" + car); return 1; } How to create the machines without the players on the server and so they are visible to all? Link to comment Share on other sites More sharing options...
GTADevLover Posted December 3, 2017 Share Posted December 3, 2017 I think this already happens automatically. 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