Raised This Month: $ Target: $400
 0% 

Engine ----> fakemeta


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
stupok
Veteran Member
Join Date: Feb 2006
Old 05-22-2009 , 14:16   Re: Engine ----> fakemeta
Reply With Quote #9

Try this:

I might have messed up your checks with the flags, buttons, and oldbuttons when I tried to optimize them.

Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> new jumpnum[33] = 0 new bool:dojump[33] = false new cvar_maxjumps public plugin_init() {     register_plugin("MultiJump","1.1","MasI")     cvar_maxjumps = register_cvar("amx_maxjumps","50")         register_forward(FM_PlayerPreThink, "forward_PreThink")     register_forward(FM_PlayerPostThink, "forward_PostThink") } public client_putinserver(id) {     jumpnum[id] = 0     dojump[id] = false } public client_disconnect(id) {     jumpnum[id] = 0     dojump[id] = false } public forward_PreThink(id) {     if(!is_user_alive(id))         return FMRES_IGNORED         new nbut = pev(id, pev_button)     new obut = pev(id, pev_oldbuttons)     new flags = pev(id, pev_flags)     if(nbut & IN_JUMP)     {         if(flags & FL_ONGROUND)         {             jumpnum[id] = 0         }         else if(!(obut & IN_JUMP) && jumpnum[id] < get_pcvar_num(cvar_maxjumps))         {             dojump[id] = true             jumpnum[id]++         }     }         return FMRES_IGNORED } public forward_PostThink(id) {     if(!is_user_alive(id))         return FMRES_IGNORED         if(dojump[id] == true)     {         new Float:velocity[3]         pev(id, pev_velocity, velocity)         velocity[2] = random_float(265.0,285.0)         set_pev(id, pev_velocity, velocity)         dojump[id] = false     }         return FMRES_IGNORED }
__________________
stupok 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 01:29.


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