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

Coinflip


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

Napisano 20.12.2016 00:10

<div>This is a coinflip plugin! <br />You type !coinflip in the chat and the coin will flip and either land on terrorist or counter terrorist.<br />It's 50/50% chance.<br /><br />I also made one for <a href="https://forums.allie....php?p=1476638"target="_blank">Eccas Warden</a> plugin, so only the warden can flip the coin. <br /><br />Everything is translatable, so you can edit it however you want it. <br /><br />Put the .smx file in plugins and .txt file in translations <br /><br />Commands: !coinflip<br /><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: #007700">public&nbsp;</span><span style="color: #0000BB">OnPluginStart</span><span style="color: #007700">()
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">RegConsoleCmd</span><span style="color: #007700">(</span><span style="color: #DD0000">"sm_coinflip"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">OnFlip</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Flip&nbsp;the&nbsp;coin"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">LoadTranslations</span><span style="color: #007700">(</span><span style="color: #DD0000">"warden-coinflip.phrases"</span><span style="color: #007700">)
<br />}
<br />
<br />public&nbsp;</span><span style="color: #0000BB">Action</span><span style="color: #007700">:</span><span style="color: #0000BB">OnFlip</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">args</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">warden_iswarden</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">CanUseCommand</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;switch(</span><span style="color: #0000BB">GetRandomInt</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">))&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">:&nbsp;
<br />&nbsp;&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">CPrintToChatAll</span><span style="color: #007700">(</span><span style="color: #DD0000">"%t&nbsp;%t"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"MSG_PREFIX"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Terrorist"</span><span style="color: #007700">);&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">:&nbsp;
<br />&nbsp;&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">CPrintToChatAll</span><span style="color: #007700">(</span><span style="color: #DD0000">"%t&nbsp;%t"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"MSG_PREFIX"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Counter&nbsp;Terrorist"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">CPrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"%t&nbsp;%t"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"MSG_PREFIX"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Only&nbsp;Warden"</span><span style="color: #007700">);&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;
<br />}&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>This is one of my first plugins, so give criticism.:)</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/smx.gif"alt="File Type: smx" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie...oinflip.smx</a>(13.7 KB)


</td>
</tr><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...86"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1482188944">GetSource</a> (Warden-coinflip.sp - 1,019 Bytes)


</td>
</tr><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...phrases.txt</a>(413 Bytes)


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


<a href="https://forums.allie...oinflip.smx</a>(13.1 KB)


</td>
</tr><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...89"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1482188957">GetSource</a> (Coinflip.sp - 789 Bytes)


</td>
</tr><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...phrases.txt</a>(285 Bytes)


</td>
</tr>
</table>
</fieldset>


</div>

Wyświetl pełny artykuł




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

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