Raised This Month: $ Target: $400
 0% 

Engine ----> fakemeta


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_lol_
Senior Member
Join Date: Apr 2009
Old 05-14-2009 , 20:57   Engine ----> fakemeta
Reply With Quote #1

PHP Code:
entity_set_float(idEV_FL_fuser20.0)        // Disable slow down after jumping
    // Code from CBasePlayer::Jump (player.cpp)        Make a player jump automatically
    
if (entity_get_int(idEV_INT_button) & 2
    {    
// If holding jump
        
new flags entity_get_int(idEV_INT_flags)

        if (
flags FL_WATERJUMP)
            return 
PLUGIN_CONTINUE
        
if ( entity_get_int(idEV_INT_waterlevel) >= )
            return 
PLUGIN_CONTINUE
        
if ( !(flags FL_ONGROUND) )
            return 
PLUGIN_CONTINUE

        
new Float:velocity[3]
        
entity_get_vector(idEV_VEC_velocityvelocity)
        
velocity[2] += 260.0
        entity_set_vector
(idEV_VEC_velocityvelocity)
        
entity_set_int(idEV_INT_gaitsequence6)    // Play the Jump Animation
    


posible in fakemeta or other module?
__________________
_lol_ is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 05-14-2009 , 21:48   Re: Engine ----> fakemeta
Reply With Quote #2

Edit: Thanks, IneedHelp ;)

Direct port:
PHP Code:
set_pev(idpev_fuser20.0)
if(
pev(idpev_button) & 2)
{
    new 
flags pev(idpev_flags)
    
    if(
flags FL_WATERJUMP)
        return 
PLUGIN_CONTINUE
    
if(pev(idpev_waterlevel) >= 2)
        return 
PLUGIN_CONTINUE
    
if(!(flags FL_ONGROUND))
        return 
PLUGIN_CONTINUE
    
    
new Float:velocity[3]
    
pev(idpev_velocityvelocity)
    
velocity[2] += 260.0
    set_pev
(idpev_velocityvelocity)
    
set_pev(idpev_gaitsequence6)


Last edited by hlstriker; 05-14-2009 at 22:07.
hlstriker is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 05-14-2009 , 22:03   Re: Engine ----> fakemeta
Reply With Quote #3

You forgot this line (pev(id, pev_flags))

PHP Code:
new flags entity_get_int(idEV_INT_flags
EDIT: You fixed it
__________________

Last edited by IneedHelp; 05-14-2009 at 22:28.
IneedHelp is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 05-14-2009 , 23:47   Re: Engine ----> fakemeta
Reply With Quote #4

Quote:
Originally Posted by _lol_ View Post
posible in fakemeta or other module?
Is there a reason why you don't want to use engine?
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-15-2009 , 07:20   Re: Engine ----> fakemeta
Reply With Quote #5

FM is easier IMO. Is there a reason not to use it?
__________________
hleV is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-15-2009 , 07:33   Re: Engine ----> fakemeta
Reply With Quote #6

FM is more difficult AND much more sensible to failures, that means, one small mistake and your sever goes boom ... also [set_]pev() is slower than entity_[get|set]_*() from what I've seen in profiles
__________________
Hunter-Digital is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 05-15-2009 , 10:10   Re: Engine ----> fakemeta
Reply With Quote #7

Quote:
Originally Posted by hleV View Post
FM is easier IMO. Is there a reason not to use it?
IMO yes there is. If the code is already engine and faster, what can be the reason to transfer it to fakemeta and do extra work?
SnoW is offline
Send a message via MSN to SnoW
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-15-2009 , 07:47   Re: Engine ----> fakemeta
Reply With Quote #8

Well engine is more faster than fakemeta ( a bit ) since fakemeta generates more code for each native.
Arkshine is offline
_lol_
Senior Member
Join Date: Apr 2009
Old 05-15-2009 , 11:52   Re: Engine ----> fakemeta
Reply With Quote #9

thanks men, i want to use fakemeta because the plugin (zp-12k of lines)already includes the fakemeta module, but not the engine, and i dont want to include engine for only 10 lines....

rain of +k
__________________
_lol_ is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 05-15-2009 , 12:49   Re: Engine ----> fakemeta
Reply With Quote #10

Quote:
Originally Posted by _lol_ View Post
thanks men, i want to use fakemeta because the plugin (zp-12k of lines)already includes the fakemeta module, but not the engine, and i dont want to include engine for only 10 lines....
Ye, and you shouldn't do that. You should include engine and use the engine code. If you wanna transfer code from module to module, instead of that transfer the hole other code from fakemeta to engine.
It doesn't matter if you use only one native from the module and include it, since the module is enabled and other plugins use it anyway.
SnoW is offline
Send a message via MSN to SnoW
Reply


Thread Tools
Display Modes

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


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