Skocz do zawartości

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

[Any] Database Simple Interface (v1.0, 2014-11-27)


  • 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:7 476
  • Lokalizacja:AMXX.PL
Offline

Napisano 27.11.2014 20:53

<!-- BEGIN TEMPLATE: postbit_external -->
<div><font size="5">Feature list</font><br />Adds two natives for send and get information from database.<br /><br /><font size="5">Use</font><br />Information store in varchar(1024). You can store any types of information like integer and use StringTo* functions after read from database, or bool just use StrEqual(text, &quot;true&quot;, false). Can use different tables in one plugin, but be sure that different plugins don't use the same name of table on one server (except if you do it specially).<br /><br /><font size="5">Installation</font><br />Add in you code include for SQL_Write and SQL_Read functioning.<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;dbsi&gt;</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->and add dbsi.inc in include dir inside scripting dir before compiling your plugin.<br />Do not forget put dbsi.smx in plugins dir on server where you use plugins with SQL_Write and SQL_Read application.<br /><br /><font size="5">CVAR/Command list</font><br />dbsi_confname — Config name from database.cfg for connect params. (Def: dbsi)<br /><br /><font size="5">Natives</font><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">/**<br />&nbsp;* Set vaule of text to table in database.<br />&nbsp;*<br />&nbsp;* @param table&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table name<br />&nbsp;* @param client&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Client index<br />&nbsp;* @param fmt&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Information for store<br />&nbsp;* @noreturn<br />&nbsp;* @error&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Failed to query<br />&nbsp;*/<br />native SQL_Write(const String:table[], client, const String:fmt[], any:...);<br /><br />/**<br />&nbsp;* Get vaule of text from table in database.<br />&nbsp;*<br />&nbsp;* @param table&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table name<br />&nbsp;* @param client&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Client index<br />&nbsp;* @param text&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Buffer to store information<br />&nbsp;* @param maxlength&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Maximum length of string buffer<br />&nbsp;* @noreturn<br />&nbsp;* @error&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Failed to query<br />&nbsp;*/<br />native SQL_Read(const String:table[], client, String:text[], maxlength);</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable --><font size="5">Changelog</font><br /><font size="3">2014-11-27 (v1.0)</font><ul><li>Initial release.</li>
</ul></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/sp.gif"alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="http://www.sourcemod...70"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1417117971">GetSource</a> (dbsi.sp - 5.0 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...1">dbsi.inc</a>(1.4 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