[HELP] Classes do not work
Hey look at me and downloaded the Call of Duty mod and everything right but want to add two new classes is not going, and aver echo this post if any of you know because the new classes are not going, or I take a hand tell me the error, thanks and here is the sma:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <engine>
#include <hamsandwich>
#include <nvault>
#define PLUGIN "MoD Call of Duty: MW"
#define VERSION "1.0"
#define AUTHOR "QTM_Peyote,johnC,GranTorino // LeOnArD"
#define STANDARD_FAST 250.0
#define TASK_SHOW_INFORMATION 672
#define TASK_RAISE 704
#define TASK_TRAINING_SANITARY 736
#define TASK_SHOW_ADVERTISEMENT 768
#define TASK_SET_FAST 832
//#define BOT 1
new SyncHudObj;
new SyncHudObj2;
new SyncHudObj3;
new g_msg_screenfade;
new sprite_white;
new sprite_blast;
new g_vault;
new podkladajacy;
new disarming;
new experience_for_murder;
new experience_for_bomb;
new Clothing_CT[4][]={"sas","gsg9","urban","gign"};
new Clothing_Terro[4][]={"arctic","leet","guerilla","terror"};
new cons t maxAmmo[31]={0,52,0,90,1,32,1,100,90,1,120,100,100,90,90,90,100,120,30,120,200,32,90,120,90,2,35,90,90,0,100};
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,& nbsp; 30, 20, 2, 7, 30, 30, -1, 50 };
new information_item_player[33][2];
new const names_objects[][] =
{
"Nada",
"Botas de Asalto", //1
"Chaleco Doble", //2
"Chaleco Reforzado", //3
"Cuchillo Veterano", //4
"Enemigo Sorpresa", //5
"Capa Ninja", //6
"Morfina", //7
"Cuchillo de Commando", //8
"Gafas Espia", //9
"Misterio de la Granada", //10
"Pies Ninja", //11
"Secreto Militar", //12
"Rifle AWP",//13
"Adrenalina",//14
"Misterio Rambo",//15
"Formacion Sanitaria",//16
"Chaleco NASA",//17
"Veterano Entrenado",//18
"Botiquin de Primeros Auxilios",//19
"Eliminador de Recoil",//20
"Cartucho de titanio",//21
"Cartuchos del Coronel",//22
"Recoil Menor",//23
"Escudo SWAT",//24
"Recluta Entrenado",//25
"Escudo Reflectivo",//26
"Notas del capitan",//27
"Modulo JetPack"
};
new const descriptions_objects[][] = {"Mata a alguien para conseguir un Item",
"Ejecute de forma silenciosa",
"Reduce el danio recibido",
"Reduce el danio recibido",
"El cuchillo inflinge mas danio",
"Cuando golpeas a alguien por la espalda, las lesiones son mayores",
"Te hace invisible, pero no totalmente",
"1/3 oportunidades para revivir despues de morir",
"Muerte instantanea con el cuchillo",
"Tienes 1/3 de oportunidad de matar al instante con la HE. Te ves como enemigo",
"Muerte ins tantanea con la HE",
"Puedes hacer un doble salto en el aire",
"Sus lesiones se reducen en un 1/3. Usted tiene una probabilidad de 1/3 de cegar a un enemigo",
"Recibes un Rifle AWP",
"Por cada frag, obtendras 50 HP",
"Por cada frag, obtendras clip y 20 HP",
"Recibe 10 HP cada 3 segundos",
"Mas +500 de Armadura",
"Obtendras 100 HP cada ronda, pero correras mas lento",
"Pulsa E para obtener HP",
"No Recoil",
"Mas +15 de danio",
"Mas +25 de danio",
"El Recoil es menor",
"No hay elementos en su contra",
"Obtendras 50 HP cada ronda, pero iras mas despacio",
"Posibilidad 1/3 de reflejar su danio",
"Eres resistente a tres disparos en cada ronda",
"Presione la tecla Control y la Barra Espaciadora para usar el modulo, el modulo se puede utilizar cada 4 segundos"
};
new g_szAuthID[33][34];
new class_player[33];
new level_player[33] = 1;
new experience_player[33];
new nowa_class_player[33];
new const experience_level[] =
{
0,35,140,315,560,875,1260,1715,2240,2835,3500,4235, 5040,5915,6860,7875,8960,10115,11340,12635,14000,15435,16940,18515,20160,21875,23660,25515,27440,29435,31500,33635,35840,38115,40460,42875,45360,47915,50540,53235,56000,58835,61740,64715,67760,70875,
74060,77315,80640,84035,87500,91035,94640,98315,102060,105875,109760,113715,117740,121835,126000,130235,134540,138915,143360,147875,152460,157115,161840,166635,171500,176435,181440,186515,191660,196875,202160,207515,212940,218435,224000,229635,235340,241115,246960,252875,258860,
264915,271040,277235,283500,289835,296240,302715,309260,315875,322560,329315,336140,343035,350000,357035,364140
};
new punkty_player[33];
new zdrowie_player[33];
new inteligencja_player[33];
new wytrzymalosc_player[33];
new Float:redukcja_obrazen_player[33];
new kondycja_player[33];
new maksymalne_zdrowie_player[33];
new Float:fast_player[33];
new bool:gracz_resetuje[33];
enum { NONE = 0, Sniper, Commando, Sharpshooter, Protector, Medico, FireSupport, Sapper, Destructor, Corredor, SpeedHacker, CoFundad0r, Fundad0r };
new const zdrowie_klasy[] = { 0, 120, 130, 110, 250, 150, 10 0, 100, 130, 100, 130};
new const Float:fast_klasy[] = {0.0, 1.2, 1.35, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0, 1.45 , 1.15};
new const pancerz_klasy[] = { 0, 100, 100, 100, 200, 100,&nbs p;0, 100, 100, 0, 150};
new const names_klas[][] = {"Ninguno",
"Sniper",
"Commando",
"Tirador de Primera",
"Protector",
"Medico",
"Soporte de Fuego",
"Plantador de Minas",
"Destructor",
"Corredor",
"SpeedHacker",
"CoFundad0r",
"Fundad0r"
};
new const descriptions_klas[][ 093; = {"Ninguno",
"Recieves AWP, Deagle, 120 hp. 1/3 chance of instant knife kill. 110 Speed, 100 Amour.",
"Recieves Deagle, 130 hp. Instand knife kills (right click only), 135 Speed, 100 Armour",
"Recieves AK47, M4A1 & 110hp. 80 Speed, 100 Armour",
"Recieves M249, 250 hp & All grenades, Immune to mines, 200 Armour",
"Recieves SG552, 150 hp. First Aid Kit, 100 Armour",
"Recieves MP5, 100 hp, Two rockets, Extra hit points per hit",
"Recieves P90, 100 hp, Gets 3 mines, 100 Armour",
"Recieves AUG, 130 hp, All grenades, Gets dynamite which does spreaded damage, 100 Armour",
"Recieves M3, 100 hp, 145 Speed",
"Recieves Knife, 120 hp, 250 Speed",
"Recieves G3SG1, 125 hp, Flashbang, 120 Speed, 10 HP per kill, 100 Armour",
"Recieves Famas, 135 hp, HEGrenade, 130 Speed, 20 HP per kill, Double jump, 120 Armour"
};
new ilosc_apteczek_player[33];
new ilosc_rakiet_player[33];
new Float:poprzednia_rakieta_player[33];
new ilosc_min_player[33];
new ilosc_dynamitow_player[33];
new ilosc_skokow_player[33];
new bool:freezetime = true;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
g_vault = nvault_open("CodMod");
register_think("FirstAidKit","FirstAidKitThink");
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
RegisterHam(Ham_Spawn, "player", "Odrodzenie", 1);
register_forward(FM_CmdStart, "CmdStart");
register_forward(FM_EmitSound, "EmitSound");
register_logevent("PoczatekRundy", 2, "1=Round_Start");
register_logevent("BombaPodlozona", 3, "2=Planted_The_Bomb");
register_event("SendAudio", "BombaRozbrojona", "a", "2&%!MRAD_BOMBDEF");
register_event("BarTime", "RozbrajaBomb", "be", "1=10", "1=5");
register_event("DeathMsg", "Death", "ade");
register_event("Damage", "Damage", "b", "2!=0");
register_event("CurWeapon","CurWeapon","be", "1=1");
register_event("HLTV", "NowaRunda", "a", "1=0", "2=0");
register_touch("Rocket", "*" , "DotykRakiety");
register_touch("Mine", "player", "DotykMiny");
register_cvar("cod_killxp", "50");
register_c var("cod_bombxp", "100");
register_clcmd("say /clase", "WybierzKlase");
register_clcmd("say /claseinfo", "DescriptionKlasy");
register_clcmd("say /item", "DescriptionItem");
register_clcmd("say /drop", "WyrzucPrzedmiot");
register_clcmd("say /reset", "KomendaResetujPunkty");
register_clcmd("say /help", "userhelp", 0, " - Help Motd ");
register_clcmd("say /save","ZapiszDane")
register_clcmd("fullupdate", "CommandBlock");
register_clcmd("cl_autobuy", "CommandBlock");
register_clcmd("cl_rebuy", "CommandBlock");
register_clcmd("cl_setautobuy","CommandBlock");
register_clcmd("rebuy", "CommandBlock");
register_clcmd("autobuy", "CommandBlock");
register_clcmd("glock", "CommandBlock");
register_clcmd("usp", "CommandBlock");
register_clcmd("p228", "CommandBlock");
register_clcmd("deagle", "CommandBlock");
register_clcmd("elites", "CommandBlock");
register_clcmd("fn57", "CommandBlock");
register_clcmd("m3", "CommandBlock");
register_clcmd("autoshotgun", "CommandBlock");
register_clcmd("mac10", "CommandBlock");
register_clcmd("tmp", "CommandBlock");
register_clcmd("mp5", "CommandBlock");
register_clcmd("ump45", "CommandBlock");
register_clcmd("p90", "CommandBlock");
register_clcmd("galil", "CommandBlock");
register_clcmd("famas", "CommandBlock");
register_clcmd( "fiveseven", "CommandBlock");
register_clcmd("xm1014", "CommandBlock");
register_clcmd("ak47", "CommandBlock");
register_clcmd("scout", "CommandBlock");
register_clcmd("sg552", "CommandBlock");
register_clcmd("awp", "CommandBlock");
register_clcmd("g3sg1", "CommandBlock");
register_clcmd("famas", "CommandBlock");
register_clcmd("m4a1", "CommandBlock");
register_clcmd("bullpup", "CommandBlock");
register_clcmd("sg550", "CommandBlock");
register_clcmd("m249", "CommandBlock");
register_clcmd("shield", "CommandBlock");
register_clcmd("shield_r", "CommandBlock");
register_clcmd("hegren", "CommandBlock");
register_clcmd("sgren", "CommandBlock");
register_clcmd("flash", "CommandBlock");
register_concmd("cod_setlvl", "cmd_setlvl", ADMIN_KICK, "<name> <level>");
g_msg_screenfade = get_user_msgid("ScreenFade");
SyncHudObj = CreateHudSyncObj();
SyncHudObj2 = CreateHudSyncObj();
SyncHudObj3 = CreateHudSyncObj();
experience_for_murder = get_cvar_num("cod_killxp ");
experience_for_bomb = get_cvar_num("cod_bombxp");
set_task(60.0, "Pomoc");
}
public plugin_cfg()
{
server_cmd("sv_maxspeed 1600");
}
public plugin_precache()
{
sprite_white = precache_model("sprites/white.spr") ;
sprite_blast = precache_model("sprites/dexplo.spr");
precache_sound("MW/select.wav");
precache_sound("MW/start.wav");
precache_sound("MW/start2.wav");
precache_sound("MW/levelup.wav");
precache_model("models/w_medkit.mdl");
precache_model("models/rpgrocket.mdl");
precache_model("models/mine.mdl");
}
public CmdStart(id, uc_handle)
{
if(!is_user_alive(id))
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = get_user_oldbutton(id);
new flags = get_entity_flags(id);
if(information_item_player[id][0] == 11 || class_player[id] == Fundad0r)
{
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && ilosc_skokow _player[id] > 0)
{
ilosc_skokow_player[id]--;
new Float:velocity[3];
entity_get_vector(id,EV_VEC_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
entity_set_vector(id,EV_VEC_velocity,velocity);
}
else if(flags & FL_ONGROUND)
{
ilosc_skokow_player[id] = 0;
if(information_item_player[id][0] == 11)
ilosc_skokow_player[id]++;
if(class_player[id] == Fundad0r)
ilosc_skokow_player[id]++;
}
}
if(button & IN_ATTACK)
{
new Float:punchangle[3];
if(information_item_player[id][0] ; == 20)
entity_set_vector(id, EV_VEC_punchangle, punchangle);
if(information_item_player[id][0] == 23)
{
entity_get_vector(id, EV_VEC_punchangle, punchangle);
for(new i=0; i<3;i++)
punchangle[i]*=0.9;
entity_set_vector(id, EV_VEC_punchangle, punchangle);
}
}
if(information_item_player[id][0] == 28 && button & IN_JUMP && < span>button & IN_DUCK && flags & FL_ONGROUND && get_gametime() > information_item_player[id][1]+4.0)
{
information_item_player[id][1] = floatround(get_gametime());
new Float:velocity[3];
VelocityByAim(id, 700, velocity);
velocity[2] = random_float(265.0,285.0);
entity_set_vector(id, EV_VEC_velocity, velocity);
}
return FMRES_IGNORED;
}
public Odrodzenie(id)
{
if(!is_user_alive(id) || !is_u ser_connected(id))
return PLUGIN_CONTINUE;
if(nowa_class_player[id])
{
class_player[id] = nowa_class_player[id];
nowa_class_player[id] = 0;
strip_user_weapons(id);
give_item(id, "weapon_knife");
switch(get_user_team(id))
{
case 1: give_item(id, "weapon_glock18");
case 2: give_item(id, "weapon_usp");
}
WczytajDane(id, class_player[id]);
}
if(!class_player[id])
{
WybierzKlase(id);
return PLUGIN_CONTINUE;
}
switch(class_player[id])
{
case Sniper:
{
give_item(id, "weapon_awp" );
give_item(id, "weapon_deagle");
}
case Commando:
{
give_item(id, "weapon_deagle");
}
case Sharpshooter:
{
give_item(id, "weapon_m4a1");
give_item(id, "weapon_ak47");
}
case Protector:
{
give_item(id, "weapon_m249");
give_item(id, "weapon_hegrenade");
give_item(id, "weap on_flashbang");
give_item(id, "weapon_smokegrenade");
}
case Medico:
{
give_item(id, "weapon_sg552");
ilosc_apteczek_player[id] = 2;
} &n bsp;
case FireSupport:
{
give_item(id, "weapon_mp5navy");
ilosc_rakiet_player[id] = 2;
}
case Sapper:
{
give_item(id, "weapon_p90");
  ; ilosc_min_player[id] = 3;
}
case Destructor:
{
give_item(id, "weapon_aug");
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
&nb sp; give_item(id, "weapon_smokegrenade");
ilosc_dynamitow_player[id] = 1;
}
case Corredor:
{
give_item(id, "weapon_m3");
}
case SpeedHacker:
&nb sp;{
give_item(id, "weapon_knife");
}
case CoFundad0r:
{
give_item(id, "weapon_g3sg1");
give_item(id, "weapon_flashbang");
}
case Fundad0r:
& nbsp; {
give_item(id, "weapon_famas");
give_item(id, "weapon_hegrenade");
}
}
if(gracz_resetuje[id])
{
ResetujPunkty(id);
gracz_resetuje[id] = false;
&nb sp;}
if(punkty_player[id]>0)
PrzydzielPunkty(id);
if(information_item_player[id][0] == 10 || information_item_player[id][0] == 9)
give_item(id, "weapon_hegrenade");
if(information_item_play er[id][0] == 9)
ZmienUbranie(id, 0);
if(information_item_player[id][0] == 1)
set_user_footsteps(id, 1);
else
set_user_footsteps(id, 0);
if(information_item_player[id][0] == 13)
give_item(id, "weapon_awp");
if(information_item_player[id][0] == 19)
information_item_player[id][1] = 1;
if(information_item_player[id][0] == 27) information_item_player[id][1] = 3;
new weapons[32];
new weaponsnum;
get_user_weapons(id, weapons, weaponsnum);
for(new i=0; i<weaponsnum; i++)
if(is_user_alive(id))
&nb sp; if(maxAmmo[weapons[i]] > 0)
cs_set_user_bpammo(id, weapons[i], maxAmmo[weapons[i]]);
redukcja_obrazen_player[id] = (47.3057*(1.0-floatpower( 2.7182, -0.06798*float(wytrzymalosc_player[id])))/ 100);
maksymalne_zdrowie_player[id] = zdrowie_klasy[class_player[id]]+zdrowie_player[id]*2;
fast_player[id] = STANDARD_FAST*fast_klasy[class_player[id]]+floatround(kondycja_player[id]*1.3);
if(information_item_player[id 093;[0] == 18)
{
maksymalne_zdrowie_player[id] += 100;
fast_player[id] -= 0.4;
}
if(information_item_player[id][0] == 25)
{
maksymalne_zdrowie_player[id] += 50;
fast_player[id] -= 0.3;
}
set_user_armor(id, pancerz_klasy[class_player[id]]);
set_user_health(id, maksymalne_zdrowie_player[id]);
if(information_item_player[id][0] == 17)
set_user_armor(id, 500);
return PLUGIN_CONTINUE;
}
public PoczatekRundy()
{
freezetime = false;
for(new id=0;id<=32;id++)
{
if(!is_user_alive(id))
continue;
set_task(0.1, "SetF ast", id+TASK_SET_FAST);
switch(get_user_team(id))
{
case 1: client_cmd(id, "spk MW/start");
case 2: client_cmd(id, "spk MW/start2");
}
}
}
public NowaRunda()
{
freezetime = true;
new iEnt = find_ent_by_class(-1, "Mine");
while(iEnt > 0)
{
remove_entity(iEnt);
iEnt = find_ent_by_class(iEnt, "Mine");
}
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_alive(this) || !is_user_connected(this) || information_item_player[this][0] == 24 || !is_user_connected(idattacker) || get_user_team(this) == get_user_team(idattacker) || !class_player[idattacker])
&nbs p; return HAM_IGNORED;
new health = get_user_health(this);
new weapon = get_user_weapon(idattacker);
if(health < 2)
return HAM_IGNORED;
if(information_item_player[this][0] == 27 && information_item_player [this][1]>0)
{
information_item_player[this][1]--;
return HAM_SUPERCEDE;
}
if(wytrzymalosc_player[this]>0)
damage -= redukcja_obrazen_player[this]*damage;
if(information_item_player 091;this][0] == 2 || information_item_player[this][0] == 3)
damage-=(float(information_item_player[this][1])<damage)? float(information_item_player[this][1]): damage;
if(information_item_player[idattacker][0] == 5 && !UTIL_In_FOV(this, idattacker) && UTIL_In_FOV(idattacker, this))
damage*=2.0;
if(information_item_player[idattacker][0] == 10)
damage+=information_item_player[idattacker][1];
if(information_item_player[this][0] == 12)
damage-=(5.0<damage)? 5.0: damage;
if(weapon == CSW_AWP && information_item_player[idattacker][0] == 13)
damage=float(health);
if(information_item_playe r[idattacker][0] == 21)
damage+=15;
if(information_item_player[idattacker][0] == 22)
damage+=25;
if(idinflictor != idattacker && entity_get_int(idinflictor, EV_INT_movetype) != 5)
&nbs p;{
if((information_item_player[idattacker][0] == 9 && random_num(1, information_item_player[idattacker][1]) == 1) || information_item_player[idattacker][0] == 10)
damage = float(health);
}
if(weapon == CSW_KNIFE)
{
if(information_item_player[this][0] == 4)
damage=damage*1.4+inteligencja_player[idattacker];
if(information_item_player[idattacker][0] == 8 || (class_player[idattacker]  ;== Sniper && random(2) == 2) || class_player[idattacker] == Commando && !(get_user_button(idattacker) & IN_ATTACK))
damage = float(health);
}
if(information_item_player[this][0] == 26 && random_num(1, information_item_player[this][1]) == 1)
{
SetHamParamEntity(3, this);
SetHamParamEntity(1, idattacker);
}
SetHamParamFloat(4, damage);
return HAM_IGNORED;
}
public Damage(id)
{
new attacker = get_user_attacker(id);
new damage = read_data(2);
if(!is_user_alive(attacker) || !is_user_connected(attacker) || id == attacker || !class_player[attacker])
return PLUGIN_CONTINUE;
if(information_item_player[attacker][0] == 12 && random_num(1, information_item_player[id][1]) == 1)
Display_Fade(id,1<<14,1<<14 ,1<<16,255,155,50,230);
if(get_user_team(id) != get_user_team(attacker))
{
while(damage>20)
{
damage-=20;
experience_player[attacker]++;
}
}
SprawdzLevel(attacker);
return PLUGIN_CONTINUE;
}
public Death()
{
new id = read_data(2);
new attacker = read_data(1);
if(!is_user_alive(attacker) || !is_user_connected(attacker))
return PLUGIN_CONTINUE;
new weapon = get_user_weapon(attacker);
new zdrowie = get_user_health(attacker);
if(get_user_team(i d) != get_user_team(attacker) && class_player[attacker])
{
new nowe_experience = 0;
nowe_experience += experience_for_murder;
if(class_player[id] == Fundad0r && class_player[attacker] != Fundad0r )
nowe_experience += experience_for_murder*2;
if(level_player[id] > level_player[attacker])
nowe_experience += level_player[id] - level_player[attacker];
if(class_player[attacker] == Fundad0r || information_item_player[attacker][0] == 15 && maxClip[weapon] != -1)
{
new nowe_zdrowie = (zdrowie+20<maksymalne_zdrowie_player[attacker])? zdrowie+20: maksymalne_zdrowie_player[ attacker];
set_user_clip(attacker, maxClip[weapon]);
set_user_health(attacker, nowe_zdrowie);
}
#if defined BOT
if(is_user_bot2(attacker) && random(9) == 0)
WyrzucPrzedmiot (id);
Subscribe to:
Post Comments
(
Atom
)
Post a Comment