ItsMods
[Release] SpectateMod - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: [Release] SpectateMod (/Thread-Release-SpectateMod.html)

Pages: 1 2


SpectateMod - abidullah - 01-18-2013

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 Message, ServerClient Client, bool 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; } } }



RE: SpectateMod - jungle - 01-18-2013

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


RE: SpectateMod - DidUknowiPwn - 01-18-2013

What's so hard about switching teams? ._.


RE: SpectateMod - EnVi Sweden Rocks - 01-18-2013

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


RE: SpectateMod - Arteq - 01-18-2013

How about what it is?


RE: SpectateMod - EnVi Sweden Rocks - 01-18-2013

http://www.itsmods.com/forum/Thread-Release-CODE-TUT-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


RE: SpectateMod - 99IRock - 01-18-2013

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)


RE: SpectateMod - Nekochan - 01-18-2013

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.


RE: SpectateMod - 99IRock - 01-18-2013

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


RE: SpectateMod - Nekochan - 01-18-2013

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