• Airboat Gun
    0 replies, posted
Hello Facepunch, I was given a script a few weeks ago that was designed to prevent airboats and jeeps mounted with turrets from being able to fire. It seems that firing the airboat cannon while a player is connecting will cause the server will crash. Unfortunately, this script now seems to cause the server to crash outright whenever an airboat gun is fired. Can someone please take a look at it and see what's wrong? [CODE]--[[ The airboat and jeep turret are known to crash the server when being fired during PlayerInitialSpawn. This disables them. ]] -- If any of these vehicles are spawned, we need to disable their turrets. local BLOCK_TURRET = { prop_vehicle_jeep = true, prop_vehicle_jeep_old = true, prop_vehicle_airboat = true } hook.Add( "PlayerSpawnedVehicle", "DisableVehicleTurrets", function( ply, vehicle ) if ( BLOCK_TURRET[vehicle:GetClass()] ) then vehicle:Fire( "EnableGun", "false" ) -- Disables the vehicle from being able to fire the turret end end )[/CODE] Thanks in advance.
Sorry, you need to Log In to post a reply to this thread.