Raised This Month: $ Target: $400
 0% 

Make developer fly? [zp 4.3]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 11-17-2013 , 01:36   Re: Make developer fly? [zp 4.3]
Reply With Quote #8

Hi, you can use this, it is the same method as JetPack but more efficient. To fly you need to hold jump+duck button, have fun.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new bool:bHasJetPack[33]

public 
plugin_init()
{
    
register_plugin("I Believe I Can Fly""0.0.1""wbyokomo")
    
    
RegisterHam(Ham_Killed"player""OnPlayerKilled")
    
RegisterHam(Ham_Player_Jump"player""OnPlayerJump")
}

public 
client_putinserver(id)
{
    
bHasJetPack[id] = false
    
if(get_user_flags(id) & ADMIN_BANbHasJetPack[id] = true;
}

public 
client_disconnect(id)
{
    
bHasJetPack[id] = false
}

public 
OnPlayerKilled(id)
{
    
bHasJetPack[id] = false
}

public 
OnPlayerJump(id)
{
    if(
bHasJetPack[id])
    {
        static 
buttonflag
        button 
pev(idpev_button)
        
flag pev(idpev_flags)
        
        if((
button IN_DUCK) && !(flag FL_ONGROUND))
        {
            static 
Float:vVelocity[3], Float:vAngles[3], Float:vForward[3]
            
pev(idpev_velocityvVelocity)
            
pev(idpev_anglesvAngles)
            
vAngles[2] = 0.0
            angle_vector
(vAnglesANGLEVECTOR_FORWARDvForward)
            
vAngles vForward
            vAngles
[0] *= 300.0
            vAngles
[1] *= 300.0
            vVelocity
[0] = vAngles[0]
            
vVelocity[1] = vAngles[1]
            if(
vVelocity[2] < 300.0vVelocity[2] += 35.0;
            
set_pev(idpev_velocityvVelocity)
        }
    }

__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
 



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:53.


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