Raised This Month: $ Target: $400
 0% 

[REQ] AutoBunnyhop for users loaded from a txt/ini file with no admin acces


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
suie
Junior Member
Join Date: Jul 2014
Old 08-25-2014 , 15:19   Re: [REQ] AutoBunnyhop for users loaded from a txt/ini file with no admin acces
Reply With Quote #1

Quote:
Originally Posted by Flick3rR View Post
The file must be in your configs folder with the name PlayersBhop.ini
On each new line you must put the SteamID of the player, who will auto bunny hop.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

new Trie:g_tBhopPlayers

new g_AuthID[32][33]

public 
plugin_init()
{
    
register_plugin("Bhop From File""1.0""Flicker")
    
    
g_tBhopPlayers TrieCreate()
    
    
LoadBhoppers()
}

public 
client_connect(id)
    
get_user_authid(idg_AuthID[id], charsmax(g_AuthID))

public 
client_PreThink(id)
{
    
//Code thanks to Cheesy Petesa from his AutoBhop Plugin!
    
if(entity_get_int(idEV_INT_button) & && TrieKeyExists(g_tBhopPlayersg_AuthID[id]))
    {
        new 
flags entity_get_int(idEV_INT_flags)

        if (
flags FL_WATERJUMP || entity_get_int(idEV_INT_waterlevel) >= || !(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)
    }
    
//Code thanks to Cheesy Petesa from his AutoBhop Plugin!
    
    
return PLUGIN_CONTINUE
}

public 
LoadBhoppers()
{
    new 
szFilePath[128]
    
get_configsdir(szFilePathcharsmax(szFilePath))
    
add(szFilePathcharsmax(szFilePath), "/PlayersBhop.ini")
    
    new 
fopen(szFilePath"rt")
    
    if(!
f
    { 
        new 
szMessage[128]
        
formatex(szMessagecharsmax(szMessage), "Unable to open %s"szFilePath)
        
set_fail_state(szMessage)
    } 
    
    new 
data[32]
    while(!
feof(f)) 
    { 
        
fgets(fdatacharsmax(data)) 
        
        
trim(data)
        
        if(!
data[0] || data[0] == ';' || data[0] == '/' && data[1] == '/'
            continue
        
        
TrieSetCell(g_tBhopPlayersdata1)
    } 
    
fclose(f

works like a charm thank you very much
suie 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 21:02.


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