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

[Help] top15 fvault


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

Napisano 18.12.2014 03:30

<!-- BEGIN TEMPLATE: postbit_external -->
<div>I have got the code to show fvault top 10 players, i want the plugin to show top 15 players, changes done in the code :-<br /><!-- BEGIN TEMPLATE: bbcode_php_printable -->
<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">
<br /></span><span style="color: #FF8000">#define&nbsp;MAX_BUFFER_LENGTH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3047
<br />
<br /></span><span style="color: #007700">new&nbsp;</span><span style="color: #0000BB">g_Top15Motd</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">MAX_BUFFER_LENGTH&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">]
<br />
<br /></span><span style="color: #0000BB">enum&nbsp;_</span><span style="color: #007700">:</span><span style="color: #0000BB">FvaultData&nbsp;</span><span style="color: #007700">{
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">gSteamID</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">450&nbsp;</span><span style="color: #007700">],
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">gPointsData</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">750&nbsp;</span><span style="color: #007700">]
<br />}
<br />
<br />
<br />public&nbsp;</span><span style="color: #0000BB">MakeTop15</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">id&nbsp;</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">iLen
<br />&nbsp;&nbsp;&nbsp;&nbsp;iLen&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">formatex</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">g_Top15Motd</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">MAX_BUFFER_LENGTH</span><span style="color: #007700">,
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"&lt;html&gt;&lt;head&gt;&lt;meta&nbsp;charset=^"</span><span style="color: #0000BB">UTF</span><span style="color: #007700">-</span><span style="color: #0000BB">8</span><span style="color: #007700">^</span><span style="color: #DD0000">"&gt;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;body&nbsp;bgcolor=#242424&nbsp;style=^"</span><span style="color: #0000BB">color</span><span style="color: #007700">:</span><span style="color: #FF8000">#FFF^"&gt;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">table&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">100</span><span style="color: #007700">%%&nbsp;</span><span style="color: #0000BB">cellspacing</span><span style="color: #007700">=</span><span style="color: #0000BB">0&nbsp;border</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">&gt;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">tr&nbsp;align</span><span style="color: #007700">=</span><span style="color: #0000BB">center&nbsp;bgcolor</span><span style="color: #007700">=</span><span style="color: #FF8000">#444444&gt;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">th&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">4</span><span style="color: #007700">%%&gt;</span><span style="color: #FF8000">#
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">th&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">30</span><span style="color: #007700">%%&nbsp;</span><span style="color: #0000BB">align</span><span style="color: #007700">=</span><span style="color: #0000BB">left</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Player</span><span style="color: #007700">
<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">th&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">8</span><span style="color: #007700">%%&gt;</span><span style="color: #0000BB">Kills</span><span style="color: #007700">
<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">th&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">8</span><span style="color: #007700">%%&gt;</span><span style="color: #0000BB">Deaths</span><span style="color: #007700">
<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">th&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">8</span><span style="color: #007700">%%&gt;</span><span style="color: #0000BB">HS</span><span style="color: #007700">
<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">th&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">8</span><span style="color: #007700">%%&gt;</span><span style="color: #0000BB">Knife</span><span style="color: #007700">
<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">th&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">8</span><span style="color: #007700">%%&gt;</span><span style="color: #0000BB">Grenade</span><span style="color: #007700">
<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">th&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">8</span><span style="color: #007700">%%&gt;</span><span style="color: #0000BB">Bombs</span><span style="color: #007700">
<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">th&nbsp;width</span><span style="color: #007700">=</span><span style="color: #0000BB">8</span><span style="color: #007700">%%&gt;</span><span style="color: #0000BB">Defuses</span><span style="color: #DD0000">"&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;Array:aKey&nbsp;=&nbsp;ArrayCreate(&nbsp;&nbsp;&nbsp;450&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;Array:aData&nbsp;=&nbsp;ArrayCreate(&nbsp;750&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;Array:aAll&nbsp;=&nbsp;ArrayCreate(&nbsp;FvaultData&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;fvault_load(&nbsp;g_VaultData,&nbsp;aKey,&nbsp;aData&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;iArraySize&nbsp;=&nbsp;ArraySize(&nbsp;aKey&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;Data[&nbsp;FvaultData&nbsp;]
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;i
<br />&nbsp;&nbsp;&nbsp;&nbsp;for(&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&nbsp;&lt;&nbsp;iArraySize;&nbsp;i++&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayGetString(&nbsp;aKey,&nbsp;i,&nbsp;Data[&nbsp;gSteamID&nbsp;],&nbsp;sizeof&nbsp;Data[&nbsp;gSteamID&nbsp;]&nbsp;-&nbsp;1&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayGetString(&nbsp;aData,&nbsp;i,&nbsp;Data[&nbsp;gPointsData&nbsp;],&nbsp;sizeof&nbsp;Data[&nbsp;gPointsData&nbsp;]&nbsp;-&nbsp;1&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayPushArray(&nbsp;aAll,&nbsp;Data&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;ArraySort(&nbsp;aAll,&nbsp;"</span><span style="color: #0000BB">SortData</span><span style="color: #DD0000">"&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szKills[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szDeaths[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szHeadShots[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szKnifeKills[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szKnifeDeaths[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szGrenadeKills[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szGrenadeDeaths[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szBombPlanted[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szBombExplosions[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szBombDefusions[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szBombDefused[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szWonRounds[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szShots[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szDamage[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szTeamKills[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szBestKills[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szBestDeaths[&nbsp;10&nbsp;];
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;szName[&nbsp;32&nbsp;]
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;iSize&nbsp;=&nbsp;clamp(&nbsp;iArraySize,&nbsp;0,&nbsp;15&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;j
<br />&nbsp;&nbsp;&nbsp;&nbsp;for(&nbsp;j&nbsp;=&nbsp;0;&nbsp;j&nbsp;&lt;&nbsp;iSize;&nbsp;j++&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayGetArray(&nbsp;aAll,&nbsp;j,&nbsp;Data&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fvault_get_data(&nbsp;g_VaultNames,&nbsp;Data[&nbsp;gSteamID&nbsp;],&nbsp;szName,&nbsp;charsmax(&nbsp;szName&nbsp;)&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;replace_all(&nbsp;szName,&nbsp;charsmax(&nbsp;szName&nbsp;),&nbsp;"</span><span style="color: #007700">&lt;</span><span style="color: #DD0000">",&nbsp;"</span><span style="color: #007700">[</span><span style="color: #DD0000">"&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;replace_all(&nbsp;szName,&nbsp;charsmax(&nbsp;szName&nbsp;),&nbsp;"</span><span style="color: #007700">&gt;</span><span style="color: #DD0000">",&nbsp;"</span><span style="color: #007700">]</span><span style="color: #DD0000">"&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parse(Data[&nbsp;gPointsData&nbsp;],
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szKills,&nbsp;sizeof&nbsp;szKills,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szDeaths,&nbsp;sizeof&nbsp;szDeaths,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szHeadShots,&nbsp;sizeof&nbsp;szHeadShots,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szKnifeKills,&nbsp;sizeof&nbsp;szKnifeKills,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szKnifeDeaths,&nbsp;sizeof&nbsp;szKnifeDeaths,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szGrenadeKills,&nbsp;sizeof&nbsp;szGrenadeKills,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szGrenadeDeaths,&nbsp;sizeof&nbsp;szGrenadeDeaths,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szBombPlanted,&nbsp;sizeof&nbsp;szBombPlanted,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szBombExplosions,&nbsp;sizeof&nbsp;szBombExplosions,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szBombDefusions,&nbsp;sizeof&nbsp;szBombDefusions,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szBombDefused,&nbsp;sizeof&nbsp;szBombDefused,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szWonRounds,&nbsp;sizeof&nbsp;szWonRounds,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szShots,&nbsp;sizeof&nbsp;szShots,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szDamage,&nbsp;sizeof&nbsp;szDamage,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szTeamKills,&nbsp;sizeof&nbsp;szTeamKills,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szBestKills,&nbsp;sizeof&nbsp;szBestKills,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;szBestDeaths,&nbsp;sizeof&nbsp;szBestDeaths);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(equal(g_iAuthData[&nbsp;id&nbsp;],&nbsp;Data[&nbsp;gSteamID&nbsp;]))
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iLen&nbsp;+=&nbsp;formatex(&nbsp;g_Top15Motd[&nbsp;iLen&nbsp;],&nbsp;MAX_BUFFER_LENGTH&nbsp;-&nbsp;iLen,&nbsp;"</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">tr&nbsp;align</span><span style="color: #007700">=</span><span style="color: #0000BB">center&nbsp;bgcolor</span><span style="color: #007700">=</span><span style="color: #FF8000">#333333&gt;"&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">iLen&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">formatex</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">g_Top15Motd</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">iLen&nbsp;</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">MAX_BUFFER_LENGTH&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">iLen</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&lt;tr&nbsp;align=center&gt;"&nbsp;</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">iLen&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">formatex</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">g_Top15Motd</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">iLen&nbsp;</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">MAX_BUFFER_LENGTH&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">iLen</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&lt;td&gt;%i&lt;td&nbsp;align=left&gt;%s&lt;td&gt;%s&lt;td&gt;%s&lt;td&gt;%s&lt;td&gt;%s&lt;td&gt;%s&lt;td&gt;%s&lt;td&gt;%s"</span><span style="color: #007700">,&nbsp;&nbsp;</span><span style="color: #0000BB">j&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szKills</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szDeaths</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szHeadShots</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szKnifeKills</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szGrenadeKills</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szBombExplosions</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szBombDefused&nbsp;</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">iLen&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">formatex</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">g_Top15Motd</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">iLen&nbsp;</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">MAX_BUFFER_LENGTH&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">iLen</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&lt;/table&gt;&lt;center&gt;The&nbsp;code&nbsp;added&nbsp;to&nbsp;check&nbsp;***&lt;/center&gt;&lt;/body&gt;&lt;/html&gt;"&nbsp;</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ArrayDestroy</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">aKey&nbsp;</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ArrayDestroy</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">aData&nbsp;</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ArrayDestroy</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">aAll&nbsp;</span><span style="color: #007700">)
<br />}
<br />
<br />
<br />public&nbsp;</span><span style="color: #0000BB">SortData</span><span style="color: #007700">(&nbsp;Array:</span><span style="color: #0000BB">aArray</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">iItem1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">iItem2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">iData</span><span style="color: #007700">[&nbsp;],&nbsp;</span><span style="color: #0000BB">iDataSize&nbsp;</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">Data1</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">FvaultData&nbsp;</span><span style="color: #007700">]
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">Data2</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">FvaultData&nbsp;</span><span style="color: #007700">]
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ArrayGetArray</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">aArray</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">iItem1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Data1&nbsp;</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ArrayGetArray</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">aArray</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">iItem2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Data2&nbsp;</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">szPoints_1</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">7&nbsp;</span><span style="color: #007700">]
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">parse</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">Data1</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">gPointsData&nbsp;</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">szPoints_1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">charsmax</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">szPoints_1&nbsp;</span><span style="color: #007700">)&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">szPoints_2</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">7&nbsp;</span><span style="color: #007700">]
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">parse</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">Data2</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">gPointsData&nbsp;</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">szPoints_2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">charsmax</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">szPoints_2&nbsp;</span><span style="color: #007700">)&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">iCount1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_to_num</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">szPoints_1&nbsp;</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">iCount2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_to_num</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">szPoints_2&nbsp;</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;(&nbsp;</span><span style="color: #0000BB">iCount1&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">iCount2&nbsp;</span><span style="color: #007700">)&nbsp;?&nbsp;-</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">:&nbsp;(&nbsp;(&nbsp;</span><span style="color: #0000BB">iCount1&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">iCount2&nbsp;</span><span style="color: #007700">)&nbsp;?&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">0&nbsp;</span><span style="color: #007700">)
<br />}&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>
<!-- END TEMPLATE: bbcode_php_printable -->The result i got :-<br /><a href="http://www.mediafire....jpg?size_id=6"target="_blank">http://www.mediafire...ize_id=6</a><br /><br />I have added the following html code to check if array size is enough !<br /><!-- BEGIN TEMPLATE: bbcode_php_printable -->
<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">iLen&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">formatex</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">g_Top15Motd</span><span style="color: #007700">[&nbsp;</span><span style="color: #0000BB">iLen&nbsp;</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">MAX_BUFFER_LENGTH&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">iLen</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&lt;/table&gt;&lt;center&gt;The&nbsp;code&nbsp;added&nbsp;to&nbsp;check&nbsp;***&lt;/center&gt;&lt;/body&gt;&lt;/html&gt;"&nbsp;</span><span style="color: #007700">)&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>
<!-- END TEMPLATE: bbcode_php_printable -->It show's the top 12 players perfectly, but not 13 ,14 and 15</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