Raised This Month: $ Target: $400
 0% 

Menu "case" doesn't work.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-19-2012 , 08:12   Re: Menu "case" doesn't work.
Reply With Quote #7

Quote:
Originally Posted by hleV View Post
Nope, it's "bunnyserver" because the player is supposed to activate the bhop, not deactivate it.
PHP Code:
    // If the player has ENOUGH money to get bhop
    
if(money cost || money == cost
    {
        
cs_set_user_money(idmoney cost);

        
// ACTIVATE bhop
        
client_cmd(id"bunnyserver"
That's not the best way to do things, though. Better would be to directly call
PHP Code:
        //client_cmd(id, "bunnyserver")
        
cmdBhopActive(id); 
And you're removing player's money even if he already has bhop.
PHP Code:
register_clcmd("bunnyserver2" ,"cmdBhopDesactive"
PHP Code:
public cmdBhopDesactive(id)
{
        if(!
g_has_bhop[id])
        {
                
g_has_bhop[id]=1
                
return PLUGIN_HANDLED
        
}

        return 
PLUGIN_HANDLED
}

public 
client_PreThink(id
{
        if(!
g_has_bhop[id])
                return 
PLUGIN_CONTINUE
        
        entity_set_float
(idEV_FL_fuser20.0)
        
        if(
entity_get_int(idEV_INT_button) & 2
        {
                new 
flags entity_get_int(idEV_INT_flags)
                
                if(
flags FL_WATERJUMP)
                {
                        return 
PLUGIN_CONTINUE
                
}
                
                if(
entity_get_int(idEV_INT_waterlevel) >= 2)
                {
                        return 
PLUGIN_CONTINUE
                
}
                
                if(!(
flags FL_ONGROUND))
                {
                        return 
PLUGIN_CONTINUE
                
}
                
                new 
Float:velocity[3]
                
entity_get_vector(idEV_VEC_velocityvelocity)
                
velocity[2] += 250.0
                entity_set_vector
(idEV_VEC_velocityvelocity)
                
                
entity_set_int(idEV_INT_gaitsequence6)
        }
        return 
PLUGIN_CONTINUE

__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
 



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 07:54.


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