Skip to content

vugi99/onset-tanks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

onset-tanks

Config in config.lua

Tanks

Commands

  • /stank (id) to spawn a tank

Developers

  • The onset-tanks package need to be loaded BEFORE your package if you want to use onset-tanks functions
  • To check if the vehicle is a tank :
   --server,client
   if GetVehiclePropertyValue(vehicleid, "istank") then
      -- code
   end
  • Get tank id
   --server,client
   GetVehiclePropertyValue(vehicle, "tankid")
  • Get turret , cannon and base models of a tank
   --server,client
   local turret = GetVehiclePropertyValue(vehicle, "tourelleobj")
   local cannon = GetVehiclePropertyValue(vehicle, "canonobj")
   local base = GetVehiclePropertyValue(vehicle, "baseobj")
  • Don't forget to import the onset-tanks package before using functions
   --server
   local tanks = ImportPackage("edit_me") -- put the onset-tanks package name here
  • Spawn a tank
   --server
   local vehicleid,cannonobject,turretobject,tank_base_object = tanks.SpawnTank(tankid,x,y,z(,yawangle))
  • transform a vehicle to a tank ( Please use vehicles models 13,14,15,16 for better collisions )
   --server
   local cannonobject,turretobject,tank_base_object = tanks.TransformToTank(tankid,vehicleid)

Known bugs

  • Some cannons flying when rotating on the pitch axis
  • Bad collisions

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages