Military Guy Posted April 2, 2020 Share Posted April 2, 2020 Приветствую всех. Как можно добавить второй танк на сервер, что бы у него работала пушка? Hi. How can I add a second tank to the server so that it has a working gun? Link to comment
The_GTA Posted April 2, 2020 Share Posted April 2, 2020 Hello [M]Province, since this is a scripting forum let's talk about how to create Rhino vehicle. You can use the createVehicle function for that, like... server-side: createVehicle(getVehicleModelFromName("Rhino"), 0, 0, 5) This will create a Tank in the middle of the map. The easiest way to test scripts is to use the runcode resource. Simply log in as admin to your server and start that resource. Then type /run into the chatbox to test Lua code! Link to comment
Military Guy Posted April 2, 2020 Author Share Posted April 2, 2020 3 hours ago, The_GTA said: Hello [M]Province, since this is a scripting forum let's talk about how to create Rhino vehicle. You can use the createVehicle function for that, like... server-side: createVehicle(getVehicleModelFromName("Rhino"), 0, 0, 5) This will create a Tank in the middle of the map. The easiest way to test scripts is to use the runcode resource. Simply log in as admin to your server and start that resource. Then type /run into the chatbox to test Lua code! You don't understand me. I need to duplicate the Rhino tank and put a different model on the second tank Make a two different tanks Link to comment
_Ace Posted April 2, 2020 Share Posted April 2, 2020 replace the second tank model to the swat tank or firetruck, (you need a vehicle with a turret) then attach the second tank to a rhino, make the rhino invisible using setElementAlpha, put a timer serverside, to get the rhino turret position and set it to the attached second tank (getVehicleTurretPosition and getVehicleTurretPosition) and you are done, the turret movement will not be super smooth even using 30ms timer, if you want smooth turret movement use onClientPreRender, but this will require more code to sync to the clients, I tested the server solution and it works fine, 2 tanks with functional cannons Link to comment
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