Release Thirdperson plugin
#1
Rainbow 
Hey guys,

This is my first plugin, you can toggle thirdperson view by !thirdperson X
X = 1 - Enable
X = 0 - Disable

Created by me, thanks to Jariz for small tuts about C#

Fixed:


.rar   3rdperson_plug.rar (Size: 2.16 KB / Downloads: 147)

SOURCE: C#

Code:
using Addon; using System.Collections.Generic; namespace plugin_test { public class plugin_test : CPlugin { public override void OnServerLoad() { ServerPrint("\n THIRDPERSON PLUGIN LOADED \n AUTHOR: x7'se7en"); } public override ChatType OnSay(string Message, ServerClient Client) { List<string> lines = new List<string>(); if (Message.StartsWith("!thirdperson")) { if (Message.Substring(13) == "1") { SetClientDvar(Client.ClientNum, "cg_thirdPerson \"1\""); TellClient(Client.ClientNum, "^3Thirdperson enabled.", true); } else if (Message.Substring(13) == "0") { SetClientDvar(Client.ClientNum, "cg_thirdPerson \"0\""); TellClient(Client.ClientNum, "^3Thirdperson disabled.", true); } if (Message.Substring(13) != "0" && Message.Substring(13) != "1") { TellClient(Client.ClientNum, "^1Wrong value", true); } } return ChatType.ChatContinue; } } }

C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#2
Good job


[Image: MaEIQ.png]
Reply

#3
(01-06-2012, 13:38)Pozzuh Wrote: Good job



posted for you Superman
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#4
Why did you put in the list<t>? :p
also you won't need System.Net

bysides that, nice and simple.
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#5
(01-06-2012, 13:48)iAegle Wrote: Why did you put in the list<t>? :p
also you won't need System.Net

bysides that, nice and simple.

thats was in my test plugin, forgot to delete
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#6
Here's one that forces thirdperson for the whole server

Code:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Addon; namespace mw3_svr_3rdperson { public class Class1 : CPlugin { int Timer = 0; public override void OnServerLoad() { ServerPrint( "3rd Person Mode Loaded." ); SetDvar( "scr_thirdperson", "1" ); SetDvar( "cg_thirdperson", "1" ); } public override void OnServerFrame() { if ( Timer++ == 5000 ) { foreach( ServerClient client in GetClients() ) SetClientDvar( client.ClientNum, "cg_thirdperson \"1\"" ); if ( GetDvar( "scr_thirdperson" ) != "1" ) { SetDvar( "scr_thirdperson", "1" ); SetDvar( "cg_thirdperson", "1" ); } Timer = 0; } } } }


Attached Files
.rar   Debug.rar (Size: 56.23 KB / Downloads: 64)
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#7
here's one that does exactly the same as the post above me

Code:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Addon; namespace mw3_svr_3rdperson { public class Class1 : CPlugin { public override void OnServerLoad() { ServerPrint( "3rd Person Mode Loaded." ); SetDvar( "scr_thirdperson", "1" ); } } }
Reply

#8
(01-06-2012, 14:08)jariz Wrote: here's one that does exactly the same as the post above me

Code:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Addon; namespace mw3_svr_3rdperson { public class Class1 : CPlugin { public override void OnServerLoad() { ServerPrint( "3rd Person Mode Loaded." ); SetDvar( "scr_thirdperson", "1" ); } } }

Hmm true, but does that actually work? :o
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#9
Yes, tested it a few days ago just type "scr_thirdperson 1;map_restart" and your server is thirdperson without any plugins
Reply

#10
(01-06-2012, 14:14)jariz Wrote: Yes, tested it a few days ago just type "scr_thirdperson 1;map_restart" and your server is thirdperson without any plugins

Your code without view switching like my :3
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 6,487 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 7,585 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 55,802 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 7,637 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 8,284 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 81,993 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 25,153 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 3,653 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 44,644 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 3,970 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

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