Raised This Month: $ Target: $400
 0% 

[someone could fix this plugin]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fatalerror23
Member
Join Date: May 2011
Old 09-12-2012 , 16:19   [someone could fix this plugin]
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <engine>
#define PLUGIN "Vip BunnyHop EvL.G"
#define VERSION "1.0"
#define AUTHOR "CS Online BR"
#define ADMIN_ACCESS ADMIN_RESERVATION
#define FL_WATERJUMP    (1<<11)
#define FL_ONGROUND  (1<<9)
new pCvar_AdminVIP
new g_has_bhop[33]
new 
bool:has_Used[33]

public 
plugin_init() {
register_plugin(PLUGINVERSIONAUTHOR)

register_clcmd("say /bhop""cmdBhop"ADMIN_ACCESS);
register_clcmd("say_team /bhop""cmdBhop"ADMIN_ACCESS);
register_event("HLTV""event_NewRound""a""1=0""2=0");

pCvar_AdminVIP register_cvar"amx_adminvip""1" );

public 
cmdBhop(id) {   
if (
has_flag(id"b"))
  {
  if(
g_has_bhop[id])
   {
   
g_has_bhop[id]=0
   client_print
(id,  print_center"[ EvL.G ] Voce acabou de desativar o Bunny Hop")
   return 
PLUGIN_HANDLED
  
}
  else if(!
g_has_bhop[id])
   {
   
g_has_bhop[id]=1
   client_print
(id,  print_center"[ EvL.G ] Voce acabou de ativar o Bunny Hop")
   return 
PLUGIN_HANDLED
  
}
 
}

return 
PLUGIN_HANDLED
}
public 
client_PreThink(id) {   
if (
has_flag(id"b"))
  {
  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

it's many errors in the console and I can help
thanks
fatalerror23 is offline
Mrki_Drakula
Senior Member
Join Date: Jun 2011
Location: Serbia
Old 09-12-2012 , 16:57   Re: [someone could fix this plugin]
Reply With Quote #2

Untested, i just fixed the code and removed unnessecary things. Let me know does it works.
PHP Code:
#include < amxmisc >
#include < amxmodx >
#include < cstrike >
#include < engine >
#include < fakemeta >
#include < fun >
#include < hamsandwich >
#include < nvault >
#include < colorchat >
#include < xs >
#include < fakemeta_util >

#define PLUGIN "Vip BunnyHop EvL.G" 
#define VERSION "1.0" 
#define AUTHOR "CS Online BR" 

#define ADMIN_ACCESS     ADMIN_RESERVATION 

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

new g_has_bhop[33

public 
plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR

    
register_clcmd("say /bhop""cmdBhop"ADMIN_ACCESS); 
    
register_clcmd("say_team /bhop""cmdBhop"ADMIN_ACCESS); 
    
register_logevent("Event_RoundStart"2"0=World triggered""1=Round_Start")
}
public 
cmdBhop(id
{    
    if(
access(idADMIN_ACCESS))
    { 
        if(
g_has_bhop[id]) 
        { 
            
g_has_bhop[id]=
            client_print
(id,  print_center"[ EvL.G ] Voce acabou de desativar o Bunny Hop"
            return 
PLUGIN_HANDLED 
        

        else if(!
g_has_bhop[id]) 
        { 
            
g_has_bhop[id]=
            client_print
(id,  print_center"[ EvL.G ] Voce acabou de ativar o Bunny Hop"
            return 
PLUGIN_HANDLED 
        

    }
    return 
PLUGIN_HANDLED

public 
client_PreThink(id
{        
    if(
access(idADMIN_ACCESS))
    { 
        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 

Mrki_Drakula is offline
Send a message via MSN to Mrki_Drakula Send a message via Skype™ to Mrki_Drakula
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 09-12-2012 , 17:12   Re: [someone could fix this plugin]
Reply With Quote #3

PHP Code:
#include < amxmisc > 
#include < amxmodx > 
#include < cstrike > 
#include < engine > 
#include < fakemeta > 
#include < fun > 
#include < hamsandwich > 
#include < nvault > 
#include < colorchat > 
#include < xs > 
#include < fakemeta_util > 
PHP Code:
// Just include necessary stuff ... not all
#include < amxmodx >
#include < amxmisc >
#include < engine > 
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster 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 08:12.


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