Код за потвърждение: Избери целия код
AMX Mod X Compiler 1.9.0.5271
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team
/hlds/web/www/amxxpc/work/scripting/202135/1630788375/mg_parachute.sma(17) : warning 217: loose indentation
/hlds/web/www/amxxpc/work/scripting/202135/1630788375/mg_parachute.sma(57) : warning 217: loose indentation
/hlds/web/www/amxxpc/work/scripting/202135/1630788375/mg_parachute.sma(71) : warning 217: loose indentation
Header size: 1148 bytes
Code size: 5360 bytes
Data size: 888 bytes
Stack/heap size: 16384 bytes
Total requirements: 23780 bytes
3 Warnings.
Done.
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#pragma tabsize 0
new g_bParashute[33];
new gTrail;
new para_ent[33]
public plugin_precache()
{
gTrail = precache_model("sprites/mg_eff_para.spr")
precache_model("models/mg_parachute.mdl")
}
public plugin_init()
{
register_plugin("MG - Parachute", "1.1", "maeStro, Remake Nickron");
}
public client_connect(id)
{
g_bParashute[id] = false;
entity_set_float(id, EV_FL_gravity, 1.0);
}
public client_PreThink(id)
{
if(!is_user_alive(id)) return;
new Float:fallspeed = 100 * -1.0;
if(g_bParashute[id] && get_entity_flags(id) & FL_ONGROUND)
{
entity_set_float(id, EV_FL_gravity, 1.0);
g_bParashute[id] = false;
return;
}
if(get_user_button(id) & IN_USE)
{
new Float:velocity[3];
get_user_velocity(id, velocity);
if(velocity[2] < 0.0)
{
g_bParashute[id] = true;
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);
entity_set_float(id, EV_FL_gravity, 0.1);
velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed;
set_user_velocity(id, velocity);
mam_test_id(id)
modelsss(id)
set_user_rendering(id,kRenderFxGlowShell,random_num(0,255),random_num(0,255),random_num(0,255),kRenderNormal,25)
}
else if(g_bParashute[id])
{
entity_set_float(id, EV_FL_gravity, 1.0);
g_bParashute[id] = false;
}
}
else if(get_user_oldbutton(id) & IN_USE)
{
entity_set_float(id, EV_FL_gravity, 1.0);
g_bParashute[id] = false;
off_model(id)
}
}
public mam_test_id(id)
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW)
write_short(id)
write_short(gTrail)
write_byte(5)
write_byte(10)
write_byte(255)
write_byte(126)
write_byte(0)
write_byte(192)
message_end()
}
public Kill_Trail(id)
{
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(99); // TE_KILLBEAM
write_short(id)
message_end()
}
public modelsss(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/mg_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)
set_rendering (para_ent[id],kRenderFxNone,255,255,255,kRenderNormal,25);
}
}
}
}
public off_model(id)
{
remove_entity(para_ent[id])
para_ent[id] = 0
Kill_Trail(id)
rendering_off(id)
}
public rendering_off(id)
{
set_user_rendering(id, kRenderFxGlowShell,0,0,0,kRenderNormal,25)
}