hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.07.05. 11:15



Jelenlévő felhasználók

Jelenleg 355 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 353 vendég

A legtöbb felhasználó (2761 fő) 2025.01.09. 20:06-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot], Google [Bot]az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása Hozzászólás a témához  [14 hozzászólás ]  Oldal12Következő
Szerző Üzenet
 Hozzászólás témája: Nincs körvég
HozzászólásElküldve:2012.07.24. 19:56 
Offline
Őskövület
Avatar

Csatlakozott:2013.01.01. 17:48
Hozzászólások:2441
Megköszönt másnak: 18 alkalommal
Megköszönték neki: 21 alkalommal
Üdv.!

Valaki ezt át tudná nekem írni, hogy non steamot is engedjen?
Nagyon kéne!

Köszönöm aki megcsinálja!
SMA:
Kód:
  1.  

  2.    /* - - - - - - - - - - -

  3.  

  4.         AMX Mod X script.

  5.  

  6.           | Author  : Arkshine

  7.           | Plugin  : Infinite Round

  8.           | Version : v1.0.0

  9.  


  10.  

  11.         This plugin is free software; you can redistribute it and/or modify it

  12.         under the terms of the GNU General Public License as published by the

  13.         Free Software Foundation; either version 2 of the License, or (at

  14.         your option) any later version.

  15.  

  16.         This plugin is distributed in the hope that it will be useful, but

  17.         WITHOUT ANY WARRANTY; without even the implied warranty of

  18.         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

  19.         General Public License for more details.

  20.  

  21.         You should have received a copy of the GNU General Public License

  22.         along with this plugin; if not, write to the Free Software Foundation,

  23.         Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  24.  

  25.         ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

  26.  

  27.         Description :

  28.         - - - - - - -

  29.             With this plugin the round never ends whatever the situation.

  30.             It doesn't use bots like others plugins, it just blocks some CS functions.

  31.  

  32.  

  33.         Requirement :

  34.         - - - - - - -

  35.             * CS 1.6 / CZ(?).

  36.             * AMX Mod X 1.8.x or higher.

  37.             * Orpheu 2.1 and higher.

  38.  

  39.            

  40.         Command :

  41.         - - - - -

  42.             * infiniteround_toggle <0|1> // Toggle the plugin state. Enable/disable properly the forward and memory patch.

  43.            

  44.            

  45.         Changelog :

  46.         - - - - - -

  47.             v1.0.0 : [ 4 jan 2010 ]

  48.  

  49.                 (+) Initial release.

  50.                

  51.         Notes :

  52.         - - - -

  53.             * It was not tested under CZ on windows, if someone could confirm it works, I will appreciate.

  54.             * The next version I will probably add a feature to hide the timer or to synchronize it with mp_timelimit if value not > 99.

  55.             * Such plugin is useful only in deathmatch environment where players respawn infinitely.

  56.  

  57.     - - - - - - - - - - - */

  58.  

  59.     #include <amxmodx>

  60.     #include <amxmisc>

  61.     #include <orpheu>

  62.     #include <orpheu_memory>

  63.  

  64.    

  65.     /* PLUGIN INFORMATIONS */

  66.    

  67.         #define PLUGIN_NAME     "Infinite Round"

  68.         #define PLUGIN_VERSION  "1.0.0"

  69.         #define PLUGIN_AUTHOR   "Arkshine"

  70.        

  71.    

  72.     /* ORPHEU HOOK HANDLES */

  73.  

  74.         new OrpheuHook:handleHookCheckMapConditions;

  75.         new OrpheuHook:handleHookCheckWinConditions;

  76.         new OrpheuHook:handleHookHasRoundTimeExpired;

  77.  

  78.  

  79.     /* CONSTANTS */

  80.  

  81.         new memoryIdentifierRoundTime[] = "roundTimeCheck";

  82.  

  83.         enum /* plugin state */

  84.         {

  85.             DISABLED = 0,

  86.             ENABLED

  87.         };

  88.  

  89.  

  90.     /*  VARIABLES */

  91.  

  92.         new currentPluginState = ENABLED;

  93.         new bool:isLinuxServer;

  94.  

  95.  

  96.     public plugin_init()

  97.     {

  98.         register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );

  99.         register_cvar( "infiniteround_version", PLUGIN_VERSION, FCVAR_SERVER | FCVAR_SPONLY );

  100.        

  101.         register_concmd( "infiniteround_toggle", "ConsoleCommand_TogglePlugin", ADMIN_RCON, "<0|1> - Toggle plugin state" );

  102.  

  103.         isLinuxServer = bool:is_linux_server();

  104.  

  105.         state disabled;

  106.         EnableForwards();

  107.     }

  108.  

  109.  

  110.     /**

  111.      *  Command to toggle the plugin state,

  112.      *  then to enable/disable properly the forwards used.

  113.      */

  114.     public ConsoleCommand_TogglePlugin ( const player, const level, const cid )

  115.     {

  116.         if ( cmd_access( player, level, cid, 2 ) )

  117.         {

  118.             new newPluginState[ 2 ];

  119.             read_argv( 1, newPluginState, charsmax( newPluginState ) );

  120.  

  121.             new statePluginWanted = clamp( str_to_num( newPluginState ), DISABLED, ENABLED );

  122.  

  123.             switch ( statePluginWanted )

  124.             {

  125.                 case DISABLED : DisableForwards();

  126.                 case ENABLED  : EnableForwards();

  127.             }

  128.  

  129.             new message[ 128 ];

  130.  

  131.             ( currentPluginState == statePluginWanted ) ?

  132.  

  133.                 formatex( message, charsmax( message ), "%s", statePluginWanted ? "Plugin already enabled!" : "Plugin already disabled!" ) :

  134.                 formatex( message, charsmax( message ), "%s", statePluginWanted ? "Plugin is now enabled!"  : "Plugin is now disabled!"  );

  135.  

  136.             ( player ) ?

  137.  

  138.                 console_print( player, message ) :

  139.                 server_print( message );

  140.  

  141.             currentPluginState = statePluginWanted;

  142.         }

  143.  

  144.         return PLUGIN_HANDLED;

  145.     }

  146.  

  147.  

  148.     /**

  149.      *  The plugin was disabled. A user has enabled the plugin with the command.

  150.      *  Enable properly all the forwards and patch the memory for windows only.

  151.      */

  152.     public EnableForwards () <> {}

  153.     public EnableForwards () <disabled>

  154.     {

  155.         handleHookCheckMapConditions = OrpheuRegisterHook( OrpheuGetFunction( "CheckMapConditions" , "CHalfLifeMultiplay" ), "CheckConditions" );

  156.         handleHookCheckWinConditions = OrpheuRegisterHook( OrpheuGetFunction( "CheckWinConditions" , "CHalfLifeMultiplay" ), "CheckConditions" );

  157.  

  158.         if ( isLinuxServer )

  159.         {

  160.             handleHookHasRoundTimeExpired = OrpheuRegisterHook( OrpheuGetFunction( "HasRoundTimeExpired" , "CHalfLifeMultiplay" ), "CheckConditions" );

  161.         }

  162.         else

  163.         {

  164.             /*

  165.                 | Windows - CHalfLifeMultiplay::HasRoundTimeExpired() is somehow integrated in CHalfLifeMultiplay::Think(),

  166.                 | we must patch soem byte directly into this funtion to avoid the check. Ugly trick but no choice.

  167.                 | 0x90 = NOP = does nothing. Don't modify the values.

  168.             */

  169.  

  170.             BytesToReplace( memoryIdentifierRoundTime, { 0x90, 0x90, 0x90 } );

  171.         }

  172.  

  173.         state enabled;

  174.     }

  175.  

  176.  

  177.     /**

  178.      *  The plugin was enabled. A user has disabled the plugin with the command.

  179.      *  Disable properly all the forwards and patch the memory for windows only.

  180.      */

  181.     public DisableForwards () <> {}

  182.     public DisableForwards () <enabled>

  183.     {

  184.         OrpheuUnregisterHook( handleHookCheckMapConditions );

  185.         OrpheuUnregisterHook( handleHookCheckWinConditions );

  186.  

  187.         if ( isLinuxServer )

  188.         {

  189.             OrpheuUnregisterHook( handleHookHasRoundTimeExpired );

  190.         }

  191.         else

  192.         {

  193.             /*

  194.                 | Windows - We restore the original value.

  195.                 | We restart to reinitialize the game.

  196.                 | Don't modify the values.

  197.             */

  198.  

  199.             BytesToReplace( memoryIdentifierRoundTime, { 0xF6, 0xC4, 0x41 } );

  200.         }

  201.  

  202.         state disabled;

  203.     }

  204.  

  205.  

  206.     /**

  207.      *  Block CHalfLifeMultiplay::CheckMapConditions() and CHalfLifeMultiplay::CheckWinConditions(),

  208.      *  and CHalfLifeMultiplay::HasRoundTimeExpired() so the round won't stop whatever the situation.

  209.      */

  210.     public OrpheuHookReturn:CheckConditions () <> { return OrpheuIgnored; }

  211.     public OrpheuHookReturn:CheckConditions () <enabled>

  212.     {

  213.         OrpheuSetReturn( false );

  214.         return OrpheuSupercede;

  215.     }

  216.  

  217.  

  218.     /**

  219.      *  Replace at a specific memory address a value byte by byte.

  220.      *

  221.      *  @param identifier       The name of the block that qualifies memory.

  222.      *  @param bytes            The bytes we want to patch.

  223.      */

  224.     stock BytesToReplace ( identifier[], const bytes[], const bytesLength = sizeof bytes )

  225.     {

  226.         new address;

  227.         OrpheuMemoryGet( identifier, address );

  228.  

  229.         for ( new i; i < bytesLength; i++)

  230.         {

  231.             OrpheuMemorySetAtAddress( address, "roundTimeCheck|dummy", 1, bytes[ i ], address );

  232.             address++;

  233.         }

  234.  

  235.         /*

  236.             | It needs to reiniatiliaze some things.

  237.         */

  238.         server_cmd( "sv_restart 1" );

  239.     }

  240.  


A hozzászólást 1 alkalommal szerkesztették, utoljára oroszrulett 2012.07.25. 18:26-kor.
SMA


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nincs körvég
HozzászólásElküldve:2012.07.24. 20:01 
Offline
Developer
Avatar

Csatlakozott:2011.06.01. 21:11
Hozzászólások:7966
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 537 alkalommal
Felengedi!

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nincs körvég
HozzászólásElküldve:2012.07.25. 07:50 
Offline
Signore Senior
Avatar

Csatlakozott:2011.09.09. 17:39
Hozzászólások:4020
Megköszönt másnak: 12 alkalommal
Megköszönték neki: 139 alkalommal
Ez csak egy sima orpheu based plugin. Simán engedi NS-eket is.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nincs körvég
HozzászólásElküldve:2012.07.25. 11:14 
Offline
Őskövület
Avatar

Csatlakozott:2013.01.01. 17:48
Hozzászólások:2441
Megköszönt másnak: 18 alkalommal
Megköszönték neki: 21 alkalommal
:O

"Requirements top
CS 1.6, CZ.
AMX Mod X 1.8.x or higher.
Orpheu 2.1 and higher.
Steam server."

Steam server
Steam serve
Steam ser
Steam se
Steam s
Steam
Steam
Steam...


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nincs körvég
HozzászólásElküldve:2012.07.25. 11:37 
Offline
Signore Senior
Avatar

Csatlakozott:2011.09.09. 17:39
Hozzászólások:4020
Megköszönt másnak: 12 alkalommal
Megköszönték neki: 139 alkalommal
Kód:
  1.         Requirement :

  2.         - - - - - - -

  3.             * CS 1.6 / CZ(?).

  4.             * AMX Mod X 1.8.x or higher.

  5.             * Orpheu 2.1 and higher.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nincs körvég
HozzászólásElküldve:2012.07.25. 12:46 
Offline
Őskövület
Avatar

Csatlakozott:2013.01.01. 17:48
Hozzászólások:2441
Megköszönt másnak: 18 alkalommal
Megköszönték neki: 21 alkalommal
Betettem és bad load.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nincs körvég
HozzászólásElküldve:2012.07.25. 12:46 
Offline
Developer
Avatar

Csatlakozott:2011.06.01. 21:11
Hozzászólások:7966
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 537 alkalommal
Bence98007 írta:
Betettem és bad load.


Log?

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nincs körvég
HozzászólásElküldve:2012.07.25. 12:47 
Offline
Őskövület
Avatar

Csatlakozott:2013.01.01. 17:48
Hozzászólások:2441
Megköszönt másnak: 18 alkalommal
Megköszönték neki: 21 alkalommal
semmit nem ír csak bad loadot de megpróbálom megint


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nincs körvég
HozzászólásElküldve:2012.07.25. 12:49 
Offline
Signore Senior
Avatar

Csatlakozott:2011.09.09. 17:39
Hozzászólások:4020
Megköszönt másnak: 12 alkalommal
Megköszönték neki: 139 alkalommal
Forgasd újra sma fájlt.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nincs körvég
HozzászólásElküldve:2012.07.25. 15:48 
Offline
Őskövület
Avatar

Csatlakozott:2013.01.01. 17:48
Hozzászólások:2441
Megköszönt másnak: 18 alkalommal
Megköszönték neki: 21 alkalommal
De nem tom újra forgatni, mer nincs inculdem hozzá...


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése: Rendezés 
Új téma nyitása Hozzászólás a témához  [14 hozzászólás ]  Oldal12Következő


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 2 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole