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

Parachute Admin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
El Abuelo Loco
Senior Member
Join Date: Jun 2020
Old 11-05-2020 , 18:05   Parachute Admin
Reply With Quote #1

Can someone pass me a parachute plugin that is only from ADMIN_LEVEL_H
El Abuelo Loco is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-05-2020 , 21:30   Re: Parachute Admin
Reply With Quote #2

Please post the code you're using.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
El Abuelo Loco
Senior Member
Join Date: Jun 2020
Old 11-06-2020 , 13:07   Re: Parachute Admin
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
Please post the code you're using.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#include <fun>

new bool:has_parachute[33]
new 
para_ent[33]
new 
pDetachpFallSpeedpEnabled

#define PARACHUTE_LEVEL ADMIN_LEVEL_A

public plugin_init()
{
    
register_plugin("Parachute""1.3""")
    
    
pEnabled register_cvar("sv_parachute""1" )
    
pFallSpeed register_cvar("parachute_fallspeed""100")
    
pDetach register_cvar("parachute_detach""1")

    
register_clcmd("say""HandleSay")
    
register_clcmd("say_team""HandleSay")

    
register_event("ResetHUD""newSpawn""be")
    
register_event("DeathMsg""death_event""a")
}

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_connect(id)
{
    
parachute_reset(id)
}

public 
client_disconnected(id)
{
    
parachute_reset(id)
}

public 
death_event()
{
    new 
id read_data(2)
    
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)

    
has_parachute[id] = false
    para_ent
[id] = 0
}

public 
newSpawn(id)
{
    if(
para_ent[id] > 0) {
        
remove_entity(para_ent[id])
        
set_user_gravity(id1.0)
        
para_ent[id] = 0
    
}
    
has_parachute[id] = true

    Print_Color
(id"")
}

public 
HandleSay(id)
{
    if(!
is_user_connected(id)) return PLUGIN_CONTINUE

    
new args[128]
    
read_args(args127)
    
remove_quotes(args)

    if (
equali(args"buy_parachute"))
    {
        
Print_Color(id"")
        return 
PLUGIN_HANDLED
    
}

    return 
PLUGIN_CONTINUE
}

public 
client_PreThink(id)
{

    if (!
get_pcvar_num(pEnabled)) return
    if (!
is_user_alive(id) || !has_parachute[id]) 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
    
}
}
stock Print_Color(id, const input[], any:...)
{
    static 
szMsg[191], msgSayText;
    
    if(!
msgSayText)
    
msgSayText get_user_msgid("SayText");
    
    
vformat(szMsg190input3);

    
replace_all(szMsg190"!g""^4");
    
replace_all(szMsg190"!y""^1");
    
replace_all(szMsg190"!team""^3");
    
    
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
    
write_byte(id id 33);
    
write_string(szMsg);
    
message_end();

El Abuelo Loco is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 11-06-2020 , 13:53   Re: Parachute Admin
Reply With Quote #4

Put this code in this func:

PHP Code:
public client_PreThink(id
This code:

PHP Code:
if(!(get_user_flags(id) & PARACHUTE_LEVEL ) ) return 
And change access level from ADMIN_LEVEL_A To ADMIN_LEVEL_H

PHP Code:
#define PARACHUTE_LEVEL ADMIN_LEVEL_H 
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 11-06-2020 at 13:55.
Supremache is offline
El Abuelo Loco
Senior Member
Join Date: Jun 2020
Old 11-06-2020 , 18:08   Re: Parachute Admin
Reply With Quote #5

Quote:
Originally Posted by Supremache View Post
Put this code in this func:

PHP Code:
public client_PreThink(id
This code:

PHP Code:
if(!(get_user_flags(id) & PARACHUTE_LEVEL ) ) return 
And change access level from ADMIN_LEVEL_A To ADMIN_LEVEL_H

PHP Code:
#define PARACHUTE_LEVEL ADMIN_LEVEL_H 
Thank you very much, you always save me I appreciate it
El Abuelo Loco is offline
Reply



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 01:00.


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