/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <engine>
#include <fun>
#include <colorchat>
new bool:ma_klase[33];
new bool:uzywa[33];
new pozostale_spadochrony[33];
new para_ent[33];
new const nazwa[] = "Striker";
new const opis[] = "Posiada spadochron i ciche kroki";
new const bronie = 1<<CSW_M4A1 | 1<<CSW_MAC10 | 1<<CSW_HEGRANDE;
new const zdrowie = 25;
new const kondycja = 25;
new const inteligencja = 25;
new const wytrzymalosc = 25;
public plugin_init()
{
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("ResetHUD", "ResetHUD", "abe");
}
public plugin_precache()
precache_model("models/parachute.mdl");
public cod_class_enabled(id)
{
ColorChat(id, GREEN, "Klasa stworzona przez Alechandro");
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[id] = false;
public cod_class_skill_used(id)
{
if(pozostale_spadochrony[id] > 0)
{
if(para_ent[id])
uzywa[id] = false;
else
{
uzywa[id] = true;
pozostale_spadochrony[id]--;
}
}
else
ColorChat(id, RED, "Wykorzystales juz wszystkie 5 spadochronow");
}
public client_PreThink(id)
{
//parachute.mdl animation information
//0 - deploy - 84 frames
//1 - idle - 39 frames
//2 - detach - 29 frames
if (!is_user_alive(id) || !ma_klase[id]) return
new Float:fallspeed = -100.0
new Float:frame
new flags = get_entity_flags(id)
if (para_ent[id] > 0 && (flags & FL_ONGROUND)) {
uzywa[id] = false;
if (get_user_gravity(id) == 0.1) set_user_gravity(id, 1.0)
if (entity_get_int(para_ent[id],EV_INT_sequence) != 2) {
entity_set_int(para_ent[id], EV_INT_sequence, 2)
entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
entity_set_float(para_ent[id], EV_FL_frame, 0.0)
entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
entity_set_float(para_ent[id], EV_FL_animtime, 0.0)
entity_set_float(para_ent[id], EV_FL_framerate, 0.0)
return
}
frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 2.0
entity_set_float(para_ent[id],EV_FL_fuser1,frame)
entity_set_float(para_ent[id],EV_FL_frame,frame)
if (frame > 254.0) {
remove_entity(para_ent[id])
para_ent[id] = 0
}
}
if (uzywa[id]) {
new Float:velocity[3]
entity_get_vector(id, EV_VEC_velocity, velocity)
if (velocity[2] < 0.0) {
if(para_ent[id] <= 0) {
para_ent[id] = create_entity("info_target")
if(para_ent[id] > 0) {
entity_set_string(para_ent[id],EV_SZ_classname,"parachute")
entity_set_edict(para_ent[id], EV_ENT_aiment, id)
entity_set_edict(para_ent[id], EV_ENT_owner, id)
entity_set_int(para_ent[id], EV_INT_movetype, MOVETYPE_FOLLOW)
entity_set_model(para_ent[id], "models/parachute.mdl")
entity_set_int(para_ent[id], EV_INT_sequence, 0)
entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
entity_set_float(para_ent[id], EV_FL_frame, 0.0)
entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
}
}
if (para_ent[id] > 0) {
entity_set_int(id, EV_INT_sequence, 3)
entity_set_int(id, EV_INT_gaitsequence, 1)
entity_set_float(id, EV_FL_frame, 1.0)
entity_set_float(id, EV_FL_framerate, 1.0)
set_user_gravity(id, 0.1)
velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed
entity_set_vector(id, EV_VEC_velocity, velocity)
if (entity_get_int(para_ent[id],EV_INT_sequence) == 0) {
frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 1.0
entity_set_float(para_ent[id],EV_FL_fuser1,frame)
entity_set_float(para_ent[id],EV_FL_frame,frame)
if (frame > 100.0) {
pozostale_spadochrony[id]--;
entity_set_float(para_ent[id], EV_FL_animtime, 0.0)
entity_set_float(para_ent[id], EV_FL_framerate, 0.4)
entity_set_int(para_ent[id], EV_INT_sequence, 1)
entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
entity_set_float(para_ent[id], EV_FL_frame, 0.0)
entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
}
}
}
}
else if (para_ent[id] > 0) {
remove_entity(para_ent[id])
set_user_gravity(id, 1.0)
para_ent[id] = 0
}
}
else if (para_ent[id] > 0 ) {
remove_entity(para_ent[id])
set_user_gravity(id, 1.0)
para_ent[id] = 0
}
}
public ResetHUD(id)
{
uzywa[id] = false;
pozostale_spadochrony[id] = 9999;
}
public cod_class_enabled(id)
set_user_footsteps(id, 1);
public cod_class_disabled(id)
set_user_footsteps(id, 0);
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
4 replies to this topic
#1
Posted 18.01.2012 23:24
nie kompiluje mi tej klasy nie wiem co zle zrobilem proszę o jej prawdzenie nagradzam +
#2
Posted 18.01.2012 23:36
Automatyczna wiadomość
Ten temat został przeniesiony z forum:
Mody → Call of Duty Mod → Pytania
do
Scripting AMXX → Prośby o kompilacje pluginów / Problemy z kompilacją
#3
Posted 19.01.2012 00:44
lap sma i amxx
codclass_striker.sma 4.46KB 20 downloads
codclass_striker.amxx codclass_striker.amxx 8.61KB 0 downloads
codclass_striker.sma 4.46KB 20 downloads
codclass_striker.amxx codclass_striker.amxx 8.61KB 0 downloads
#4
Posted 19.01.2012 10:09
dzieks
#5
Posted 19.01.2012 18:23
Wiadomość wygenerowana automatycznie
Ten temat został zamknięty przez moderatora.
Powód: Pomoc udzielona
Jeśli się z tym nie zgadzasz, raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.
Z pozdrowieniami,
Zespół AMXX.PL
Ten temat został zamknięty przez moderatora.
Powód: Pomoc udzielona
Jeśli się z tym nie zgadzasz, raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.
Z pozdrowieniami,
Zespół AMXX.PL
Also tagged with one or more of these keywords: cod nowy
CoD Nowy
perk zwiększający wytrzymałość pekuStarted by Rafii, 05.03.2024 cod nowy |
|
||||
|
CoD Nowy
Modele KlasyStarted by Puni07, 11.02.2024 cod nowy |
|
|||
CoD Nowy
Problem z dywizjąStarted by Puni07, 08.02.2024 cod nowy |
|
||||
CoD Nowy
Misjedodac exp Started by Anonimowy09, 08.01.2024 cod nowy |
|
||||
CoD Nowy
Broń z cso do klasy postaciStarted by Voltia, 12.02.2023 cod nowy |
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users