ItsMods

Full Version: Thirdperson plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Good job


(01-06-2012, 13:38)Pozzuh Wrote: [ -> ]Good job



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

bysides that, nice and simple.
(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
Here's one that forces thirdperson for the whole server

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Addon;
  6.  
  7. namespace mw3_svr_3rdperson
  8. {
  9. public class Class1 : CPlugin
  10. {
  11. int Timer = 0;
  12. public override void OnServerLoad()
  13. {
  14. ServerPrint( "3rd Person Mode Loaded." );
  15. SetDvar( "scr_thirdperson", "1" );
  16. SetDvar( "cg_thirdperson", "1" );
  17. }
  18.  
  19. public override void OnServerFrame()
  20. {
  21. if ( Timer++ == 5000 )
  22. {
  23. foreach( ServerClient client in GetClients() )
  24. SetClientDvar( client.ClientNum, "cg_thirdperson \"1\"" );
  25.  
  26. if ( GetDvar( "scr_thirdperson" ) != "1" )
  27. {
  28. SetDvar( "scr_thirdperson", "1" );
  29. SetDvar( "cg_thirdperson", "1" );
  30. }
  31.  
  32. Timer = 0;
  33. }
  34. }
  35. }
  36. }
here's one that does exactly the same as the post above me

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Addon;
  6.  
  7. namespace mw3_svr_3rdperson
  8. {
  9. public class Class1 : CPlugin
  10. {
  11. public override void OnServerLoad()
  12. {
  13. ServerPrint( "3rd Person Mode Loaded." );
  14. SetDvar( "scr_thirdperson", "1" );
  15. }
  16. }
  17. }
(01-06-2012, 14:08)jariz Wrote: [ -> ]here's one that does exactly the same as the post above me

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Addon;
  6.  
  7. namespace mw3_svr_3rdperson
  8. {
  9. public class Class1 : CPlugin
  10. {
  11. public override void OnServerLoad()
  12. {
  13. ServerPrint( "3rd Person Mode Loaded." );
  14. SetDvar( "scr_thirdperson", "1" );
  15. }
  16. }
  17. }

Hmm true, but does that actually work? :o
Yes, tested it a few days ago just type "scr_thirdperson 1;map_restart" and your server is thirdperson without any plugins
(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
Pages: 1 2