AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Make Code to amx file? (anti bhop plugin) (https://forums.alliedmods.net/showthread.php?t=51248)

riz 02-14-2007 10:59

Make Code to amx file? (anti bhop plugin)
 
:oops:
Hello i tried to make this code/plugin to a amxx file.

This is what i have;

////////////////////////////////////////////////////////////////////////////////

#include <amxmod>
#include <Vexd_Utilities>

new somestring[32]

public plugin_init() {
register_plugin("Anti-Bhop","1.0","p3ts1n")
new detectcmd[32]
format(detectcmd,31, "plop%d%d%d", random_num(0,99), random_num(0,99), random_num(0,99))
register_clcmd(detectcmd, "detected")
format(somestring,31, " alias _special %s",detectcmd)
}

public client_prethink(id) {
if(!is_user_alive(id)) return PLUGIN_CONTINUE

new buttons = Entvars_Get_Int(id, EV_INT_button)
new oldbuttons = Entvars_Get_Int(id, EV_INT_oldbuttons)
if(buttons&IN_JUMP && !(oldbuttons&IN_JUMP))
client_cmd(id, "%s", somestring)

return PLUGIN_CONTINUE
}

public detected(id) {
new flags = Entvars_Get_Int(id, EV_INT_flags)
if(!(flags&FL_WATERJUMP) && !(flags&FL_ONGROUND) && Entvars_Get_Int(id, EV_INT_waterlevel) < 2) {
new name[32], steamid[34]
get_user_name(id, name,31)
get_user_authid(id, steamid,33)
set_hudmessage(255, 0, 0, 0.02, 0.45, 1, 0.0, 5.0, 0.0, 0.5, 1)
show_hudmessage(0,"[AntiBhop]^nBhop-script detected on^n%s (%s)", name, steamid)
server_cmd("kick #%d", get_user_userid(id))
}
return PLUGIN_HANDLED
}

//////////////////////////////////////////////////////////////////////////////////
-_-


I used notepad to copy the text and paste into another amxx file
but it didnt work that way!
Maybe someone can tell me how to do it or make one for me?
i would be very thankfull
/Riz

godlike 02-14-2007 12:58

Re: Make Code to amx file? (anti bhop plugin)
 
Wrong forum post this in scripting help .You have to compile it.

sawce 02-14-2007 13:05

Re: Make Code to amx file? (anti bhop plugin)
 
Moved to scripting help.

godlike 02-14-2007 14:31

Re: Make Code to amx file? (anti bhop plugin)
 
1 Attachment(s)
Here you go

Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Header size: 568 bytes
Code size: 1584 bytes
Data size: 596 bytes
Stack/heap size: 16384 bytes; estimated max. usage=169 cells (676 bytes)
Total requirements: 19132 bytes
Done.

riz 02-14-2007 15:13

Re: Make Code to amx file? (anti bhop plugin)
 
i love you thanks very much ^^ :D <3 :D

riz 02-14-2007 16:03

Re: Make Code to amx file? (anti bhop plugin)
 
Well it didnt work as i thought ^^
But i did find another plugin that works fine with detecting bh script so pm me if someone wants it.
peace!

Howdy! 02-14-2007 17:12

Re: Make Code to amx file? (anti bhop plugin)
 
(ban this user)
(ban this user)

p3tsin 02-15-2007 06:59

Re: Make Code to amx file? (anti bhop plugin)
 
Code:
#include <amxmodx> #include <fakemeta> const bantime = 10 new detectcmd[32] new cv_bhopkick public plugin_init() {     register_plugin("Bhop Script","2.0","p3tsin")     formatex(detectcmd,31, "plop%d%d%d",random_num(0,99),random_num(0,99),random_num(0,99))     register_clcmd(detectcmd,"cmd_detected")     cv_bhopkick = register_cvar("amx_bhopkick","0")     register_forward(FM_PlayerPreThink,"fm_playerprethink",0) } public fm_playerprethink(id) {     if(is_user_alive(id)) {         if(!(pev(id,pev_flags)&FL_ONGROUND) && (!(pev(id,pev_button)&IN_JUMP) || pev(id,pev_oldbuttons)&IN_JUMP))             client_cmd(id, ";alias _special %s",detectcmd)     }     return FMRES_IGNORED } public cmd_detected(id) {     if(!(pev(id,pev_flags)&FL_ONGROUND) && (!(pev(id,pev_button)&IN_JUMP) || pev(id,pev_oldbuttons)&IN_JUMP)) {         static name[32], authid[36]         get_user_name(id, name,31)         get_user_authid(id, authid,35)         client_print(0,print_chat, "[AMXX] Bhop-script detected on %s (%s)",name,authid)         switch(get_pcvar_num(cv_bhopkick)) {             case 1: server_cmd("kick #%d bhop-script",get_user_userid(id))             case 2: server_cmd("banid %d ^"%s^";kick #%d bhop-script",bantime,authid,get_user_userid(id))         }     }     return PLUGIN_HANDLED }

:grrr:

riz 02-16-2007 14:29

Re: Make Code to amx file? (anti bhop plugin)
 
great <3

jab 08-27-2007 16:21

Re: Make Code to amx file? (anti bhop plugin)
 
Quote:

Originally Posted by riz (Post 440270)
Well it didnt work as i thought ^^
But i did find another plugin that works fine with detecting bh script so pm me if someone wants it.
peace!

riz, or somebody here pls where can i download anti bhop script plguin ?

"detecting bh script"

thx


All times are GMT -4. The time now is 00:39.

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