hey, im new to this and i want to learn coding. can you tell me how this works? and do i put it in notepad and convert to .dll or something?
[RELEASE] Useful Functions
whats that? can someone like an expert coder teach me or give me a tutorial? that would be heaps good. thanks for helping whit
go to cplusplus.com (seriously)
Then learn D3D at the Toymaker.
Come back
Then learn D3D at the Toymaker.
Come back
Nice Post +Rep
useful class i wrote to handle console commands
replace runconsolecommand with ur function
usage;
Code:
class CConsoleCommand {
char commands[100][100];
float on_value[100];
float off_value[100];
int othertoggle[100];
int* toggle;
int oldtoggle;
int slot;
public:
CConsoleCommand(){
memset(&commands, 0, sizeof(commands));
memset(&on_value, 0, sizeof(on_value));
memset(&off_value, 0, sizeof(off_value));
memset(&othertoggle, 0, sizeof(othertoggle));
toggle = 0;
oldtoggle = 0;
}
CConsoleCommand(int *toggle) {
CConsoleCommand();
this->toggle = toggle;
}
void Add(char* cmd, float on_value, float off_value, int toggle = 0) {
strcpy(commands[slot], cmd);
this->on_value[slot] = on_value;
this->off_value[slot] = off_value;
if(toggle) {
othertoggle[slot] = toggle;
}
slot++;
}
void Execute() {
if(*toggle && *toggle != oldtoggle) {
oldtoggle = *toggle;
char buf[64] = "";
bool found = false;
for(int i = 0; i < slot; i++) {
if(othertoggle[i] == *toggle) {
sprintf(buf, "%s %f", commands[i], on_value[i]);
g_pEngine->m_pLTBase->RunConsoleCommand(buf);
found = true;
}
}
if(found) {
return;
}
for(int i = 0; i < slot; i++) {
if(!othertoggle[i]) {
sprintf(buf, "%s %f", commands[i], on_value[i]);
g_pEngine->m_pLTBase->RunConsoleCommand(buf);
}
}
}
if(!*toggle && *toggle != oldtoggle) {
oldtoggle = *toggle;
char buf[64] = "";
for(int i = 0; i < slot; i++) {
sprintf(buf, "%s %f", commands[i], off_value[i]);
g_pEngine->m_pLTBase->RunConsoleCommand(buf);
}
}
}
};
usage;
Code:
//global definition, cvars.Boxes is the variable i use to turn Boxes on or off
CConsoleCommand cmdBoxes(&cvars.Boxes);
//initialization, call it only once
cmdBoxes.Add("ModelDebug_DrawBoxes", 1, 0);
//in a thread:
cmdBoxes.Executes();
Nice Gordon...
Whats the off statement for a D3D Crosshair.
Guys, how do u make the menu appear over hte box? my box overlaps menu.
Draw the box first then the menu. Try that.
This thread is closed for replies.
Similar Threads
Combat Arms Hacks & Cheats[Release] USE OPK FOR COMBAT ARMS NO DOWNLOAD UNPATCHABLE AND UNDETECTABLE!!!WE 114 CrossFire Hacks & CheatsIdeas for my next launcher release, look, functions & more
17 Combat Arms Hack Coding / Programming / Source Code[Release] DrawCheckBox Function 17 Visual Basic ProgrammingUseful FunctionsIA 6 C# ProgrammingClass library with some useful functions.T7 8
