Raised This Month: $ Target: $400
 0% 

Menu "case" doesn't work.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
reidark
Member
Join Date: Jan 2011
Old 04-18-2012 , 21:30   Menu "case" doesn't work.
Reply With Quote #1

I have this "case".

PHP Code:
        case 6:
        {
            
bhop(id)
        } 
And function bhop is:

PHP Code:
public bhop(id)
{
    new 
money cs_get_user_money(id);
    new 
cost get_pcvar_num(bhopcost);
    
    if(
money cost || money == cost
    {
        
cs_set_user_money(idmoney cost);
        
client_cmd(id"cmdBhopActive")
        
        
        
client_print(idprint_chat"[First DR] Voce comprou o bunnyhop!");
    } else {
        
client_print(idprint_chat"[First DR] Voce nao tem dinheiro suficiente!");
    }

But doesn't work!

Anyways, my plugin of bunnyhop is:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

#define FL_WATERJUMP    (1<<11)
#define FL_ONGROUND     (1<<9)

new g_has_bhop[33]

public 
plugin_init()
{
    
register_clcmd("bunnyserver" ,"cmdBhopActive")
    
register_clcmd("bunnyserver2" ,"cmdBhopDesactive")
}

public 
cmdBhopActive(id)
{
        if(
g_has_bhop[id])
        {
                
g_has_bhop[id]=0
                
return PLUGIN_HANDLED
        
}
      
        return 
PLUGIN_HANDLED
}

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

Pls, i need help!
reidark is offline
 


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


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