CS 1.6 Scripting Hacks and Programming

Click here to edit subtitle

Forums

Post Reply
Forum Home > HL1 Programming > [C++] AutoPistol

TreMBle^
Member
Posts: 27

Bools:

bool autopistol;

 

Voids:

void AUTOPIST_ON() {autopistol = true;}

void AUTOPIST_OFF() {autopistol = false;}

 

Regcmd:

g_Engine.pfnAddCommand("+prefix_autopistol",AUTOPIST_ON);

g_Engine.pfnAddCommand("-prefix_autopistol",AUTOPIST_OFF);

 

Cl_CreateMove:

if(autopistol)

{

static bool autopistol_loop;

if(autopistol_loop)

{

cmd->buttons |= IN_ATTACK;

autopistol_loop = false;

}

else

{

cmd->buttons &= ~IN_ATTACK;

autopistol_loop = true;

}

}

 

September 23, 2013 at 4:33 PM Flag Quote & Reply

You must login to post.