Raised This Month: $ Target: $400
 0% 

parachute E free !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
technomaster
Member
Join Date: Nov 2011
Old 04-11-2012 , 15:18   parachute E free !
Reply With Quote #1

I need a plugin for a parachute, so That Each player snake parachute and free T vs. When CT Immediately pressing E on the server, surf, zombie, thank jail

This means that after pressing the E could immediately fly, without entering into buy_parachute chat ...
technomaster is offline
AmineKyo
فوق سريرك
Join Date: Oct 2011
Location: Morocco
Old 04-11-2012 , 17:23   Re: parachute E free !
Reply With Quote #2

parachute_cost "0"
Or
http://forums.alliedmods.net/showpos...8&postcount=47
__________________
AmineKyo is offline
technomaster
Member
Join Date: Nov 2011
Old 04-11-2012 , 17:43   Re: parachute E free !
Reply With Quote #3

plugin does not work on the surf server
technomaster is offline
Old 04-11-2012, 17:49
H.RED.ZONE
This message has been deleted by H.RED.ZONE. Reason: Bug
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 04-11-2012 , 17:49   Re: parachute E free !
Reply With Quote #4

Please next time don't post something like that here this is zp forum not surf forum...
Transfered that one to every server uses money...
PHP Code:
//------------------------------------------------------------------------------

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#include <fun>

#define PLUGIN "Zombie Plague Parachute for zp4.3"
#define VERSION "1.1"
#define AUTHOR "H.RED.ZONE"

#define PARACHUTE_LEVEL ADMIN_LEVEL_A

//------------------------------------------------------------------------------

new bool:has_parachute[33]
new 
para_ent[33]
new 
gCStrike 0
new pEnabled
new pCost
new pPayback

//------------------------------------------------------------------------------

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
pEnabled register_cvar("sv_parachute""1" )

    if (
cstrike_running()) gCStrike true

    
if (gCStrike) {

        
pCost register_cvar("parachute_cost""0")
        
pPayback register_cvar("parachute_payback""75")

        
register_concmd("parachute""admin_give_parachute"PARACHUTE_LEVEL"<nick, #userid or @team>" )
    }

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

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

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

//------------------------------------------------------------------------------

public client_disconnect(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])
        }
    }
}

//------------------------------------------------------------------------------

public newSpawn(id)
{
    if(
para_ent[id] > 0) {
        
remove_entity(para_ent[id])
        
para_ent[id] = 0
    
}

    if (!
gCStrike || access(id,PARACHUTE_LEVEL) || get_pcvar_num(pCost) <= 0) {
        
has_parachute[id] = true
    
}
}

//------------------------------------------------------------------------------

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

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

    if (
gCStrike) {
        if (
equali(args"/bp")) {
            
buy_parachute(id)
            return 
PLUGIN_HANDLED
        
}
        else if (
equali(args"sell_parachute")) {
            
sell_parachute(id)
            return 
PLUGIN_HANDLED
        
}
        else if (
containi(args"give_parachute") == 0) {
            
give_parachute(id,args[15])
            return 
PLUGIN_HANDLED
        
}
    }

    if (
containi(args"parachute") != -1) {
        if (
gCStrikeclient_print(idprint_chat"[AMXX] Parachute commands: buy_parachute, sell_parachute, give_parachute")
    }

    return 
PLUGIN_CONTINUE
}

//------------------------------------------------------------------------------

public buy_parachute(id)
{
    if (!
gCStrike) return PLUGIN_CONTINUE
    
if (!is_user_connected(id)) return PLUGIN_CONTINUE

    
if (!get_pcvar_num(pEnabled)) {
        return 
PLUGIN_HANDLED
    
}

    if (
has_parachute[id]) {
        return 
PLUGIN_HANDLED
    
}

    new 
money cs_get_user_money(id)
    new 
cost get_pcvar_num(pCost)

    if (
money cost) {
        return 
PLUGIN_HANDLED
    
}

    
cs_set_user_money(idmoney cost)
    
has_parachute[id] = true

    
return PLUGIN_HANDLED
}

//------------------------------------------------------------------------------

public sell_parachute(id)
{
    if (!
gCStrike) return PLUGIN_CONTINUE
    
if (!is_user_connected(id)) return PLUGIN_CONTINUE

    
if (!get_pcvar_num(pEnabled)) {
        return 
PLUGIN_HANDLED
    
}

    if (!
has_parachute[id]) {
        return 
PLUGIN_HANDLED
    
}

    if (
access(id,PARACHUTE_LEVEL)) {
        return 
PLUGIN_HANDLED
    
}

    
parachute_reset(id)

    new 
money cs_get_user_money(id)
    new 
cost get_pcvar_num(pCost)

    new 
sellamt floatround(cost * (get_pcvar_num(pPayback) / 100.0))
    
cs_set_user_money(idmoney sellamt)

    return 
PLUGIN_CONTINUE
}

//------------------------------------------------------------------------------

public give_parachute(id,args[])
{
    if (!
gCStrike) return PLUGIN_CONTINUE
    
if (!is_user_connected(id)) return PLUGIN_CONTINUE

    
if (!get_pcvar_num(pEnabled)) {
        return 
PLUGIN_HANDLED
    
}

    if (!
has_parachute[id]) {
        return 
PLUGIN_HANDLED
    
}

    new 
player cmd_target(idargs4)
    if (!
player) return PLUGIN_HANDLED

    
new id_name[32], pl_name[32]
    
get_user_name(idid_name31)
    
get_user_name(playerpl_name31)

    if(
has_parachute[player]) {
        return 
PLUGIN_HANDLED
    
}

    
parachute_reset(id)
    
has_parachute[player] = true

    
return PLUGIN_HANDLED
}

//------------------------------------------------------------------------------

public admin_give_parachute(idlevelcid) {

    if (!
gCStrike) return PLUGIN_CONTINUE

    
if(!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED

    
if (!get_pcvar_num(pEnabled)) {
        
client_print(idprint_chat"[AMXX] Parachute plugin is disabled")
        return 
PLUGIN_HANDLED
    
}

    new 
arg[32], name[32], name2[32], authid[35], authid2[35]
    
read_argv(1,arg,31)
    
get_user_name(id,name,31)
    
get_user_authid(id,authid,34)

    if (
arg[0]=='@'){
        new 
players[32], inum
        
if (equali("T",arg[1]))        copy(arg[1],31,"TERRORIST")
        if (
equali("ALL",arg[1]))    get_players(players,inum)
        else                        
get_players(players,inum,"e",arg[1])

        if (
inum == 0) {
            
console_print(id,"No clients in such team")
            return 
PLUGIN_HANDLED
        
}

        for(new 
0inuma++) {
            
has_parachute[players[a]] = true
        
}

        switch(
get_cvar_num("amx_show_activity"))    {
            case 
2:    client_print(0,print_chat,"ADMIN %s: gave a parachute to ^"%s^" players",name,arg[1])
            case 
1:    client_print(0,print_chat,"ADMIN: gave a parachute to ^"%s^" players",arg[1])
        }

        
console_print(id,"[AMXX] You gave a parachute to ^"%s^" players",arg[1])
        
log_amx("^"%s<%d><%s><>^" gave a parachute to ^"%s^""name,get_user_userid(id),authid,arg[1])
    }
    else {

        new 
player cmd_target(id,arg,6)
        if (!
player) return PLUGIN_HANDLED

        has_parachute
[player] = true

        get_user_name
(player,name2,31)
        
get_user_authid(player,authid2,34)

        switch(
get_cvar_num("amx_show_activity")) {
            case 
2:    client_print(0,print_chat,"ADMIN %s: gave a parachute to ^"%s^"",name,name2)
            case 
1:    client_print(0,print_chat,"ADMIN: gave a parachute to ^"%s^"",name2)
        }

        
console_print(id,"[AMXX] You gave a parachute to ^"%s^""name2)
        
log_amx("^"%s<%d><%s><>^" gave a parachute to ^"%s<%d><%s><>^""name,get_user_userid(id),authid,name2,get_user_userid(player),authid2)
    }
    return 
PLUGIN_HANDLED
}

//------------------------------------------------------------------------------

public client_PreThink(id)
{
    if( 
get_cvar_num"sv_parachute" ) == )
    {
        return 
PLUGIN_CONTINUE
    
}

    if( !
is_user_alive(id) )
    {
        return 
PLUGIN_CONTINUE
    
}

    if( 
has_parachute[id] )
    {
        if (
get_user_button(id) & IN_USE )
        {
            if ( !( 
get_entity_flags(id) & FL_ONGROUND ) )
            {
                new 
Float:velocity[3]
                
entity_get_vector(idEV_VEC_velocityvelocity)
                if(
velocity[2] < 0)
                {
                    if (
para_ent[id] == 0)
                    {
                        
para_ent[id] = create_entity("info_target")
                        if (
para_ent[id] > 0)
                        {
                            
entity_set_model(para_ent[id], "models/parachute.mdl")
                            
entity_set_int(para_ent[id], EV_INT_movetypeMOVETYPE_FOLLOW)
                            
entity_set_edict(para_ent[id], EV_ENT_aimentid)
                        }
                    }
                    if (
para_ent[id] > 0)
                    {
                        
velocity[2] = (velocity[2] + 40.0 < -100) ? velocity[2] + 40.0 : -100.0
                        entity_set_vector
(idEV_VEC_velocityvelocity)
                        if (
entity_get_float(para_ent[id], EV_FL_frame) < 0.0 || entity_get_float(para_ent[id], EV_FL_frame) > 254.0)
                        {
                            if (
entity_get_int(para_ent[id], EV_INT_sequence) != 1)
                            {
                                
entity_set_int(para_ent[id], EV_INT_sequence1)
                            }
                            
entity_set_float(para_ent[id], EV_FL_frame0.0)
                        }
                        else 
                        {
                            
entity_set_float(para_ent[id], EV_FL_frameentity_get_float(para_ent[id], EV_FL_frame) + 1.0)
                        }
                    }
                }
                else
                {
                    if (
para_ent[id] > 0)
                    {
                        
remove_entity(para_ent[id])
                        
para_ent[id] = 0
                    
}
                }
            }
            else
            {
                if (
para_ent[id] > 0)
                {
                    
remove_entity(para_ent[id])
                    
para_ent[id] = 0
                
}
            }
        }
        else if (
get_user_oldbutton(id) & IN_USE)
        {
            if (
para_ent[id] > 0)
            {
                
remove_entity(para_ent[id])
                
para_ent[id] = 0
            
}
        }
    }
    
    return 
PLUGIN_CONTINUE

__________________
H.RED.ZONE is offline
Old 04-11-2012, 21:31
jc980
This message has been deleted by jc980. Reason: Dude deleted his post, which this is useless
Old 04-11-2012, 22:02
H.RED.ZONE
This message has been deleted by H.RED.ZONE. Reason: Bag on forum or on my net (:
technomaster
Member
Join Date: Nov 2011
Old 04-12-2012 , 08:47   Re: parachute E free !
Reply With Quote #5

ok,sorry
technomaster is offline
technomaster
Member
Join Date: Nov 2011
Old 04-12-2012 , 08:48   Re: parachute E free !
Reply With Quote #6

plugin please.... fatal error,plugin...
technomaster is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 04-12-2012 , 08:54   Re: parachute E free !
Reply With Quote #7

I didnt edited the models.
Change

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


AND

Code:
entity_set_model(para_ent[id], "models/parachute.mdl")


__________________

Last edited by H.RED.ZONE; 04-12-2012 at 08:54.
H.RED.ZONE is offline
technomaster
Member
Join Date: Nov 2011
Old 04-12-2012 , 10:18   Re: parachute E free !
Reply With Quote #8

plugin works fine, thank you

1. First plugin config that you do have chat shows after a few intervals, advertising, etc. .. should wwwxxxxx.xs simply chosen words ...
2. Second respawn in 1 second or earlier
3. no TK Team kill

I need plugins or config thank you
technomaster is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 04-12-2012 , 10:22   Re: parachute E free !
Reply With Quote #9

I think you can request that in Suggestions / Requests Forum, not ZP always please.
__________________
jc980 is offline
technomaster
Member
Join Date: Nov 2011
Old 04-12-2012 , 10:36   Re: parachute E free !
Reply With Quote #10

ok,sorry my friend :-)
technomaster 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 14:58.


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