hlmod.hu

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



Jelenlévő felhasználók

Jelenleg 371 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 370 vendég

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

Regisztrált felhasználók: 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  [5 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Infinite Round
HozzászólásElküldve:2012.09.14. 15:17 
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.!

Erre a pluginra ezt dobja:

[AMXX] Failed to allocate memory (plugin "infinite_round.amxx")
L 09/14/2012 - 15:03:09: [ORPHEU] Function "InstallGameRules" not found
Load fails: Invalid Plugin (plugin "infinite_round.amxx")

Orpheu bennt van, de nem tölti be a plugin, bad loadot ír rá.
Plugin smája:
SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. /* - - - - - - - - - - -
  3.  
  4.   AMX Mod X script.
  5.  
  6.   | Author : Arkshine
  7.   | Plugin : Infinite Round
  8.   | Version : v1.0.1
  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.1 : [ 6 feb 2010 ]
  48.  
  49.   (*) Changed minor things.
  50.  
  51.   v1.0.0 : [ 4 feb 2010 ]
  52.  
  53.   (+) Initial release.
  54.  
  55.  
  56.   Notes :
  57.   - - - -
  58.   * The next version I will probably add a feature to hide the timer or to synchronize it with mp_timelimit if value not > 99.
  59.   * Such plugin is useful only in deathmatch environment where players respawn infinitely.
  60.  
  61.   - - - - - - - - - - - */
  62.  
  63. #include <amxmodx>
  64. #include <amxmisc>
  65. #include <orpheu>
  66. #include <orpheu_memory>
  67.  
  68.  
  69. /* PLUGIN INFORMATIONS */
  70.  
  71. #define PLUGIN_NAME "Infinite Round"
  72. #define PLUGIN_VERSION "1.0.1"
  73. #define PLUGIN_AUTHOR "Arkshine"
  74.  
  75.  
  76. /* ORPHEU HOOK HANDLES */
  77.  
  78. new OrpheuHook:handleHookCheckMapConditions;
  79. new OrpheuHook:handleHookCheckWinConditions;
  80. new OrpheuHook:handleHookHasRoundTimeExpired;
  81.  
  82.  
  83. /* CONSTANTS */
  84.  
  85. new memoryIdentifierRoundTime[] = "roundTimeCheck";
  86.  
  87. enum /* plugin state */
  88. {
  89. DISABLED = 0,
  90. ENABLED
  91. };
  92.  
  93.  
  94. /* VARIABLES */
  95.  
  96. new currentPluginState = ENABLED;
  97. new bool:isLinuxServer;
  98.  
  99.  
  100. public plugin_init()
  101. {
  102. register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
  103. register_cvar( "infiniteround_version", PLUGIN_VERSION, FCVAR_SERVER | FCVAR_SPONLY );
  104.  
  105. register_concmd( "infiniteround_toggle", "ConsoleCommand_TogglePlugin", ADMIN_RCON, "<0|1> - Toggle plugin state" );
  106.  
  107. isLinuxServer = bool:is_linux_server();
  108.  
  109. state disabled;
  110. EnableForwards();
  111. }
  112.  
  113.  
  114. /**
  115.   * Command to toggle the plugin state,
  116.   * then to enable/disable properly the forwards used.
  117.   */
  118. public ConsoleCommand_TogglePlugin ( const player, const level, const cid )
  119. {
  120. if ( cmd_access( player, level, cid, 2 ) )
  121. {
  122. new newPluginState[ 2 ];
  123. read_argv( 1, newPluginState, charsmax( newPluginState ) );
  124.  
  125. new statePluginWanted = clamp( str_to_num( newPluginState ), DISABLED, ENABLED );
  126.  
  127. switch ( statePluginWanted )
  128. {
  129. case DISABLED : DisableForwards();
  130. case ENABLED : EnableForwards();
  131. }
  132.  
  133. ( currentPluginState == statePluginWanted ) ?
  134.  
  135. console_print( player, "%s", statePluginWanted ? "Plugin already enabled!" : "Plugin already disabled!" ) :
  136. console_print( player, "%s", statePluginWanted ? "Plugin is now enabled!" : "Plugin is now disabled!" );
  137.  
  138. currentPluginState = statePluginWanted;
  139. }
  140.  
  141. return PLUGIN_HANDLED;
  142. }
  143.  
  144.  
  145. /**
  146.   * The plugin was disabled. A user has enabled the plugin with the command.
  147.   * Enable properly all the forwards and patch the memory for windows only.
  148.   */
  149. public EnableForwards () <> {}
  150. public EnableForwards () <disabled>
  151. {
  152. handleHookCheckMapConditions = OrpheuRegisterHook( OrpheuGetFunction( "CheckMapConditions" , "CHalfLifeMultiplay" ), "CheckConditions" );
  153. handleHookCheckWinConditions = OrpheuRegisterHook( OrpheuGetFunction( "CheckWinConditions" , "CHalfLifeMultiplay" ), "CheckConditions" );
  154.  
  155. if ( isLinuxServer )
  156. {
  157. handleHookHasRoundTimeExpired = OrpheuRegisterHook( OrpheuGetFunction( "HasRoundTimeExpired" , "CHalfLifeMultiplay" ), "CheckConditions" );
  158. }
  159. else
  160. {
  161. /*
  162.   | Windows - CHalfLifeMultiplay::HasRoundTimeExpired() is somehow integrated in CHalfLifeMultiplay::Think(),
  163.   | we must patch some bytes directly into this function to avoid the check. Ugly trick but no choice.
  164.   | 0x90 = NOP = does nothing. Don't modify the values.
  165.   */
  166.  
  167. BytesToReplace( memoryIdentifierRoundTime, { 0x90, 0x90, 0x90 } );
  168. }
  169.  
  170. state enabled;
  171. }
  172.  
  173.  
  174. /**
  175.   * The plugin was enabled. A user has disabled the plugin with the command.
  176.   * Disable properly all the forwards and patch the memory for windows only.
  177.   */
  178. public DisableForwards () <> {}
  179. public DisableForwards () <enabled>
  180. {
  181. OrpheuUnregisterHook( handleHookCheckMapConditions );
  182. OrpheuUnregisterHook( handleHookCheckWinConditions );
  183.  
  184. if ( isLinuxServer )
  185. {
  186. OrpheuUnregisterHook( handleHookHasRoundTimeExpired );
  187. }
  188. else
  189. {
  190. /*
  191.   | Windows - We restore the original value.
  192.   | We restart to reinitialize the game.
  193.   | Don't modify the values.
  194.   */
  195.  
  196. BytesToReplace( memoryIdentifierRoundTime, { 0xF6, 0xC4, 0x41 } );
  197. }
  198.  
  199. state disabled;
  200. }
  201.  
  202.  
  203. /**
  204.   * Block CHalfLifeMultiplay::CheckMapConditions(), CHalfLifeMultiplay::CheckWinConditions()
  205.   * and CHalfLifeMultiplay::HasRoundTimeExpired() so the round won't stop whatever the situation.
  206.   */
  207. public OrpheuHookReturn:CheckConditions () <> { return OrpheuIgnored; }
  208. public OrpheuHookReturn:CheckConditions () <enabled>
  209. {
  210. OrpheuSetReturn( false );
  211. return OrpheuSupercede;
  212. }
  213.  
  214.  
  215. /**
  216.   * Replace at a specific memory address a value byte by byte.
  217.   *
  218.   * @param identifier The name of the block that qualifies memory.
  219.   * @param bytes The bytes we want to patch.
  220.   */
  221. stock BytesToReplace ( identifier[], const bytes[], const bytesLength = sizeof bytes )
  222. {
  223. new address;
  224. OrpheuMemoryGet( identifier, address );
  225.  
  226. for ( new i; i < bytesLength; i++)
  227. {
  228. OrpheuMemorySetAtAddress( address, "roundTimeCheck|dummy", 1, bytes[ i ], address );
  229. address++;
  230. }
  231.  
  232. /*
  233.   | It needs to reiniatiliaze some things.
  234.   */
  235. server_cmd( "sv_restart 1" );
  236. }
  237.  


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Infinite Round
HozzászólásElküldve:2012.09.14. 15:27 
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
Idézet:
L 09/14/2012 - 15:03:09: [ORPHEU] Function "InstallGameRules" not found

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Infinite Round
HozzászólásElküldve:2012.09.14. 15:28 
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
bennt van.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Infinite Round
HozzászólásElküldve:2012.09.14. 16:19 
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
Akkor menni fog:)

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Infinite Round
HozzászólásElküldve:2012.09.14. 16:29 
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
Mostmár megy :D


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  [5 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 6 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