Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Advance Register System


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7174
  • Lokalizacja:AMXX.PL
Offline

Napisano 19.09.2014 23:52

<!-- BEGIN TEMPLATE: postbit_external -->
<div><font face="Lucida Sans Unicode"><br /><div align="center"><b><font size="5">Plugin Name: Advance Register System<br />Modification: Counter-Strike (Not Tested in other games)</font></b><br /><br /><b>Description:</b><br />With this plugin you can use for create others plugins using natives for save by account. Example: Bank of Ammo Packs that save by account, XPs that save by Account, etc.<br /><br /><b>Cvars:</b><br /><!-- BEGIN TEMPLATE: bbcode_code_printable -->
<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">cvar_maxchar = register_cvar(&quot;register_max_char&quot;, &quot;15&quot;)&nbsp; &nbsp; &nbsp; &nbsp; // Max of Chars for Create Account<br />cvar_minchar = register_cvar(&quot;register_min_char&quot;, &quot;3&quot;) // Min of Chars for Create Account<br />cvar_attemps = register_cvar(&quot;register_login_attemps&quot;, &quot;4&quot;) // Max Attemps Number<br />cvar_bantime = register_cvar(&quot;register_bantime&quot;, &quot;5&quot;)&nbsp; &nbsp; &nbsp; &nbsp; // Ban Time for wrong password X Times.</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable --><b>Natives and Forwards:</b><br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Spoiler</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><!-- BEGIN TEMPLATE: bbcode_code_printable -->
<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">/*<br />&nbsp; &nbsp; &nbsp; &nbsp; Description: View Player's Account<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; Example:<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new account[40]<br />&nbsp; &nbsp; &nbsp; &nbsp; get_user_account_name(id, account, charsmax(account)) // get_user_name Style<br />&nbsp; &nbsp; &nbsp; &nbsp; client_print(id, print_chat, &quot;Your Account: %s&quot;, account)<br /><br />*/<br />native get_user_account_name(index, account[], len)<br /><br />/*<br />&nbsp; &nbsp; &nbsp; &nbsp; Description: View if Player are Logged<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; Example:<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if(is_user_logged(id))<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_print(id, print_chat, &quot;You Are Logged xD&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_print(id, print_chat, &quot;You Aren't Logged xD&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br /><br />*/<br />native is_user_logged(id)<br /><br />/*<br />&nbsp; &nbsp; &nbsp; &nbsp; Description: View if Player are Logged on Steam<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; Example:<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if(is_user_logged_steam(id))<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_print(id, print_chat, &quot;You Are Logged on Steam xD&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_print(id, print_chat, &quot;You Aren't Logged on Steam xD&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br /><br />*/<br />native is_user_logged_steam(id)<br /><br />forward user_logged_pre(id)&nbsp; &nbsp; &nbsp; &nbsp; // Executes when the person is Almost Logged<br />forward user_logged_post(id)&nbsp; &nbsp; &nbsp; &nbsp; // After the person performs Login<br />forward user_logout_post(id)&nbsp; // After the Exit performs Person Account</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable --></div>
</div>
</div><br /><br /><b>How to Install:</b><br />Put the files on correct directory<br />amxmodx/plugins/advance_register_system.amxx<br />amxmodx/data/lang/advance_register_system.txt<br /><br />And open plugins.ini file and put this:<br />advance_register_system.amxx<br /><br /><b>Credits:</b><br />Odair: Author of Plugin [Before it was Ammo Pack's Bank + Register System]<br />William: For Remove Unecessary contents<br />[P]erfec[T] [S]cr[@]s[H]: For Fix Some Bugs and for Add the Natives and Lang for this plugin<br /><br /><b>Example of Plugins with Register Natives:</b><br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Spoiler</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;">Bank of Ammo Packs (Automatic):<br /><!-- BEGIN TEMPLATE: bbcode_code_printable -->
<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">#include &lt;amxmodx&gt;<br />#include &lt;fvault&gt;<br />#include &lt;advance_register_system&gt;<br />#include &lt;zombieplague&gt;<br /><br />#define PLUGIN &quot;[ZP] Register Addon: Bank of Ammo Packs&quot;<br />#define VERSION &quot;1.0&quot;<br />#define AUTHOR &quot;[P]erfec[T] [S]cr[@]s[H]&quot;<br /><br />new bank_data[] = &quot;bank_data&quot;<br /><br />public plugin_init() register_plugin(PLUGIN, VERSION, AUTHOR)<br /><br />public user_logout_post(id) zp_set_user_ammo_packs(id, 0), remove_task(id)<br />public client_putinserver(id) zp_set_user_ammo_packs(id, 0), remove_task(id)<br />public client_disconnect(id) zp_set_user_ammo_packs(id, 0), remove_task(id)<br /><br />public user_logged_post(id)<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; new account[40]; get_user_account_name(id, account, charsmax(account))<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new data[140]<br />&nbsp; &nbsp; &nbsp; &nbsp; fvault_get_data(bank_data, account, data, charsmax(data))<br />&nbsp; &nbsp; &nbsp; &nbsp; zp_set_user_ammo_packs(id, str_to_num(data))<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; save_data(id)<br />}<br /><br />public save_data(id)<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; if(!is_user_logged(id) || !is_user_connected(id)) return;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; new account[40]; get_user_account_name(id, account, charsmax(account))<br />&nbsp; &nbsp; &nbsp; &nbsp; new string[30]; num_to_str(zp_get_user_ammo_packs(id), string, charsmax(string));<br />&nbsp; &nbsp; &nbsp; &nbsp; fvault_pset_data(bank_data, account,&nbsp; string)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; set_task(5.0, &quot;save_data&quot;, id)<br />}</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->Super Hero XP Data (Save By Register Account):<br /><!-- BEGIN TEMPLATE: bbcode_code_printable -->
<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">/* Plugin generated by AMXX-Studio */<br /><br />#include &lt;amxmodx&gt;<br />#include &lt;fvault&gt;<br />#include &lt;advance_register_system&gt;<br />#include &lt;superheromod&gt;<br /><br />#define PLUGIN &quot;[SH] Register Addon: Save XP and Level&quot;<br />#define VERSION &quot;1.0&quot;<br />#define AUTHOR &quot;[P]erfec[T] [S]cr[@]s[H]&quot;<br /><br />#define TASK_AUTOSAVE 13013921<br /><br />new super_hero_data[] = &quot;super_hero_xps&quot;<br /><br />public plugin_init() register_plugin(PLUGIN, VERSION, AUTHOR)<br /><br />public client_putinserver(id) reset_vars(id)<br />public client_disconnect(id) reset_vars(id)<br />public user_logout_post(id) reset_vars(id)<br /><br />public user_logged_post(id)<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; new account[40]<br />&nbsp; &nbsp; &nbsp; &nbsp; get_user_account_name(id, account, charsmax(account))<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new szData[140]<br />&nbsp; &nbsp; &nbsp; &nbsp; if(fvault_get_data(super_hero_data, account, szData, charsmax(szData)))<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new str1[10], str2[10]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; parse(szData, str1, charsmax(str1), str2, charsmax(str2))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sh_set_user_lvl(id, str_to_num(str1))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sh_set_user_xp(id, str_to_num(str2))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_task(2.0, &quot;save_data&quot;, id+TASK_AUTOSAVE, _, _, &quot;b&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; <br />}<br /><br />public save_data(id)<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; id -= TASK_AUTOSAVE<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if(!is_user_logged(id) || !is_user_connected(id)) return PLUGIN_HANDLED<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new account[40]; get_user_account_name(id, account, charsmax(account))<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new szData[40]<br />&nbsp; &nbsp; &nbsp; &nbsp; formatex(szData, charsmax(szData), &quot;%d %d&quot;, sh_get_user_lvl(id), sh_get_user_xp(id))<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; fvault_pset_data(super_hero_data, account,&nbsp; szData)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED<br />}<br /><br />public reset_vars(id)<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; sh_set_user_lvl(id, 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; sh_set_user_xp(id, 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; remove_task(id+TASK_AUTOSAVE)<br />}</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable --></div>
</div>
</div><br /></div></font></div>


<br /> <div style="padding:6px">








<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/sma.gif" alt="File Type: sma" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>

<a href="http://www.amxmodx.o...22"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...1411167234">Get Source</a> (advance_register_system.sma - 25.3 KB)

</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/inc.gif" alt="File Type: inc" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie..._system.inc</a> (1.2 KB)


</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/txt.gif" alt="File Type: txt" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie..._system.txt</a> (6.6 KB)


</td>
</tr>
<!-- END TEMPLATE: postbit_attachment -->
</table>
</fieldset>


</div>

<!-- END TEMPLATE: postbit_external -->

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych