<div><font size="7"><div align="center"><font color="Green"><b>ASW</b></font></div></font><br /><br /><b>Hello, this is my first plugin that I posted here in AlliedMods.<br />I'm a beginner on codding plugins. And this is a simple plugin that I made to post here :).<br />I hope you like it :). Thank you.<br /><br />You can use this plugin on any mod you want.</b><br /><br /><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 /> Plugin ~Admin Spawn Weapons~ Made by: Neverminddw<br />====================================================<br /><br />======================================================================================== <br />|| //=\ ======== \ // ||<br />|| // \ // \ \ //\ // ||<br />|| // \ // \ // \ // ||<br />|| //=======\ //=========// \ // \ // ||<br />|| // \ // \ // \ // ||<br />|| // \ // \ // \ // ||<br />|| // \ \======// \// \// ||<br />=======================================================================================*/<br /><br />#include <amxmodx><br />#include <cstrike><br />#include <fun><br />#include <hamsandwich><br /><br />#define PLUGIN "Admin_Spawn_Weapons"<br />#define VERSION "1.0"<br />#define AUTHOR "Neverminddw"<br /><br /><br />public plugin_init() {<br /> register_plugin(PLUGIN, VERSION, AUTHOR)<br /> RegisterHam(Ham_Spawn, "player", "GiveWeapons", 1);<br />}<br /><br />public GiveWeapons(id)<br />{<br /> if (get_user_flags(id) & ADMIN_KICK) {<br /> new CsTeams:userTeam = cs_get_user_team(id)<br /> if (userTeam == CS_TEAM_T) {<br /> give_item( id, "weapon_ak47" ) // Gives ak47<br /> give_item( id, "weapon_glock18" ) // Gives glock18<br /> cs_set_user_bpammo(id, CSW_AK47, 100) // Sets ammount of ammo ( bullets )<br /> cs_set_user_bpammo(id, CSW_GLOCK18, 120) // Sets ammount of ammo ( bullets )<br /> colorchat(id, "!y[!gASW!y]: !tYou got !gAK47 !t& !gGLOCK18!y!") // If player is T this message will be shown to them on chat box.<br /> }<br /> else if(userTeam == CS_TEAM_CT) {<br /> give_item(id,"weapon_m4a1") // Gives m4a1<br /> give_item(id,"weapon_usp") // Gives usp<br /> cs_set_user_bpammo(id, CSW_M4A1, 90) // Sets ammount of ammo ( bullets )<br /> cs_set_user_bpammo(id, CSW_USP, 100) // Sets ammount of ammo ( bullets )<br /> colorchat(id, "!y[!gASW!y]: !tYou got !gM4A1 !t& !gUSP!y!") // If player is CT this message will be shown to them on chat box.<br /> }<br /> }<br />}<br /><br />stock colorchat( const id, const input[], any: ... )<br />{<br /> new count = 1, players[32], i, player;<br /> static msg[191];<br /> if ( numargs() == 2 )<br /> copy( msg, 190, input );<br /> else<br /> vformat( msg, 190, input, 3 );<br /> replace_all( msg, 190, "!g", "^4" );<br /> replace_all( msg, 190, "!y", "^1" );<br /> replace_all( msg, 190, "!t", "^3" );<br /> if ( id )<br /> {<br /> if ( !is_user_connected( id ) ) return;<br /> players[0] = id;<br /> } else get_players( players, count, "ch" );<br /> for ( i = 0; i < count; i++ )<br /> {<br /> player = players[i];<br /> message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, player );<br /> write_byte( player );<br /> write_string( msg );<br /> message_end();<br /> }<br />}</code><hr />
</div></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/sma.gif" alt="File Type: sma" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="http://www.amxmodx.o...12"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...1480106210">Get Source</a> (ASW.sma - 3.0 KB)
</td>
</tr>
</table>
</fieldset>
</div>
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
ASW
Temat rozp. Adminek AMXX.PL, 25.11.2016 21:36
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych