Raised This Month: $12 Target: $400
 3% 

Parachute 1.3 (KRoTaL)


Post New Thread Reply   
 
Thread Tools Display Modes
ZEDD_Intensity
Senior Member
Join Date: Jun 2016
Old 06-16-2018 , 17:13   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #251

Quote:
Originally Posted by anash View Post
Any way to make parachute only for admins ?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>

new para_ent[33]
new 
pDetachpFallSpeedpEnabled

#define PARACHUTE_LEVEL ADMIN_LEVEL_B

public plugin_init()
{
    
register_plugin("Parachute""1.3""KRoT@L/JTP10181")
    
pEnabled register_cvar("sv_parachute""1" )
    
pFallSpeed register_cvar("parachute_fallspeed""70")
    
pDetach register_cvar("parachute_detach""1")
    
    
register_event("DeathMsg""death_event""a")
    
    
//Setup jtp10181 CVAR
    
new cvarString[256], shortName[16]
    
copy(shortName,15,"chute")
    
    
register_cvar("jtp10181","",FCVAR_SERVER|FCVAR_SPONLY)
    
get_cvar_string("jtp10181",cvarString,255)
    
    if (
strlen(cvarString) == 0) {
        
formatex(cvarString,255,shortName)
        
set_cvar_string("jtp10181",cvarString)
    }
    else if (
contain(cvarString,shortName) == -1) {
        
format(cvarString,255,"%s,%s",cvarStringshortName)
        
set_cvar_string("jtp10181",cvarString)
    }
}

public 
plugin_natives()
{
    
set_module_filter("module_filter")
    
set_native_filter("native_filter")
}

public 
module_filter(const module[])
{
    if (!
cstrike_running() && equali(module"cstrike")) {
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE
}

public 
native_filter(const name[], indextrap)
{
    if (!
trap) return PLUGIN_HANDLED
    
    
return PLUGIN_CONTINUE
}

public 
plugin_precache()
{
    
precache_model("models/parachute.mdl")
}

public 
client_putinserver(id)
{
    
parachute_reset(id)
}

public 
client_disconnect(id)
{
    
parachute_reset(id)
}

public 
death_event()
{
    new 
id read_data(2)
    if(
<= id <= 32)
    
parachute_reset(id)
}

parachute_reset(id)
{
    if(
para_ent[id] > 0) {
        if (
is_valid_ent(para_ent[id])) {
            
remove_entity(para_ent[id])
        }
    }
    
    if (
is_user_alive(id)) set_user_gravity(id1.0)
    
    
para_ent[id] = 0
}

public 
client_PreThink(id)
{
    
//parachute.mdl animation information
    //0 - deploy - 84 frames
    //1 - idle - 39 frames
    //2 - detach - 29 frames
    
    
if (!get_pcvar_num(pEnabled)) return
    if (!
is_user_alive(id) || !access(id,PARACHUTE_LEVEL)) return
    
    new 
Float:fallspeed get_pcvar_float(pFallSpeed) * -1.0
    
new Float:frame
    
    
new button get_user_button(id)
    new 
oldbutton get_user_oldbutton(id)
    new 
flags get_entity_flags(id)
    
    if (
para_ent[id] > && (flags FL_ONGROUND)) {
        
        if (
get_pcvar_num(pDetach)) {
            
            if (
get_user_gravity(id) == 0.1set_user_gravity(id1.0)
            
            if (
entity_get_int(para_ent[id],EV_INT_sequence) != 2) {
                
entity_set_int(para_ent[id], EV_INT_sequence2)
                
entity_set_int(para_ent[id], EV_INT_gaitsequence1)
                
entity_set_float(para_ent[id], EV_FL_frame0.0)
                
entity_set_float(para_ent[id], EV_FL_fuser10.0)
                
entity_set_float(para_ent[id], EV_FL_animtime0.0)
                
entity_set_float(para_ent[id], EV_FL_framerate0.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
            
}
        }
        else {
            
remove_entity(para_ent[id])
            
set_user_gravity(id1.0)
            
para_ent[id] = 0
        
}
        
        return
    }
    
    if (
button IN_USE) {
        
        new 
Float:velocity[3]
        
entity_get_vector(idEV_VEC_velocityvelocity)
        
        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_aimentid)
                    
entity_set_edict(para_ent[id], EV_ENT_ownerid)
                    
entity_set_int(para_ent[id], EV_INT_movetypeMOVETYPE_FOLLOW)
                    
entity_set_model(para_ent[id], "models/parachute.mdl")
                    
entity_set_int(para_ent[id], EV_INT_sequence0)
                    
entity_set_int(para_ent[id], EV_INT_gaitsequence1)
                    
entity_set_float(para_ent[id], EV_FL_frame0.0)
                    
entity_set_float(para_ent[id], EV_FL_fuser10.0)
                }
            }
            
            if (
para_ent[id] > 0) {
                
                
entity_set_int(idEV_INT_sequence3)
                
entity_set_int(idEV_INT_gaitsequence1)
                
entity_set_float(idEV_FL_frame1.0)
                
entity_set_float(idEV_FL_framerate1.0)
                
set_user_gravity(id0.1)
                
                
velocity[2] = (velocity[2] + 40.0 fallspeed) ? velocity[2] + 40.0 fallspeed
                entity_set_vector
(idEV_VEC_velocityvelocity)
                
                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) {
                        
entity_set_float(para_ent[id], EV_FL_animtime0.0)
                        
entity_set_float(para_ent[id], EV_FL_framerate0.4)
                        
entity_set_int(para_ent[id], EV_INT_sequence1)
                        
entity_set_int(para_ent[id], EV_INT_gaitsequence1)
                        
entity_set_float(para_ent[id], EV_FL_frame0.0)
                        
entity_set_float(para_ent[id], EV_FL_fuser10.0)
                    }
                }
            }
        }
        else if (
para_ent[id] > 0) {
            
remove_entity(para_ent[id])
            
set_user_gravity(id1.0)
            
para_ent[id] = 0
        
}
    }
    else if ((
oldbutton IN_USE) && para_ent[id] > ) {
        
remove_entity(para_ent[id])
        
set_user_gravity(id1.0)
        
para_ent[id] = 0
    
}

PHP Code:
#define PARACHUTE_LEVEL ADMIN_LEVEL_B 
Kind Regards,
ZEDD
__________________
ZEDD_Intensity is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 02-12-2019 , 08:50   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #252

Amx parachute made me a AMXX user circa 2012 because it worked. 'Stock' Satellite Rain brings Amx Parachute prethink to it's knees.

Quote:
error_20190205.log:L 02/05/2019 - 22:11:53: [AMXX] [0] amx_parachute.sma::client_PreThink (line 397)
error_20190205.log:L 02/05/2019 - 22:11:53: [AMXX] Displaying debug trace (plugin "testing/amx_parachute.amxx", version "1.3")
1000x per second.
__________________

Last edited by DJEarthQuake; 05-17-2020 at 12:33. Reason: Post abbreviation
DJEarthQuake is offline
Old 10-22-2019, 19:22
DJEarthQuake
This message has been deleted by DJEarthQuake. Reason: crash is back
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-27-2019 , 11:34   AMXX Parachute 1.7 JAN 2021
Reply With Quote #253

Updated version of this plugin.
__________________

Last edited by DJEarthQuake; 08-22-2022 at 00:10. Reason: New thread
DJEarthQuake is offline
maxedrom
Junior Member
Join Date: Apr 2020
Location: Argentina
Old 05-14-2020 , 15:21   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #254

Problem when compiling.
Code:
// C:\Games\HLDS\cstrike\addons\amxmodx\scripting\amx_parachute.sma(145) : warning 233: symbol "client_disconnect" is marked as deprecated: Use client_disconnected() instead.
//
// Header size:           1976 bytes
// Code size:            16812 bytes
// Data size:             7080 bytes
// Stack/heap size:      16384 bytes
// Total requirements:   42252 bytes
//
// 1 Warning.
// Done.
//
// Compilation Time: 0,41 sec
// ----------------------------------------
maxedrom is offline
Send a message via AIM to maxedrom
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-14-2020 , 19:25   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #255

Change disconnect to disconnected. Warning vanishes.
__________________

Last edited by DJEarthQuake; 05-17-2020 at 17:47.
DJEarthQuake is offline
XuberAxel
Junior Member
Join Date: Dec 2017
Old 05-16-2020 , 23:05   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #256

Nice plugin! Can you make a cvar to turn on/off the automatic parachute for admins?
XuberAxel is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-17-2020 , 12:25   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #257

Thanks; updated.
__________________

Last edited by DJEarthQuake; 05-19-2020 at 17:31.
DJEarthQuake is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 05-21-2020 , 09:04   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #258

Can you add like parachute_teams cvar. So you can have CT, TT and ALL. Is that possible. I want to have everyone use parachute on my server
supertrio17 is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-21-2020 , 19:30   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #259

Quote:
Originally Posted by supertrio17 View Post
Can you add like parachute_teams cvar. So you can have CT, TT and ALL. Is that possible. I want to have everyone use parachute on my server
parachute_cost "1000" - cost of the parachute (CStrike ONLY)

Set cost to 0.
__________________
DJEarthQuake is offline
yuusuke
Junior Member
Join Date: Jul 2020
Old 07-12-2020 , 08:13   Re: AMXX Parachute 1.6 MAY 2020
Reply With Quote #260

Quote:
Originally Posted by DJEarthQuake View Post
Plugin takeover. Support has been in a void for a decade.

What's new in 1.4?
If installed eagerly without the model it used to crash the server! Instead logs: [amx_parachute.amxx] Your parachute model is not correct!

What's new in 1.5?
Amx_parachute includes a cvar, parachute_autoadmin:
Automatically deploys the parachute when in free fall to,
  • Nobody...0.
  • Admins...1.
  • All..._ ....2.

Also, parachute_autorip, a cvar that sets how long to wait before deploying.

What's new in 1.6?
Parachute can be destroyed by attacking/aiming for backpack. It makes a shatter sound. User loses parachute putting them in a dangerous free-fall with eerie wind sound.

**The new wings model is pushed but the old or any original model can be changed by filename. Update on top of script instead of multiple places.

Checksum 37089815db1e06e5f7af4c13471a2e05 Parachute_wings.7z
d3226636f179deef1fc07882ca60bce4 amx_parachute.sma
Tested this on AMXX 1.10. St_bessjump parachute_autorip can be 555.
Hi, I'm a beginner with poor English. I've tried to compile the V1.6 parachute with the latest AMXX 1.9.0.5271, but it showed some error messages to me. Could you help me to fix this issue?

//// amx_parachute.sma
//
// C:\HLDS\Beta_8308\cstrike\addons\amxmodx\scri pting\amx_parachute.sma(497) : warning 217: loose indentation
// C:\HLDS\Beta_8308\cstrike\addons\amxmodx\scri pting\amx_parachute.sma(501) : warning 217: loose indentation
// Header size: 2164 bytes
// Code size: 20528 bytes
// Data size: 8016 bytes
// Stack/heap size: 16384 bytes
// Total requirements: 47092 bytes
//
// 2 Warnings.
// Done.
yuusuke is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode