"Auto BH, 20 hp oraz pelen magazynek za kazde zabojstwo, mniejsza widocznosc"
lecz dużo problemów przy kompilacji.
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <engine>
#include <hamsandwich>
#include <codmod>
#include <colorchat>
#include <cstrike>
#include <fakemeta>
new bool:ma_klase[33];
new const nazwa[] = "Rambo (Premium)";
new const opis[] = "Auto BH, 20 hp oraz pelen magazynek za kazde zabojstwo, mniejsza widocznosc";
new const bronie = 1<<CSW_DEAGLE | 1<<CSW_M4A1 | 1<<CSW_AK47 | 1<<CSW_AWP| 1<<CSW_HEGRENADE | 1<<CSW_FLASHBANG;
new const zdrowie = 50;
new const kondycja = 0;
new const inteligencja = 0;
new const wytrzymalosc = 0;
public plugin_init() {
register_plugin(nazwa, "1.0", "Nup");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("CurWeapon", "CurWeapon", "be", "1=1");
register_event("DeathMsg", "DeathMsg", "ade");
}
public cod_class_enabled(id)
{
client_print(id, print_chat, "[%s] WWW.ZABIJAMY.PL", nazwa);
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[%s] Nie masz uprawnien, aby uzywac tej klasy.", nazwa)
return COD_STOP;
}
ma_klase[id] = true;
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 150);
return COD_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[id] = false;
}
public client_PreThink(id)
{
if(!ma_klase[id])
return PLUGIN_CONTINUE;
if(!(get_user_button(id) & IN_JUMP))
return PLUGIN_CONTINUE;
new flags = get_entity_flags(id);
if (flags & FL_WATERJUMP)
return PLUGIN_CONTINUE;
if (entity_get_int(id, EV_INT_waterlevel) >= 2)
return PLUGIN_CONTINUE;
if (!(flags & FL_ONGROUND))
return PLUGIN_CONTINUE;
new Float:velocity[3];
entity_get_vector(id, EV_VEC_velocity, velocity);
velocity[2] += 250.0
entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6);
return PLUGIN_CONTINUE;
}
public DeathMsg()
{
new killer = read_data(1);
new victim = read_data(2);
if(!is_user_connected(killer))
return PLUGIN_CONTINUE;
if(ma_klase[victim] && !ma_klase[killer])
cod_set_user_xp(killer, cod_get_user_xp(killer)+10);
if(ma_klase[killer])
{
new cur_health = pev(killer, pev_health);
new Float:max_health = 100.0+cod_get_user_health(killer);
new Float:new_health = cur_health+20.0<max_health? cur_health+20.0: max_health;
set_pev(killer, pev_health, new_health);
new weapon = get_user_weapon(killer);
if(maxClip[weapon] != -1)
set_user_clip(1, maxClip[weapon]);
}
return PLUGIN_CONTINUE;
}
stock set_user_clip(id, ammo)
{
new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _);
get_weaponname(weapon, weaponname, 31);
while ((weaponid = engfunc(EngFunc_FindEntityByString, weaponid, "classname", weaponname)) != 0)
if (pev(weaponid, pev_owner) == id) {
set_pdata_int(weaponid, 51, ammo, 4);
return weaponid;
}
return 0;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1250\\ deff0\\ deflang1045{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
A i jeśli ktoś umie to proszę o dodanie warunku, jeśli gracz jest w CT to zmienia mu model na xxx, jeśli gracz jest w TT to zmienia mu model na xx.


Dodatki SourceMod



Temat jest zamknięty








