Hey, so basically I wanted to create a modification of the GHW Hacks script, although I don't know pawn. So what I tried to do was make it so instead of having to say it to everyone, have someone say the commands in team chat.
It went from:
Code:
public plugin_init()
{
register_clcmd("say /aimbot","hack1")
register_clcmd("say /esp","hack2")
register_clcmd("say /speed","hack3")
register_clcmd("say /norecoil","hack4")
register_forward(FM_PlayerPreThink,"FM_PreThink")
register_forward(FM_TraceLine, "FM_traceline_hook",1)
}
to
Code:
register_clcmd("say_team /aimbot","hack1")
register_clcmd("say_team /esp","hack2")
register_clcmd("say_team /speed","hack3")
register_clcmd("say_team /norecoil","hack4")
(Note: The code that I didn't put is there, its just I didn't change it).
Now the thing is, I thought this would make it so when I said it in team chat it would work. The second thing I did is tried to remove the glow and message from when you would type these things and they would activate.
For the speed it went from:
Code:
public hack3(id)
{
if(get_pcvar_num(speed_on_pcvar))
{
if(!speed[id])
{
new name[32]
get_user_name(id,name,31)
client_print(0,print_chat,"[GHW] Speed Hack Enabled on %s (hold use key to use)",name)
speed[id]=true
}
else
{
new name[32]
get_user_name(id,name,31)
client_print(0,print_chat,"[GHW] Speed Hack Disabled on %s",name)
speed[id]=false
set_rendering2(id,kRenderFxNone,0,0,0,kRenderTransAlpha,255)
}
}
}
to me deleting that. I thought you didn't need it because it had the glow and a message. I pretty much deleted the rest of this thinking that the include file would be all I needed considering the code just looked like it was giving off messages and glow things.
Now, when I test this, before it worked. It does nothing now. The command doesn't register at all.
What did I do wrong?
If you want to look at it, the entire modified script is here:
Code:
#define VERSION "1.3"
#include <amxmodx>
#include <amxmisc>
#include <chr_engine>
#define HEAD_BONE 8
new bool:esp[33]
new bool:aimbot[33]
new bool:speed[33]
new bool:recoil[33]
new speed_pcvar
new esp_on_pcvar
new aimbot_on_pcvar
new speed_on_pcvar
new recoil_on_pcvar
public plugin_init()
{
register_plugin("Hacks Plugin",VERSION,"Dustball_Edit")
speed_pcvar = register_cvar("speedhack_speed","500.0")
esp_on_pcvar = register_cvar("esp_on","1")
aimbot_on_pcvar = register_cvar("aimbot_on","1")
speed_on_pcvar = register_cvar("speed_on","1")
recoil_on_pcvar = register_cvar("recoil_on","1")
register_clcmd("say_team /aimbot","hack1")
register_clcmd("say_team /esp","hack2")
register_clcmd("say_team /speed","hack3")
register_clcmd("say_team /norecoil","hack4")
register_forward(FM_PlayerPreThink,"FM_PreThink")
register_forward(FM_TraceLine, "FM_traceline_hook",1)
}
public client_disconnect(id)
{
esp[id]=false
aimbot[id]=false
speed[id]=false
recoil[id]=false
}
public FM_traceline_hook(Float:blah1[3],Float:blah2[3],blah3,id)
{
if(is_user_alive(id) && recoil[id])
{
static vec1[3], Float:vec2[3]
get_user_origin(id,vec1,3)
vec2[0] = float(vec1[0])
vec2[1] = float(vec1[1])
vec2[2] = float(vec1[2])
set_tr(TR_vecEndPos,vec2)
}
}
//teame06's function that he shared with me quiet a while ago.
public set_rendering2(index,fx,r,g,b,render,amount)
{
set_pev(index, pev_renderfx, fx);
new Float:RenderColor[3];
RenderColor[0] = float(r);
RenderColor[1] = float(g);
RenderColor[2] = float(b);
set_pev(index, pev_rendercolor, RenderColor);
set_pev(index, pev_rendermode, render);
set_pev(index, pev_renderamt, float(amount));
}
Is there anything I can do to make this work? What/what would I not have to remove to make it work?
Thanks a ton.