Thread Rating:
  • 3 Vote(s) - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release SpectateMod
#1
Hey guys, i made simple mod which is called SpectateMod
This plugin is for server admins and mods only,
activating this plugin will enable the admin or mode to enable the spectate mode

Changes
Code:
Now the command is only visible to the admin or mods when they type
Code:
!spectate


PHP Code:
using Addon;
using System;
namespace 
plugin_test
{
    public class 
plugin_test CPlugin
    
{
        public 
bool hud_enabled true;
        private 
ServerClient Client;
        public 
override void OnServerLoad()
        {
            
base.ServerPrint("\n NoClip Switcher plugin loaded. \n Creator: 'God Of War");
        }
        public 
override ChatType OnSay(string MessageServerClient Clientbool TeamChat)
        {
            if (
Message == "!spectate")
            {
                if (
this.hud_enabled)
                {
                    
                    
base.iPrintLnBold("^2Spectate Mode is now ^1ON"Client);
                    
Client.Other.NoClip true;
                    
this.disable2();
                }
                else
                {
                                        
base.iPrintLnBold("^2Spectate Mode is now ^1OFF"Client);
                    
Client.Other.NoClip false;
                    
this.enable2();
                }
            }
            return 
ChatType.ChatNone;
        }
        public 
void disable2()
        {
            
this.hud_enabled false;
        }
        public 
void enable2()
        {
            
this.hud_enabled true;
        }
    }



Attached Files
.rar   Spectate 1.5.rar (Size: 5.33 KB / Downloads: 225)
Reply

#2
Care to put up the source code. It seems to not work.
Reply

#3
What's so hard about switching teams? ._.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#4
(01-18-2013, 06:50)jungle Wrote: Care to put up the source code. It seems to not work.

it works, but its a kind of noclip. not to teleport somewhere.
Reply

#5
How about what it is?
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#6
http://www.itsmods.com/forum/Thread-Rele...Boxes.html
If u have the cmd !noclip so u have in this, do u know what it will do. Its same, but he did creat an HUD so say if u type !spectate one tome foes it say "spectate mode is: on" then if u write it again will it say "spectate mode is: off then the noclip is gone and u will fall if u are in air. so it works, tested it 7:30
It works fine. Smile
Reply

#7
So this is noclip with the cmd !spectate.
Code:
Client.Team == Teams.Spectator
This should set the client team to spectator.
I'm not sure if it will work but you can give it a try.
(Use it on a message)
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
Reply

#8
Just use onNotify with params....
menuresponse team_menu spectator
or
menuresponse teammenu spectator

Or just
Client.Team = teams.spect;
playersuicide <- But it won't work corretly.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#9
(01-18-2013, 15:36)SailorMoon Wrote: Just use onNotify with params....
menuresponse team_menu spectator
or
menuresponse teammenu spectator

Or just
Client.Team = teams.spect;
playersuicide <- But it won't work corretly.
Code:
PlayerSuicide(Client.Clientnum)

Will work, if it's on client message.
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
Reply

#10
(01-18-2013, 16:03)99IRock Wrote:
(01-18-2013, 15:36)SailorMoon Wrote: Just use onNotify with params....
menuresponse team_menu spectator
or
menuresponse teammenu spectator

Or just
Client.Team = teams.spect;
playersuicide <- But it won't work corretly.
Code:
PlayerSuicide(Client.Clientnum)

Will work, if it's on client message.

It works, but you can kill this player then.
I mean, enemy can't kill him, but teammate can. Some stuff is not chaning.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.