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

debugged plugin


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

Napisano 08.05.2013 20:52

<!-- BEGIN TEMPLATE: postbit_external -->
<div>I added some extra classes and gives me some errors at compile time and do not understand why?if you can help me solve them<br /><br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>errors</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><img src="http://i42.tinypic.com/24vv9cx.png" border="0" alt="" /></div>
</div>
</div><br /><br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>.sma</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;">/*============================================ ====================================<br /> <br /> -----------------------------------<br /> -*- [BB] New Classes -*-<br /> -----------------------------------<br /> <br /> ~~~~~~~~~~~~~~~<br /> - Description -<br /> ~~~~~~~~~~~~~~~<br /> <br /> This plugin adds the bonus zombie classes into Base Builder.<br /> <br /> All classes have been balanced, but feel free to edit them if<br /> you are not satisfied.<br /> <br />============================================= ===================================*/<br /><br />#include &lt;amxmodx&gt;<br />#include &lt;fakemeta&gt;<br />#include &lt;basebuilder&gt;<br />#include &lt;hamsandwich&gt;<br />#include &lt;fun&gt;<br />#include &lt;xs&gt;<br /><br />/*============================================ =============================/*============================================ ====================================<br /> [Plugin Customization]<br />============================================= ====================================*/<br />// Classic Zombie Attributes<br />new const zclass1_name[] = { &quot;Spawn&quot; }<br />new const zclass1_info[] = { &quot;=Echilibrat=&quot; }<br />new const zclass1_model[] = { &quot;v_bb_malefic&quot; }<br />new const zclass1_clawmodel[] = { &quot;v_zm_malefic&quot; }<br />const zclass1_health = 3000<br />const zclass1_speed = 310<br />const Float:zclass1_gravity = 0.8<br />const zclass1_admin = ADMIN_ALL<br />const zclass1_credits = 0<br /><br />// Chainsaw Attributes<br />new const zclass2_name[] = { &quot;Chainsaw Maniac&quot; }<br />new const zclass2_info[] = { &quot;HP+ DMG+&quot; }<br />new const zclass2_model[] = { &quot;bb_chainsaw&quot; }<br />new const zclass2_clawmodel[] = { &quot;v_sawww&quot; }<br />const zclass2_health = 4000<br />const zclass2_speed = 260<br />const Float:zclass2_gravity = 0.85<br />const zclass2_admin = ADMIN_ALL<br />const zclass2_credits = 0<br />#define CHAINSAW_DAMAGE 2.5<br /><br />// Banshee Attributes<br />new const zclass3_name[] = { &quot;Predator&quot; }<br />new const zclass3_info[] = { &quot;Semiclip + Invizibilitate&quot; }<br />new const zclass3_model[] = { &quot;zmhelladmn&quot; }<br />new const zclass3_clawmodel[] = { &quot;v_predator123&quot; }<br />const zclass3_health = 3500<br />const zclass3_speed = 280<br />const Float:zclass3_gravity = 0.85<br />const zclass3_admin = ADMIN_ALL<br />const zclass3_credits = 0<br />#define BANSHEE_RENDERAMT 90<br /><br />// Charger Attributes<br />new const zclass4_name[] = { &quot;Alive Tree&quot; }<br />new const zclass4_info[] = { &quot;HP++ Speed- Charge&quot; }<br />new const zclass4_model[] = { &quot;treee&quot; }<br />new const zclass4_clawmodel[] = { &quot;v_tree_h&quot; }<br />const zclass4_health = 6500<br />const zclass4_speed = 210<br />const Float:zclass4_gravity = 0.9<br />const zclass4_admin = ADMIN_ALL<br />const zclass4_credits = 0<br /><br />// Lycan Attributes<br />new const zclass5_name[] = { &quot;Alien&quot; }<br />new const zclass5_info[] = { &quot;Gravity + Speed + Hp -&quot; }<br />new const zclass5_model[] = { &quot;v_bb_alien&quot; }<br />new const zclass5_clawmodel[] = { &quot;v_zm_alien&quot; }<br />const zclass5_health = 3500<br />const zclass5_speed = 370<br />const Float:zclass5_gravity = 0.5<br />const zclass5_admin = ADMIN_ALL<br />const zclass5_credits = 0<br /><br />// Shadow Attributes<br />new const zclass6_name[] = { &quot;Shadow&quot; }<br />new const zclass6_info[] = { &quot;Speed +&quot; }<br />new const zclass6_model[] = { &quot;v_bb_shadow&quot; }<br />new const zclass6_clawmodel[] = { &quot;v_zm_shadow&quot; }<br />const zclass6_health = 2000<br />const zclass6_speed = 360<br />const Float:zclass6_gravity = 0.4<br />const zclass6_admin = ADMIN_ALL<br />const zclass6_credits = 0<br /><br />// Liker Attributes<br />new const zclass7_name[] = { &quot;Liker&quot; }<br />new const zclass7_info[] = { &quot;Hp + Gravity&quot; }<br />new const zclass7_model[] = { &quot;v_bb_licker&quot; }<br />new const zclass7_clawmodel[] = { &quot;v_zm_licker&quot; }<br />const zclass7_health = 10000<br />const zclass7_speed = 320<br />const Float:zclass7_gravity = 0.3<br />const zclass7_admin = ADMIN_ALL<br />const zclass7_credits = 0<br /><br />// Leon Attributes<br />new const zclass8_name[] = { &quot;Leon&quot; }<br />new const zclass8_info[] = { &quot;Speed + Hp + Gravity&quot; }<br />new const zclass8_model[] = { &quot;v_bb_leon&quot; }<br />new const zclass8_clawmodel[] = { &quot;v_zm_leon&quot; }<br />const zclass8_health = 10000<br />const zclass8_speed = 300<br />const Float:zclass8_gravity = 0.4<br />const zclass8_admin = ADMIN_IMMUNITY<br />const zclass8_credits = 0<br /><br />// Distrugator Attributes<br />new const zclass9_name[] = { &quot;Distrugator&quot; }<br />new const zclass9_info[] = { &quot;Regeneration + Speed + Hp + Gravity&quot; }<br />new const zclass9_model[] = { &quot;v_bb_distrugator&quot; }<br />new const zclass9_clawmodel[] = { &quot;v_zm_super_shadow&quot; }<br />const zclass9_health = 4500<br />const zclass9_speed = 310<br />const Float:zclass9_gravity = 0.75<br />const zclass9_admin = ADMIN_IMMUNITY<br />const zclass9_credits = 0<br /><br />//Every 2 seconds, regenerates 2.5% max health<br />#define REGENERATION_DELAY 2.5<br />#define HEAL_ALGORITHM (get_user_health(id) + (zclass9_health * 0.025))<br /><br />// Knockback Attributes<br />new const zclass10_name[] = { &quot;Super Shadow&quot; }<br />new const zclass10_info[] = { &quot;Knockback + Speed + Hp +&quot; }<br />new const zclass10_model[] = { &quot;v_bb_super_shadow&quot; }<br />new const zclass10_clawmodel[] = { &quot;v_zm_distrugator&quot; }<br />const zclass10_health = 4000<br />const zclass10_speed = 400<br />const Float:zclass10_gravity = 0.4<br />const zclass10_admin = ADMIN_IMMUNITY<br />const zclass10_credits = 0<br /><br />/*============================================ =============================/*============================================ ================================*/<br /><br />new bool:g_isSolid[33]<br />new bool:g_isSemiClip[33]<br />new g_iPlayers[32], g_iNum, g_iPlayer<br /><br />new g_zclass_saw<br />new g_zclass_banshee<br />new g_zclass_charger<br />new g_zclass_regenerator<br />new g_zclass_lycan<br />new g_zclass_shadow<br />new g_zclass_liker<br />new g_zclass_leon<br />new g_zclass_distrugator<br />new g_zclass_knockback<br /><br />#define SOUND_DELAY 3.0<br />new Float: g_fSoundDelay[33]<br /><br />new Float: g_fRegenDelay[33]<br />#define PAINSHOCK 108<br /><br />#define IP_SERVER_LICENTIAT &quot;93.114.82.56&quot;<br /><br />#define g_ChainsawRev &quot;basebuilder/zombie/chainsaw_rev2.wav&quot;<br />#define g_BansheeScream &quot;basebuilder/zombie/banshee_scream3.wav&quot;<br />#define g_ChargerRoar &quot;basebuilder/zombie/charger_roar2.wav&quot;<br />#define g_LycanAttack &quot;basebuilder/zombie/wolf_attack1.wav&quot;<br />#define g_LycanHowl &quot;basebuilder/zombie/wolf_spawn1.wav&quot;<br /><br />// Zombie Classes MUST be registered on plugin_precache<br />#define VERSION &quot;6.8&quot;<br />public plugin_precache()<br />{<br /><br /> register_plugin(&quot;BB Classes&quot;, VERSION, &quot;JohNNy*&quot;)<br /> register_cvar(&quot;bb_credit_classes&quot;, VERSION, FCVAR_SPONLY|FCVAR_SERVER)<br /> set_cvar_string(&quot;bb_credit_classes&quot;, VERSION)<br /><br /> precache_sound(g_ChainsawRev)<br /> precache_sound(g_BansheeScream)<br /> precache_sound(g_ChargerRoar)<br /> precache_sound(g_LycanAttack)<br /> precache_sound(g_LycanHowl)<br /> <br /> // Register all classes<br /> g_zclass_saw = bb_register_zombie_class(zclass1_name, zclass1_info, zclass1_model, zclass1_clawmodel, zclass1_health, zclass1_speed, zclass1_gravity, 0.0, zclass1_admin, zclass1_credits)<br /> g_zclass_banshee = bb_register_zombie_class(zclass2_name, zclass2_info, zclass2_model, zclass2_clawmodel, zclass2_health, zclass2_speed, zclass2_gravity, 0.0, zclass2_admin, zclass2_credits)<br /> g_zclass_charger = bb_register_zombie_class(zclass3_name, zclass3_info, zclass3_model, zclass3_clawmodel, zclass3_health, zclass3_speed, zclass3_gravity, 0.0, zclass3_admin, zclass3_credits)<br /> g_zclass_lycan = bb_register_zombie_class(zclass4_name, zclass4_info, zclass4_model, zclass4_clawmodel, zclass4_health, zclass4_speed, zclass4_gravity, 0.0, zclass4_admin, zclass4_credits)<br /> g_zclass_regenerator = bb_register_zombie_class(zclass5_name, zclass5_info, zclass5_model, zclass5_clawmodel, zclass5_health, zclass5_speed, zclass5_gravity, 0.0, zclass5_admin, zclass5_credits)<br /> g_zclass_shadow = bb_register_zombie_class(zclass6_name, zclass6_info, zclass6_model, zclass6_clawmodel, zclass6_health, zclass6_speed, zclass6_gravity, 0.0, zclass6_admin, zclass6_credits)<br /> g_zclass_liker = bb_register_zombie_class(zclass7_name, zclass7_info, zclass7_model, zclass7_clawmodel, zclass7_health, zclass7_speed, zclass7_gravity, 0.0, zclass7_admin, zclass7_credits)<br /> g_zclass_leon = bb_register_zombie_class(zclass8_name, zclass8_info, zclass8_model, zclass8_clawmodel, zclass8_health, zclass8_speed, zclass8_gravity, 0.0, zclass8_admin, zclass8_credits)<br /> g_zclass_distrugator = bb_register_zombie_class(zclass9_name, zclass9_info, zclass9_model, zclass9_clawmodel, zclass9_health, zclass9_speed, zclass9_gravity, 0.0, zclass9_admin, zclass9_credits)<br /> g_zclass_knockback = bb_register_zombie_class(zclass10_name, zclass10_info, zclass10_model, zclass10_clawmodel, zclass10_health, zclass10_speed, zclass10_gravity, 0.0, zclass10_admin, zclass10_credits)<br />}<br /><br />public plugin_init()<br />{<br /> RegisterHam(Ham_TakeDamage, &quot;player&quot;, &quot;ham_TakeDamage&quot;)<br /> RegisterHam(Ham_TakeDamage, &quot;player&quot;, &quot;ham_TakeDamage_Post&quot;, 1)<br /> RegisterHam(Ham_Spawn, &quot;player&quot;, &quot;ham_PlayerSpawn_Post&quot;, 1)<br /> <br /> register_forward(FM_PlayerPreThink, &quot;fw_PlayerPreThink&quot;);<br /> register_forward(FM_PlayerPostThink, &quot;fw_PlayerPostThink&quot;);<br /> register_forward(FM_AddToFullPack, &quot;fw_addToFullPack&quot;, 1)<br /> register_forward(FM_EmitSound, &quot;fw_EmitSound&quot;)<br />}<br /><br />public ham_TakeDamage(victim, inflictor, attacker, Float:damage, damagebits)<br />{<br /> if (!pev_valid(victim) || !is_user_connected(attacker))<br /> return HAM_IGNORED<br /><br /> if (zp_get_user_zombie_class(attacker) == g_zclass_saw)<br /> damage*=CHAINSAW_DAMAGE<br /><br /> SetHamParamFloat(4, damage)<br /> return HAM_HANDLED<br />}<br /><br />public ham_PlayerSpawn_Post(id)<br />{<br /> if (!is_user_alive(id))<br /> return ;<br /> <br /> if (bb_is_user_zombie(id) &amp;&amp; zp_get_user_zombie_class(id) == g_zclass_banshee)<br /> set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, BANSHEE_RENDERAMT)<br /> else<br /> set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 90)<br />}<br /><br />public fw_PlayerPreThink(id)<br />{<br /> if (!is_user_alive(id) || !is_user_connected(id))<br /> return FMRES_IGNORED<br /> <br /> if (zp_get_user_zombie_class(id) == g_zclass_regenerator &amp;&amp; bb_is_user_zombie(id))<br /> {<br /> static Float: fGameTime;<br /> fGameTime = get_gametime();<br /> if (g_fRegenDelay[id] &lt; fGameTime)<br /> {<br /> g_fRegenDelay[id] = fGameTime + REGENERATION_DELAY;<br /> <br /> new iHealth = floatround(HEAL_ALGORITHM);<br /> iHealth = clamp(iHealth, 0, zclass9_health);<br /> set_user_health(id, iHealth);<br /> }<br /> }<br /> <br /> get_players(g_iPlayers, g_iNum, &quot;a&quot;)<br /> <br /> static i<br /> for (i = 0; i &lt; g_iNum; i++)<br /> {<br /> g_iPlayer = g_iPlayers[i]<br /> if (!g_isSemiClip[g_iPlayer])<br /> g_isSolid[g_iPlayer] = true<br /> else<br /> g_isSolid[g_iPlayer] = false<br /> }<br /> <br /> if (g_isSolid[id])<br /> for (i = 0; i &lt; g_iNum; i++)<br /> {<br /> g_iPlayer = g_iPlayers[i]<br /> <br /> if (!g_isSolid[g_iPlayer] || g_iPlayer == id || !bb_is_user_zombie(id) || zp_get_user_zombie_class(id) != g_zclass_banshee)<br /> continue<br /> if (get_user_team(g_iPlayer) != get_user_team(id))<br /> continue<br /> <br /> set_pev(g_iPlayer, pev_solid, SOLID_NOT)<br /> g_isSemiClip[g_iPlayer] = true<br /> }<br /> <br /> return FMRES_IGNORED <br />}<br /><br />public fw_PlayerPostThink(id)<br />{<br /> if (!is_user_alive(id))<br /> return FMRES_IGNORED<br /> <br /> get_players(g_iPlayers, g_iNum, &quot;a&quot;)<br /> <br /> static i<br /> for (i = 0; i &lt; g_iNum; i++)<br /> {<br /> g_iPlayer = g_iPlayers[i]<br /> if (g_isSemiClip[g_iPlayer])<br /> {<br /> set_pev(g_iPlayer, pev_solid, SOLID_SLIDEBOX)<br /> g_isSemiClip[g_iPlayer] = false<br /> }<br /> }<br /> <br /> return FMRES_IGNORED<br />}<br /><br />public fw_addToFullPack(es, e, ent, host, hostflags, player, pSet)<br />{<br /> if ( !player )<br /> return FMRES_SUPERCEDE;<br /> <br /> if(player)<br /> {<br /> if (!is_user_alive(host) || !g_isSolid[host])<br /> return FMRES_IGNORED<br /> if (get_user_team(ent) != get_user_team(host))<br /> return FMRES_IGNORED<br /> <br /> set_es(es, ES_Solid, SOLID_NOT)<br /> }<br /> return FMRES_IGNORED<br />}<br /><br />public fw_EmitSound(id,channel,const sample[],Float:volume,Float:attn,flags,pitch)<br />{<br /> if (!is_user_connected(id) || !bb_is_user_zombie(id) || bb_is_build_phase() || bb_is_prep_phase())<br /> return FMRES_IGNORED;<br /> <br /> if ((g_fSoundDelay[id] + SOUND_DELAY) &lt; get_gametime())<br /> {<br /> if (equal(sample[8], &quot;kni&quot;, 3))<br /> {<br /> if (equal(sample[14], &quot;sla&quot;, 3) || equal(sample[14], &quot;hit&quot;, 3) || equal(sample[14], &quot;sta&quot;, 3)) // slash<br /> {<br /> if (zp_get_user_zombie_class(id) == g_zclass_saw)<br /> {<br /> emit_sound(id,CHAN_ITEM,g_ChainsawRev,volume, attn,flags,pitch)<br /> g_fSoundDelay[id] = get_gametime()<br /> return FMRES_SUPERCEDE;<br /> }<br /> else if (zp_get_user_zombie_class(id) == g_zclass_banshee)<br /> {<br /> emit_sound(id,CHAN_ITEM,g_BansheeScream,volum e,attn,flags,pitch)<br /> g_fSoundDelay[id] = get_gametime()<br /> return FMRES_SUPERCEDE;<br /> }<br /> else if (zp_get_user_zombie_class(id) == g_zclass_charger)<br /> {<br /> emit_sound(id,CHAN_ITEM,g_ChargerRoar,volume, attn,flags,pitch)<br /> g_fSoundDelay[id] = get_gametime()<br /> <br /> static Float: velocity[3];<br /> velocity_by_aim(id, 400, velocity);<br /> set_pev(id, pev_velocity, velocity);<br /> <br /> return FMRES_SUPERCEDE;<br /> }<br /> else if (zp_get_user_zombie_class(id) == g_zclass_lycan)<br /> {<br /> emit_sound(id,CHAN_ITEM,g_LycanAttack,volume, attn,flags,pitch)<br /> g_fSoundDelay[id] = get_gametime()<br /> return FMRES_SUPERCEDE;<br /> }<br /> }<br /> }<br /> }<br /> //else<br /> //g_fSoundDelay[id] = get_gametime()<br /> <br /> return FMRES_IGNORED<br />}<br /><br />public bb_zombie_class_set(id, class)<br />{<br /> if (!is_user_alive(id))<br /> return ;<br /> <br /> if (class == g_zclass_lycan &amp;&amp; !bb_is_build_phase())<br /> emit_sound(id,CHAN_STATIC,g_LycanHowl,VOL_NOR M,ATTN_NORM,0,PITCH_NORM)<br /> <br /> return ;<br />}<br /><br />public ham_TakeDamage_Post(victim, inflictor, attacker, Float:damage, bits)<br />{<br /> if(bb_get_user_zombie_class(victim) == g_zclass_knockback &amp;&amp; bb_is_user_zombie(victim))<br /> {<br /> set_pdata_float(victim, PAINSHOCK, 1.0, 5)<br /> }<br />}</div>
</div>
</div></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