Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

2 years ago

Advertisement
October 20, 2019, 02:42:08 am

Author Topic: /woet script  (Read 4944 times)

Philpax

  • Developer
  • Hero Member
  • *****
  • Posts: 563
    • View Profile
/woet script
« on: December 19, 2013, 02:24:07 pm »
By popular request, the Woet script, reproduced in its entirety:
Code: Lua
  1. function PlayerChat( args )
  2.         if args.text ~= "/woet" then return true end
  3.  
  4.         player = args.player
  5.         vehicle = player:GetVehicle()
  6.        
  7.         if not IsValid(vehicle) then
  8.                 player:SendChatMessage( "You need to be in a vehicle!", Color( 255, 0, 0 ) )
  9.                 return
  10.         end
  11.  
  12.         if player:GetWorld() ~= DefaultWorld then
  13.                 player:SendChatMessage( "This has been restricted to the main world. :(", Color( 255, 0, 0 ) )
  14.                 return
  15.         end
  16.  
  17.         if player:GetState() ~= PlayerState.InVehicle then
  18.                 player:SendChatMessage( "Shame on you! You're not the driver!", Color( 255, 0, 0 ) )
  19.                 return
  20.         end
  21.  
  22.         dir = vehicle:GetAngle() * Vector3(0, 0, -1)
  23.         vehicle:SetAngularVelocity( dir * 30 )
  24.  
  25.         return false
  26. end
  27.  
  28. Events:Subscribe( "PlayerChat", PlayerChat )

Simply drop this into a file called woet.lua, put it in scripts/woet/server (create directories if they don't exist), and then load the module using 'load woet'. You will instantly be able to /woet as much as you could on the test server.

Vechro

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: /woet script
« Reply #1 on: December 19, 2013, 02:29:35 pm »
Yesh! This will be fun!
Thanks alot Phil.

FoulPhil

  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: /woet script
« Reply #2 on: December 19, 2013, 07:09:23 pm »
what does it do?

fahrstuhl1

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: /woet script
« Reply #3 on: December 19, 2013, 07:20:36 pm »
it flips your vehicle more or less ;)

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: /woet script
« Reply #4 on: December 20, 2013, 09:07:29 am »
Please release the faction script from the test..

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: /woet script
« Reply #5 on: December 20, 2013, 11:41:51 pm »
Excellent script any chance of including the script to add this command to the F5 help menu. Thanks.

Never mind i already scripted it.

client side woet.lua:

Code: [Select]

class 'woet'

function woet:__init()
    Events:Subscribe( "ModuleLoad", self, self.ModulesLoad )
    Events:Subscribe( "ModulesLoad", self, self.ModulesLoad )
    Events:Subscribe( "ModuleUnload", self, self.ModuleUnload )
end



function woet:ModulesLoad()
    Events:FireRegisteredEvent( "HelpAddItem",
        {
            name = "Woet",
            text =
                 "Enter the command /woet in chat to get your land, sea or air" ..
                 " vehicle to barrel roll.\n" ..
                 "Useful to shake of unwanted hitchhikers.\n \n" ..
                 "Named after the JC-MP mod developer of the same name."
        } )
end

function woet:ModuleUnload()
    Events:FireRegisteredEvent( "HelpRemoveItem",
        {
            name = "Woet"
        } )
end

woet = woet()

« Last Edit: December 21, 2013, 08:48:10 pm by Darwood37 »

SonnySalieri

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Re: /woet script
« Reply #6 on: January 03, 2014, 02:06:13 pm »
Is the "advanced version" of this also released that has /woet2 and /woet3 in it?