Jump to content

Recommended Posts

hey guys i started playing dayz this week xD any way i found it really annoying that i had to hold w to run between town's so i jumped out of game and quickly made this

The Dayz helper 1.0

toggle f3 for highgear in cars ect aka "e"

toggle f4 to run aka "w"

nothing great, very simple but i feel its handy

-------------------------

let me know if theres anything you think should be added.

Edited by Boneboys

Share this post


Link to post
Share on other sites

Hi. We've deleted your link. Unfortunatly there's been a lot of CD key thefts recently and we don't want to take any chances by allowing people access to suspicious unverified links. I hope you understand.

Share this post


Link to post
Share on other sites

oh yes fair enough i didnt think this through at all im a fairly respected cod modder from itsmodsdotcom and enjoy the perks of posting my work unverified/ without virus scans so i do apologize for any inconvenience this has caused. just for my info how might i get this approved , maybe a known member would be kind enough to compile and upload so as to verify it is legit ? its all of 100 lines of code so wil not take long to see its not nasty :)

Share this post


Link to post
Share on other sites

:0 well heres the code if anyone wants this , you will have to compile yourself but no big deal :)


// dayzhelper.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <windows.h>
#include <time.h>
using namespace std;
void sleep(unsigned int mseconds) // not used just there for later
{
clock_t goal = mseconds + clock();
while (goal > clock());
}
// for key pushing
BYTE scan_code(DWORD pKey)
{
const DWORD result = MapVirtualKey(pKey, MAPVK_VK_TO_VSC);
return static_cast<BYTE>(result);
}
void press_key(DWORD pKey)
{
keybd_event(static_cast<BYTE>(pKey), scan_code(pKey), 0, 0);
}
void release_key(DWORD pKey)
{
keybd_event(static_cast<BYTE>(pKey), scan_code(pKey), KEYEVENTF_KEYUP, 0);
}
bool init_ok = FALSE;
bool init2_ok = FALSE;
// toggles for Fn keys
#define FN_TOGGLES 12
bool Fn[FN_TOGGLES] = {
false, false, // F1 F2
false, false, // F3 F4
false, false, // F5 F6
false, false, // F7 F8
false, false, // F9 F10
false, false }; // F11 F12
void Toggles();
// for testing
#define PRESS(x) press_key(x); std::cout << "Press: " #x << std::endl
#define RELEASE(x) release_key(x); std::cout << "Release: " #x << std::endl
int _tmain(int argc, _TCHAR* argv[])
{
cout <<"DayZ Helper by rotceh_dnih." << endl;

cout <<"press f3 for highgear in vehicle's" << endl;
cout <<"press f4 to Run :0" << endl;
while(1)
{
Toggles();
if (Fn[3]) {
PRESS(0x57);
init_ok = true;

}

if (Fn[2]) {
PRESS(0x45);
init2_ok = true;

}

if (!Fn[3] && init_ok) {
RELEASE(0x57);
init_ok = false;

}

if (!Fn[2] && init2_ok) {
RELEASE(0x45);
init2_ok = false;

}


}
return 0;
}

void Toggles()
{
static bool Fn_last_state[FN_TOGGLES];
for (int i=0; i<FN_TOGGLES; i++) {
bool key = (GetAsyncKeyState(VK_F1 + i) & 0x8000) != 0;
if (key && !(Fn_last_state[i])) {
Fn[i] = !(Fn[i]);
}
Fn_last_state[i] = key;
}
}

like i said sweet and simple :)

Share this post


Link to post
Share on other sites

lol yea ive heard all kinds of ways people have been hacking there keyboards for dayz lol one guy i know removes his "w" key and place's weghts on the button lmfao not anymore now he can just toggle his F keys to run/drive :)

Share this post


Link to post
Share on other sites

I use a 'G' key macro.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×