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.
|
Kilka klas Cod+kilka pluginów amxx
#1
Napisano 06.06.2011 16:12
Poszukuje tych pluginów:
plugin witający żegnający
plugin który będzie pokazywał w danych do klasy codmoda Zyćie i wytrzymałość
Zapraszam na www.cs-wodzislaw.pl Nowa odsłona !
#2
Napisano 06.06.2011 16:20
#include <amxmodx> public plugin_init() { register_plugin("Join/Leave Message","1.2","BigBaller") register_cvar("amx_join_message", "Przychodzi %name%") register_cvar("amx_joined_message", "%name% jest gotowy!") register_cvar("amx_leave_message", "Odchodzi %name%") register_cvar("amx_join_leave","1") } public client_connect(id){ new user[32], len user[0] = id len = get_user_name(id,user[1],31) set_task(2.0, "join_msg", 0, user,len + 2) return PLUGIN_CONTINUE } public client_putinserver(id){ new user[32], len user[0] = id len = get_user_name(id,user[1],31) set_task(2.0, "joined_msg", 0, user,len + 2) return PLUGIN_CONTINUE } public client_disconnect(id){ new user[32], len user[0] = id len = get_user_name(id, user[1], 31) set_task(2.0, "leave_msg", 0, user, len + 2) return PLUGIN_CONTINUE } public join_msg(user[]) { if (get_cvar_num("amx_join_leave")==0){ return PLUGIN_HANDLED } if (get_cvar_num("amx_join_leave")==1){ new message[192] get_cvar_string("amx_join_message", message, 191) replace(message, 191, "%name%", user[1]) set_hudmessage(0, 225, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.15, 3) show_hudmessage(0, message) return PLUGIN_CONTINUE } return PLUGIN_CONTINUE } public joined_msg(user[]) { if (get_cvar_num("amx_join_leave")==0){ return PLUGIN_HANDLED } if (get_cvar_num("amx_join_leave")==1){ new message[192] get_cvar_string("amx_joined_message", message, 191) replace(message, 191, "%name%", user[1]) set_hudmessage(0, 225, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.15, 3) show_hudmessage(0, message) return PLUGIN_CONTINUE } return PLUGIN_CONTINUE } public leave_msg(user[]) { if (get_cvar_num("amx_join_leave")==0){ return PLUGIN_HANDLED } if (get_cvar_num("amx_join_leave")==1){ new message[192] get_cvar_string("amx_leave_message", message, 191) replace(message, 191, "%name%", user[1]) set_hudmessage(0, 225, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.15, 3) show_hudmessage(0, message) return PLUGIN_CONTINUE } return PLUGIN_CONTINUE }
#3
Napisano 07.06.2011 16:25
a co one maja miec moze laskawie napiszesz??Witam, poszukuje tych o to klas do coda: assasin,rambo+ jak je wgrać i tp.
#5
Napisano 07.06.2011 17:36
#6
Napisano 07.06.2011 18:19
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <fakemeta>
new const nazwa[] = "Rambo (Klasa Premium)";
new const opis[] = "Ma podwojny skok, 20 hp oraz pelen magazynak za kazde zabojstwo";
new const bronie = 1<<CSW_FAMAS;
new const zdrowie = 30;
new const kondycja = 38;
new const inteligencja = 0;
new const wytrzymalosc = 20;
new bool:ma_klase[33];
new bool:moze_skoczyc[33];
new const maxClip[31] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 };
public plugin_init() {
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_CmdStart, "CmdStart");
register_event("DeathMsg", "DeathMsg", "ade");
}
public cod_class_enabled(id)
{
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[id] = false;
public CmdStart(id, uc_handle)
{
if(!ma_klase[id])
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc[id])
{
moze_skoczyc[id] = false;
new Float:velocity[3];
pev(id, pev_velocity, velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity, velocity);
}
else if(flags & FL_ONGROUND)
moze_skoczyc[id] = true;
return FMRES_IGNORED;
}
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;
}
Dodano 07 czerwiec 2011 - 18:20:
A tutaj asasins\\
#include <amxmodx>
#include <codmod>
#include <hamsandwich>
#include <engine>
#include <ColorChat>
#include <fakemeta>
#define DMG_BULLET (1<<1)
new const nazwa[] = "Assasin (Klasa Premium)";
new const opis[] = "Natychmiastowe zabicie z noza(PPM). Podczas kucania jest niewidoczny";
new const bronie = 1<<CSW_DEAGLE | 1<<CSW_AK47 | 1<<CSW_FLASHBANG;
new const zdrowie = -10;
new const kondycja = 50;
new const inteligencja = 0;
new const wytrzymalosc = 20;
new bool:ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
{
ColorChat(id, RED, "^x04Klasa^x03 %s^x04 By^x01 amxx.pl", nazwa); //Gdy gracz nie ma flagi wyświetli mu komunikat
if(!(get_user_flags(id) & ADMIN_LEVEL_H)) //FLAGA
{
ColorChat(id, RED, "^x03[%s]^x04 Jest^x03 klasa premium", nazwa) //Znowu info ze przykładowa klasa jest PREMIUM
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[id] = false;
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET && damage > 20.0)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
public client_PreThink(id)
{
if(!ma_klase[id])
return;
new button = get_user_button(id);
if(button & IN_DUCK)
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 30);
else
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255);
}
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych