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

Parachute 1.3 (KRoTaL)


Post New Thread Reply   
 
Thread Tools Display Modes
dextro89
Junior Member
Join Date: Jan 2014
Old 01-27-2014 , 08:55   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #221

does it a little rascal?
there is to a manual?

I know the not so with out
dextro89 is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 01-27-2014 , 11:22   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #222

what ?? I just told you to change the model's name in the .sma, and to read/understand previous examples -;-
__________________
ANTICHRISTUS is offline
feifei
Senior Member
Join Date: Sep 2014
Location: India
Old 10-27-2014 , 14:45   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #223

ummm, using and nice plugin. Parachute speed also smooth
and it's a common looks for parachute, can you change .mdl with different look ??
I had install different but the problem is server shutting down after pressing E
__________________
MaTriX is my life
Visit Here ;) For ZP MODs

Last edited by feifei; 10-27-2014 at 14:52.
feifei is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 10-27-2014 , 17:09   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #224

Quote:
Originally Posted by feifei View Post
and it's a common looks for parachute, can you change .mdl with different look ??
yes, edit the .sma file: put any other edited parachute model or some different stuff like wings, invisible model, etc.
__________________
ANTICHRISTUS is offline
Old 10-27-2014, 17:38
feifei
This message has been deleted by feifei.
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 10-27-2014 , 18:09   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #225

model seems good but you didn't edit the .sma file correctly, search for another "parachute.mdl"
Code:
438                    entity_set_model(para_ent[id], "models/parachute.mdl")
__________________
ANTICHRISTUS is offline
feifei
Senior Member
Join Date: Sep 2014
Location: India
Old 10-28-2014 , 06:57   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #226

Quote:
Originally Posted by ANTICHRISTUS View Post
model seems good but you didn't edit the .sma file correctly, search for another "parachute.mdl"
Code:
438                    entity_set_model(para_ent[id], "models/parachute.mdl")
thanks

I forgot to change
439 entity_set_model(para_ent[id], "models/parachute.mdl")

working great & tested
__________________
MaTriX is my life
Visit Here ;) For ZP MODs
feifei is offline
TheBladerX
Member
Join Date: Dec 2012
Location: Slovakia
Old 12-31-2014 , 05:40   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #227

How can I "force" plugin to give parachute to everyone after first 5 seconds of the round? (Knife server, sometimes players use it on 1hp map)
TheBladerX is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-31-2014 , 06:15   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #228

Just use this plugin: https://forums.alliedmods.net/showthread.php?t=175775

Although it is in ZP section, you still can use that plugin in regular CS1.6 mods. I have tested it and it is working well in my server.

This plugin will give automatically free parachute to all players.
zmd94 is offline
TheBladerX
Member
Join Date: Dec 2012
Location: Slovakia
Old 12-31-2014 , 06:19   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #229

Quote:
Originally Posted by zmd94 View Post
Just use this plugin: https://forums.alliedmods.net/showthread.php?t=175775

Although it is in ZP section, you still can use that plugin in regular CS1.6 mods. I have tested it and it is working well in my server.

This plugin will give automatically free parachute to all players.
Any chance after 5 or 10 seconds after round starts?
TheBladerX is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-31-2014 , 10:40   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #230

Just try below:
Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define _PLUGIN         "[ZP] Parachute"
#define _VERSION             "1.0"
#define _AUTHOR           "H.RED.ZONE"

#define PARACHUTE_MODEL "models/parachute.mdl"

#define MAX_PLAYERS    32

#define MarkUserHasParachute(%0)    g_bitHasParachute |= (1<<(%0&31))
#define ClearUserHasParachute(%0)    g_bitHasParachute &= ~(1<<(%0&31))
#define HasUserParachute(%0)        g_bitHasParachute & (1<<(%0&31))

new g_bitHasParachute 

new g_iUserParachute[MAX_PLAYERS+1]

new Float:g_flEntityFrame[MAX_PLAYERS+1]

new g_iModelIndex
new g_pCvarFallSpeed

new const PARACHUTE_CLASS[] = "parachute"

enum {
    deploy,
    idle,
    detach
}

public plugin_init() {
    register_plugin(_PLUGIN, _VERSION, _AUTHOR)

    g_pCvarFallSpeed = register_cvar("parachute_fallspeed", "30")
    
    register_logevent("logevent_round_start", 2, "1=Round_Start")
    
    register_forward( FM_CmdStart, "fw_Start" )
    
    RegisterHam(Ham_Killed, "player", "Ham_CBasePlayer_Killed_Post", 1)
}

public plugin_precache() {
    g_iModelIndex = precache_model(PARACHUTE_MODEL)
}

public logevent_round_start()
{
    // Free parachute after 10s of round start. ;)
    set_task(5.0, "FreePara")
}

public FreePara() 
{
    new iPlayers[32], iPlayerCount, i, id
    
    get_players(iPlayers, iPlayerCount, "a") 
    for(i = 0; i < iPlayerCount; i++)
    {
        id = iPlayers[i]

        if( HasUserParachute(id) ) 
        {
            new iEnt = g_iUserParachute[id]
            if( iEnt ) 
            {
                RemoveUserParachute(id, iEnt)
            }
        }
            
        MarkUserHasParachute(id)
    }
}

public client_disconnect(id) {
    if( HasUserParachute(id) ) {
        new iEnt = g_iUserParachute[id]
        if( iEnt ) {
            RemoveUserParachute(id, iEnt)
        }
        ClearUserHasParachute(id)
    }
}

public Ham_CBasePlayer_Killed_Post( id ) {
    if( HasUserParachute(id) ) {
        new iEnt = g_iUserParachute[id]
        if( iEnt ) {
            RemoveUserParachute(id, iEnt)
        }
        ClearUserHasParachute(id)
    }
}

RemoveUserParachute(id, iEnt) {
    engfunc(EngFunc_RemoveEntity, iEnt)
    g_iUserParachute[id] = 0
}

CreateParachute(id) {
    static iszInfoTarget
    if( !iszInfoTarget ) {
        iszInfoTarget = engfunc(EngFunc_AllocString, "info_target")
    }

    new iEnt = engfunc(EngFunc_CreateNamedEntity, iszInfoTarget)
    if( iEnt > 0) {
        static iszClass = 0
        if( !iszClass ) {
            iszClass = engfunc(EngFunc_AllocString, PARACHUTE_CLASS)
        }
        set_pev_string(iEnt, pev_classname, iszClass)
        set_pev(iEnt, pev_aiment, id)
        set_pev(iEnt, pev_owner, id)
        set_pev(iEnt, pev_movetype, MOVETYPE_FOLLOW)

        static iszModel = 0
        if( !iszModel ) {
            iszModel = engfunc(EngFunc_AllocString, PARACHUTE_MODEL)
        }
        set_pev_string(iEnt, pev_model, iszModel)
        set_pev(iEnt, pev_modelindex, g_iModelIndex)

        set_pev(iEnt, pev_sequence, deploy)
        set_pev(iEnt, pev_gaitsequence, 1)
        set_pev(iEnt, pev_frame, 0.0)
        g_flEntityFrame[id] = 0.0
        g_iUserParachute[id] = iEnt
        MarkUserHasParachute(id)
        new Float:fVecOrigin[3]
        pev(id, pev_origin, fVecOrigin)
        
        return iEnt
    }
    return 0
}

public fw_Start(id) {
    if( ~HasUserParachute(id) || !is_user_alive(id) ) {
        return
    }

    new Float:flFrame
    new iEnt = g_iUserParachute[id]

    if(iEnt > 0 && pev(id, pev_flags) & FL_ONGROUND) {

        if( pev(iEnt, pev_sequence) != detach ) {
            set_pev(iEnt, pev_sequence, detach)
            set_pev(iEnt, pev_gaitsequence, 1)
            set_pev(iEnt, pev_frame, 0.0)
            g_flEntityFrame[id] = 0.0
            set_pev(iEnt, pev_animtime, 0.0)
            set_pev(iEnt, pev_framerate, 0.0)
            return
        }

        pev(iEnt, pev_frame, flFrame)
        if( flFrame > 252.0 ) {
            RemoveUserParachute(id, iEnt)
            return
        }

        flFrame += 2.0

        g_flEntityFrame[id] = flFrame
        set_pev(iEnt, pev_frame, flFrame)

        return
    }

    if( pev(id, pev_button) & IN_USE ) {
        new Float:fVecVelocity[3], Float:fVelocity_z
        pev(id, pev_velocity, fVecVelocity)
        fVelocity_z = fVecVelocity[2]

        if( fVelocity_z < 0.0 ) {
            if(iEnt <= 0) {
                iEnt = CreateParachute(id)
            }

            fVelocity_z = floatmin(fVelocity_z + 15.0, -get_pcvar_float(g_pCvarFallSpeed))
            fVecVelocity[2] = fVelocity_z
            set_pev(id, pev_velocity, fVecVelocity)

            if( pev(iEnt, pev_sequence) == deploy ) {
                flFrame = g_flEntityFrame[id]++

                if( flFrame > 100.0 ) {
                    set_pev(iEnt, pev_animtime, 0.0)
                    set_pev(iEnt, pev_framerate, 0.4)
                    set_pev(iEnt, pev_sequence, idle)
                    set_pev(iEnt, pev_gaitsequence, 1)
                    set_pev(iEnt, pev_frame, 0.0)
                    g_flEntityFrame[id] = 0.0
                }
                else {
                    set_pev(iEnt, pev_frame, flFrame)
                }
            }
        }
        else if(iEnt > 0) {
            RemoveUserParachute(id, iEnt)
        }
    }
    else if( iEnt > 0 && pev(id, pev_oldbuttons) & IN_USE ) {
        RemoveUserParachute(id, iEnt)
    }
}

Last edited by zmd94; 12-31-2014 at 11:52.
zmd94 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 19:20.


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