<div><b><font size="4"><font face="Tahoma">Ready Up - Reloaded<br /></font></font></b><font size="4"><font face="Tahoma"><font size="2">alpha version<br /><br /><br /><b>IMPORTANT INFORMATION: </b>This is an alpha release. It is untested; I don't have a left 4 dead 2 server or the game installed. Any server operators who can help to test the plugin and report errors would be greatly appreciated! This is my first plugin and is based off of source code from both Downtown1's ready up and Skyy's ready up.<br /><br /><b>Description: </b>After seeing a demand for a ready up type of plugin still for left 4 dead 2, and both versions I found abandoned, I decided to try to write my own. This plugin should correct many of the problems with other ready up plugins, at least when it is no longer in alpha or beta version.<br /><br /><b>Installation:</b> My plugin has only one dependency. You must have Left 4 Downtown 2, and you can get it over here: <a href="https://forums.allie...d.php?t=134032"target="_blank">https://forums.allie...t=134032</a><br />Download the readyup-reloaded_alpha.zip located at the bottom of this post, and extract the contents to /left4dead2/addons/sourcemod/<br />Plugin directories have already been setup to mirror the sourcemod installation directory.<br /><br /><b>Usage:</b> The Ready Up Reloaded plugin consists of a core file that provides a few natives. It also has some functionality in case there are no other plugins running that are utilizing ready up natives. The order is as follows without any plugins altering its course:<br /><br />OnFirstClientLoaded() -> OnAllClientsLoaded() -> OnReadyUpStart()* -> OnReadyUpEnd()* -> OnRoundStart() -> OnRoundEnd() -> OnMapAboutToEnd()**<br />*Two forwards can be forced at any time (as long as they have not fired, yet) by another plugin. These are OnReadyUpStart, which can be called even before OnFirstClientLoaded, and OnReadyUpEnd, which can only be called once OnReadyUpStart has fired.<br />**OnMapAboutToEnd fires immediately after OnRoundEnd if it's the last round of the map or when the survivors in coop have successfully completed the map.<br />Please Note: OnReadyUpStart automatically triggers when the round resets; the teams swap in versus, or all players respawn in coop.<br /><br /><b>Plugins: </b>The following plugins use the natives and forwards in this plugin, so they require it to work. They are both in the zip on this post. I have also included my own version of a dynamic server slot plugin, that does not require this plugin or any other plugin to work.<br /><br /><u>Ready Up - Timer</u> - Adds a timer to the pre-game ready up period to determine when ready up ends. It will create a config in /cfg/sourcemod/<br /><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">Code:</div>
<hr /><code style="margin:0px" dir="ltr" style="text-align:left">sm_readyup_timer_pregame - how many seconds (integer) until ready up period is ended after all players join the game.<br />sm_readyup_timer_readyup - if it is 1 then players can say !ready to toggle their ready status from on and off. Otherwise they have to wait the entire pregame time.</code><hr />
</div><u>Ready Up - Rotation</u> - Adds a map rotation to the server. It also includes an option to enable/disable player map voting during the finale. It requires an already-existing config in /left4dead2/addons/sourcemod/configs/ named rur_rotation.cfg<br /><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">Code:</div>
<hr /><code style="margin:0px" dir="ltr" style="text-align:left">rur_maprotation_voting - if 1, voting for the next campaign is allowed using !mapvote, otherwise the next campaign will be in the rotation. Voting can occur at any time during the final level of a campaign, and players can recast their ballot at any time.</code><hr />
</div><u>Dynamic Slots</u> - Will alter the available and maximum slots on the server when a player connects or leaves the server. It does not require ready up reloaded or any other plugin to work.<br /><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">Code:</div>
<hr /><code style="margin:0px" dir="ltr" style="text-align:left">sm_dynamicslots_playable - the number of players who can actually play in the server. It adds spectator count to this.<br />sm_dynamicslots_kicking - if 1, we kick the player with the shortest play time, otherwise the player with the longest playtime.</code><hr />
</div><b>Forwards:</b> My plugin provides several useful (to left 4 dead 2) natives and forwards for left4dead2 plugin developers. I've copied the readyup.inc file to list them below.<br /><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">/*<br /> *<br /> * This forward is triggered, immediately, when any survivor player leaves the safe area<br /> * for the first time, but ONLY after OnReadyUpEnd has fired. Otherwise the player will just be<br /> * teleported back into the safe area.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnRoundStart</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * When the survivors successfully clear a level in campaign, as well as when a round ends<br /> * in versus or survival, this forward will be called.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnRoundEnd</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Triggers when the first connected user triggers OnClientPostAdminCheck on a new map.<br /> * This will only trigger ONE TIME per map, and will not trigger for a user that disconnects<br /> * prior to this stage.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnFirstClientLoaded</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Triggers when the last connecting client successfully clears OnClientPostAdminCheck. When<br /> * a client disconnects from the server, if OnAllClientsLoaded hasn't already been called, it<br /> * will check to see if all clients have loaded.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnAllClientsLoaded</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * This forward is triggered when all clients have successfully loaded or, in versus game-types<br /> * after a round ends, and when teams have switched sides. This forward fires BEFORE OnRoundStart().<br /> * NOTE: This forward can be forced by another plugin using the OnReadyUpStartEx native, and can be<br /> * forced at any time, even before OnFirstClientLoaded has fired.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnReadyUpStart</span><span style="color: #007700">();<br /><br /> </span><span style="color: #FF8000">/*<br /> *<br /> * This forward is fired when the first survivor player leaves the safe area AFTER OnReadyUpEnd has fired.<br /> * Note: It will ALWAYS fire before OnRoundStart, but immediately before if the core plugin is allowed to fire<br /> * OnReadyUpEnd. However, if another plugin called OnReadyUpEndBlock, this forward will only fire when<br /> * another plugin calls it, so it's important that a plugin actually call it if the core plugin is blocked<br /> * from calling it, itself, otherwise the ready up period will never end.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnReadyUpEnd</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * This forward is called when the last round is completed on a map in versus, or when the survivors in coop<br /> * successfully clear the level.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnMapAboutToEnd</span><span style="color: #007700">();
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div><b>Natives:</b><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">/*<br /> *<br /> * This native allows a plugin to force OnreadyUpStart to fire in the core plugin.<br /> * Note: Forcing it in this way only works if it hasn't already been called by the core plugin.<br /> *<br /> */<br /> </span><span style="color: #0000BB">native OnReadyUpStartEx</span><span style="color: #007700">();<br /><br /> </span><span style="color: #FF8000">/*<br /> *<br /> * This native allows a plugin to force OnReadyUpEnd to fire. This is useful if a plugin has disabled the core plugins<br /> * ability to fire OnReadyUpEnd. Correction, it's not useful in this scenario, it's required.<br /> *<br /> */<br /> </span><span style="color: #0000BB">native OnReadyUpEndEx</span><span style="color: #007700">();<br /><br /> </span><span style="color: #FF8000">/*<br /> *<br /> * This native allows a plugin to prevent the core ready up plugin from being able to end the ready up period. This means<br /> * that another plugin must call OnReadyUpEndEx to end the ready up period at some point, or the round will obviously never begin.<br /> *<br /> */<br /> </span><span style="color: #0000BB">native OnReadyUpEndBlock</span><span style="color: #007700">();<br /><br /> </span><span style="color: #FF8000">/*<br /> *<br /> * No explanation needed, here... It really just gives the ready up core plugin back the ability to end the ready up period without<br /> * another plugin having to force it to fire. If a plugin takes away ready up core's ability to do this, it's important to call this<br /> * native if a plugin that blocks it unloads, for any reason.<br /> *<br /> */<br /> </span><span style="color: #0000BB">native OnReadyUpEndAllow</span><span style="color: #007700">();
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div><b>Other Notes / Extra Reminders:</b> I wait for feedback from whether it works or not. If problems, please attach as a file (please do not paste into message) the error log as text. Thank you!<br /></font></font></font></div>
<br /> <div style="padding:6px">
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/zip.gif"alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...d_alpha.zip</a>(48.2 KB)
</td>
</tr>
</table>
</fieldset>
</div>
Wyświetl pełny artykuł
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
![Zdjęcie](https://amxx.pl/uploads/av-1.jpg?_r=0)
[L4D2] - ready up reloaded
Temat rozp. Adminek AMXX.PL, 20.10.2015 20:32
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych