Raised This Month: $ Target: $400
 0% 

Need help with multijump script!(+karma) :)


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
ramiax
Member
Join Date: Mar 2009
Location: Lithuania
Old 05-11-2009 , 09:52   Need help with multijump script!(+karma) :)
#1

Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <zombieplague>
#define ADMINACCESS ADMIN_CHAT

new jumpnum[33] = 0
new bool:dojump[33] = false
public plugin_init()
{
    register_plugin("MultiJump","1.1","twistedeuphoria")
    register_cvar("amx_maxjumps","1")
    register_cvar("amx_mjadminonly","1")
}

public client_putinserver(id)
{
    jumpnum[id] = 0
    dojump[id] = false
}

public client_disconnect(id)
{
    jumpnum[id] = 0
    dojump[id] = false
}

public client_PreThink(id)
{
    if(!is_user_alive(id)) return PLUGIN_CONTINUE
    if((zp_get_user_zombie(id)) && (zp_get_user_nemesis(id)))
    {
    jumpnum[id] = 0
    dojump[id] = false
    return PLUGIN_CONTINUE
    }
    if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
    new nbut = get_user_button(id)
    new obut = get_user_oldbutton(id)
    if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
    {
        if(jumpnum[id] < get_cvar_num("amx_maxjumps"))
        {
            dojump[id] = true
            jumpnum[id]++
            return PLUGIN_CONTINUE
        }
    }
    if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
    {
        jumpnum[id] = 0
        return PLUGIN_CONTINUE
    }
    return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
    if(!is_user_alive(id)) return PLUGIN_CONTINUE
    if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
    if(dojump[id] == true)
    {
        new Float:velocity[3]    
        entity_get_vector(id,EV_VEC_velocity,velocity)
        velocity[2] = random_float(265.0,285.0)
        entity_set_vector(id,EV_VEC_velocity,velocity)
        dojump[id] = false
        return PLUGIN_CONTINUE
    }
    return PLUGIN_CONTINUE
}
It's a multijump plugin remake:
http://forums.alliedmods.net/showthr...ight=multijump

I've just remaked it for zm, that only humans can have it, but the only problem is that it jumps 3 times, but i need just twice!
Plz help me! (+karma)
Sry for my english...

Last edited by ramiax; 05-11-2009 at 10:33.
ramiax is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-11-2009 , 09:55   Re: Need help with my script! :)
#2

As per the Global Forum Rules, you need to have a descriptive topic title. If you wish for this topic to stay open, please correct the topic title before you post again.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-11-2009 , 17:48   Re: Need help with my script! :)
#3

Quote:
Originally Posted by YamiKaitou View Post
As per the Global Forum Rules, you need to have a descriptive topic title. If you wish for this topic to stay open, please correct the topic title before you post again.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ramiax
Member
Join Date: Mar 2009
Location: Lithuania
Old 05-11-2009 , 10:03   Re: Need help with multijump script!(+karma) :)
#4

Sry... D Already changed. Thanks for the warning! So, can someone help me?
ramiax is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-11-2009 , 10:05   Re: Need help with multijump script!(+karma) :)
#5

The number of jumps is depending of the cvar amx_maxjumps
Arkshine is offline
ramiax
Member
Join Date: Mar 2009
Location: Lithuania
Old 05-11-2009 , 10:12   Re: Need help with multijump script!(+karma) :)
#6

I know ;DDD Im not so dumb... But it still jumps 3 times! ;(
The thing i have noticed is when i delete these lines from sc:
Code:
if((zp_get_user_zombie(id)) && (zp_get_user_nemesis(id)))
    {
    jumpnum[id] = 0
    dojump[id] = false
    return PLUGIN_CONTINUE
    }
The plugin is working fine, so the bug is somewhere here...

Last edited by ramiax; 05-11-2009 at 10:32.
ramiax is offline
Howdy!
Senior Member
Join Date: Feb 2007
Old 05-11-2009 , 10:18   Re: Need help with multijump script!(+karma) :)
#7

When i tested it worked as it supposed to.

Quote:
Originally Posted by twistedeuphoria View Post
This plugin will allow you to jump in the air a defined number of times.

Cvars:
amx_maxjumps (default 1) - Set the amount of times you can jump ( this does not include the normal jump )
amx_mjadminonly (default 0; 1|0) - Set whether or not only admins can use MultiJump.

Defines:
ADMINACCESS (default ADMIN_CHAT) - Set access required to use MultiJump if amx_mjadminonly is 1.
__________________
[IMG]http://img221.**************/img221/5608/howdyfinnishhq2.jpg[/IMG]

Last edited by Howdy!; 05-11-2009 at 10:26.
Howdy! is offline
ramiax
Member
Join Date: Mar 2009
Location: Lithuania
Old 05-11-2009 , 10:23   Re: Need help with multijump script!(+karma) :)
#8

I'm not so dumb!!! I'm saying that my multijump is not working, not this:
http://forums.alliedmods.net/showthr...ight=multijump
;)

Last edited by ramiax; 05-11-2009 at 11:28.
ramiax is offline
Closed Thread


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


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