Raised This Month: $ Target: $400
 0% 

Need help with MJ (MultiJump)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tomax079
Member
Join Date: Apr 2009
Location: Lithuania
Old 12-13-2009 , 08:18   Need help with MJ (MultiJump)
Reply With Quote #1

Hello every1 as you see in title i need help with MJ. What i need?
1. That T's and CT's could use MJ (Now can use only CT)
2. That it will work only admins whose have flag "l"
Attached Files
File Type: sma Get Plugin or Get Source (multijump.sma - 618 views - 1.7 KB)
tomax079 is offline
Send a message via Skype™ to tomax079
lazarev
Veteran Member
Join Date: Sep 2008
Old 12-13-2009 , 08:20   Re: Need help with MJ (MultiJump)
Reply With Quote #2

flag "l" = ADMIN_RCON
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ADMINACCESS ADMIN_RCON

new jumpnum[33] = 0
new bool:dojump[33] = false

public plugin_init()
{
    
register_plugin("MultiJump","1.1","twistedeuphoria")
    
register_cvar("amx_maxjumps","5")
    
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(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) || get_user_team(id) != 2) 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

lazarev is offline
tomax079
Member
Join Date: Apr 2009
Location: Lithuania
Old 12-13-2009 , 08:27   Re: Need help with MJ (MultiJump)
Reply With Quote #3

Thanks!
tomax079 is offline
Send a message via Skype™ to tomax079
Old 12-13-2009, 10:47
tomax079
This message has been deleted by tomax079.
Old 12-17-2009, 10:17
tomax079
This message has been deleted by tomax079.
tomax079
Member
Join Date: Apr 2009
Location: Lithuania
Old 12-19-2009 , 03:16   Re: Need help with MJ (MultiJump)
Reply With Quote #4

If i want MJ for T's and CT's it must be like this:
get_user_team(id) != 1 , 2) or how?
tomax079 is offline
Send a message via Skype™ to tomax079
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-19-2009 , 04:23   Re: Need help with MJ (MultiJump)
Reply With Quote #5

http://forums.alliedmods.net/showthr...15#post1022215
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-19-2009 at 05:39.
ConnorMcLeod is offline
tomax079
Member
Join Date: Apr 2009
Location: Lithuania
Old 12-19-2009 , 04:28   Re: Need help with MJ (MultiJump)
Reply With Quote #6

Thanks.
+k
tomax079 is offline
Send a message via Skype™ to tomax079
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 12-19-2009 , 17:02   Re: Need help with MJ (MultiJump)
Reply With Quote #7

get_user_team(id) != 1 , 2) nah that wouldnt work
__________________
Ayyylmao
malec321 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 23:43.


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