Jump to content

More tanks in server/Добавление танков на сервер


Recommended Posts

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
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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...