<!-- 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, "true", 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 <dbsi></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 /> * Set vaule of text to table in database.<br /> *<br /> * @param table Table name<br /> * @param client Client index<br /> * @param fmt Information for store<br /> * @noreturn<br /> * @error Failed to query<br /> */<br />native SQL_Write(const String:table[], client, const String:fmt[], any:...);<br /><br />/**<br /> * Get vaule of text from table in database.<br /> *<br /> * @param table Table name<br /> * @param client Client index<br /> * @param text Buffer to store information<br /> * @param maxlength Maximum length of string buffer<br /> * @noreturn<br /> * @error Failed to query<br /> */<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ł
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

[Any] Database Simple Interface (v1.0, 2014-11-27)
Temat rozp. Adminek AMXX.PL, 27.11.2014 20:53
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych