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

[Help] Drop Jetpack, for Survivor


Post New Thread Reply   
 
Thread Tools Display Modes
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-25-2014 , 09:23   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #21

Do you get any errors, Depresie?
zmd94 is offline
Old 10-26-2014, 00:40
ghost95v
This message has been deleted by YamiKaitou. Reason: No Source Code
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-26-2014 , 07:34   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #22

nope... it compiles fine.. but i have no jetpack in game lol...
Depresie is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-26-2014 , 07:35   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #23

Just use this plugin: https://forums.alliedmods.net/showthread.php?t=246124
zmd94 is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 10-26-2014 , 13:07   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #24

pff ,Yamikatou , hee deleted my post... The Source code is at First POST!
__________________

Last edited by ghost95v; 10-26-2014 at 13:08.
ghost95v is offline
Send a message via Skype™ to ghost95v
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-26-2014 , 15:25   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #25

You're still not allowed to attach compiled modules/plugins.
__________________
Arkshine is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 10-26-2014 , 16:11   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #26

Quote:
Originally Posted by Arkshine View Post
You're still not allowed to attach compiled modules/plugins.
Sorry, but i just dont have the source of that module. i thought was helping somehow. (i never uploaded a compiled plugin)
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-27-2014 , 16:05   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #27

can the drop jetpack plugin be made separately? i have a jetpack but it has no sma.. just amxx.. and im wondering if i can make a plugin with the drop jetpack code separately...
Depresie is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 10-27-2014 , 17:19   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #28

Quote:
Originally Posted by Depresie View Post
can the drop jetpack plugin be made separately? i have a jetpack but it has no sma.. just amxx.. and im wondering if i can make a plugin with the drop jetpack code separately...
Of course you can make, in this thread we also worked about drop jetpack...
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 11-29-2014 , 11:55   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #29

Hello, how can i code to give to a human player a Jetpack, by command with a specified access flag ex. zp_jetpack <name>. thank you

PHP Code:
#include < amxmodx >
#include < engine >
#include < fakemeta >
#include < hamsandwich >
#include < xs >
#include < zombie_plague_advance >

native get_user_jetpackiPlayer );
native user_drop_jetpackiPlayer );
native set_user_fueliPlayerFloatfFuel );
native set_user_rocket_timeiPlayerFloatfTime );
native set_user_jetpackiPlayeriJetpack );

new 
g_iJetpackgmsgSayTextboolg_bConnected33 ], g_cName33 ][ 32 ];


public 
zp_user_infect_attemptiPlayer )
    if( 
get_user_jetpackiPlayer ) )
        
user_drop_jetpackiPlayer );

public 
zp_user_infected_preiPlayer )
    if( 
get_user_jetpackiPlayer ) )
        
user_drop_jetpackiPlayer );

public 
zp_user_infected_postiPlayer )
    if( 
get_user_jetpackiPlayer ) )
        
user_drop_jetpackiPlayer );

public 
client_putinserveriPlayer )
{
    
g_bConnectediPlayer ] = true;

    
get_user_nameiPlayerg_cNameiPlayer ], 31 );
}

public 
client_disconnectiPlayer )
    
g_bConnectediPlayer ] = false;

public 
client_infochangediPlayer )
{
    static 
cInfo32 ];
    
get_user_infoiPlayer"name"cInfo31 );

    if( !
equalig_cNameiPlayer ], cInfo ) )
        
copyg_cNameiPlayer ], 31cInfo );
}

public 
plugin_init( )
{
    
g_iJetpack zp_register_extra_item"Jetpack + Bazooka"30ZP_TEAM_HUMAN );
    
gmsgSayText get_user_msgid"SayText" );
    
register_logevent"RoundStart"2"1=Round_Start" );
    
}

public 
zp_extra_item_selectediPlayeriItem )
{
    if( 
iItem == g_iJetpack )
    {
        if( 
get_user_jetpackiPlayer ) )
        {
            
DoSayTextMessageiPlayer"^x04[ZP]^x01 You already have a^x03 Jetpack!" );

            
zp_set_user_ammo_packsiPlayerzp_get_user_ammo_packsiPlayer ) + 30 );
        }

        else
        {
            
set_user_jetpackiPlayer);
            
set_user_fueliPlayer250.0 );

            
DoSayTextMessageiPlayer"^x04[ZP]^x01 Press^x03 CTRL+SPACE^x01 to fly!" );
            
DoSayTextMessageiPlayer"^x04[ZP]^x01 Press^x03 RIGHT CLICK^x01 to shoot!" );
            
            
        }
    }
}

public 
Rocket_TouchiOwneriRocket )
{
    if( 
g_bConnectediOwner ] )
    {
        static 
iPlayers32 ], iNumi;
        
get_playersiPlayersiNum"a" );

        for( 
0iNumi++ )
        {
            if( 
zp_get_user_zombieiPlayers] ) )
            {
                static 
FloatfDistanceFloatfDamage;
                
fDistance entity_rangeiPlayers], iRocket );

                if( 
fDistance 320.0 )
                {
                    
fDamage 1050.0 fDistance;
                
                    static 
FloatfVelocity];
                    
peviPlayers], pev_velocityfVelocity );
                    
xs_vec_mul_scalarfVelocity2.75fVelocity );
                    
fVelocity] *= 1.75;
                    
set_peviPlayers], pev_velocityfVelocity );
                    
                    if( 
floatget_user_healthiPlayers] ) ) - fDamage 0.0 )
                        
ExecuteHamBHam_TakeDamageiPlayers], iRocketiOwnerfDamageDMG_BLAST );
                        
                    else 
ExecuteHamBHam_KillediPlayers], iOwner);


                    
DoSayTextMessageiOwner"^x04[ZP]^x01 Damage to^x04 %s^x01 ::^x04 %0.0f^x01 damage"g_cNameiPlayers] ], fDamage );
                }
            }
        }
    }
}

public 
Jetpack_TouchiPlayer )
    return 
zp_get_user_zombieiPlayer ) ? PLUGIN_HANDLED PLUGIN_CONTINUE;

public 
RoundStart( )
{
    static 
iPlayers32 ], iNumi;
    
get_playersiPlayersiNum"a" );

    for( 
0iNumi++ )
        if( 
get_user_jetpackiPlayers] ) )
        
set_user_rocket_timeiPlayers], 0.0 );
}

DoSayTextMessageiTargetcMessage[ ], any: ... )
{
    static 
cBuffer192 ];
    
vformatcBuffer191cMessage);

    
message_beginMSG_ONE_UNRELIABLEgmsgSayText_iTarget );
    
write_byteiTarget );
    
write_stringcBuffer );
    
message_end( );

__________________

Last edited by ghost95v; 11-29-2014 at 11:56.
ghost95v is offline
Send a message via Skype™ to ghost95v
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-29-2014 , 12:14   Re: [Help] Drop Jetpack, for Survivor
Reply With Quote #30

Just write free_jet zmd94 in the console to give free jet:

free_jet = The command.
zmd94 = Player name.
Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init() 
{
    register_concmd("free_jet", "g_iJet", ADMIN_LEVEL_H, "<target>")
}

public g_iJet(id, level, cid)
{
    if(!cmd_access(id, level, cid, 2))
    {
        console_print(id, "[ZM] Access is denied!")
        return 1
    }
        
    new iTarget[32]
    read_argv(1, iTarget, charsmax(iTarget))
    
    new TargetPlayer = cmd_target(id, iTarget, 2)
    
    if(!TargetPlayer)
    {
        console_print(id, "[ZM] Cannot find that particular name!")
        return 1
    }
    
    if(!is_user_alive(TargetPlayer))
    {
        console_print(id, "[ZM] This command is disabled for dead player!")
        return 1
    }
    
    if(read_argc() != 2)
        return 1
        
    new TargetName[32]
    get_user_name(TargetPlayer, TargetName, charsmax(TargetName))
    
    set_user_jet(TargetPlayer, 1 )
    set_user_fuel(TargetPlayer, 250.0 )
    
    console_print(0, "[ZM] %s has been given free Jet!", TargetName)
    console_print(id, "[ZM] Now, you can fly away!")
    
    return 1
}

Last edited by zmd94; 11-29-2014 at 12:15.
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 15:07.


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