Page 9 of 13 FirstFirst ... 7891011 ... LastLast
Results 121 to 135 of 189
  1. #121
    edwardjiang's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Sydney
    Posts
    450
    Reputation
    10
    Thanks
    21
    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?

  2. #122
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by edwardjiang View Post
    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?
    Nahh mate ...
    Download and learn Microsoft visual C++

  3. #123
    edwardjiang's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Sydney
    Posts
    450
    Reputation
    10
    Thanks
    21
    whats that? can someone like an expert coder teach me or give me a tutorial? that would be heaps good. thanks for helping whit

  4. #124
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,025
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    go to cplusplus.com (seriously)
    Then learn D3D at the Toymaker.

    Come back
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  5. #125
    austen407's Avatar
    Join Date
    Dec 2007
    Gender
    male
    Location
    Virginia
    Posts
    87
    Reputation
    10
    Thanks
    10
    My Mood
    Amazed
    Nice Post +Rep

  6. #126
    Gordon`'s Avatar
    Join Date
    Dec 2007
    Gender
    male
    Posts
    283
    Reputation
    24
    Thanks
    325
    useful class i wrote to handle console commands

    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);
    			}
    		}
    	}
    };
    replace runconsolecommand with ur function

    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();


  7. The Following 3 Users Say Thank You to Gordon` For This Useful Post:

    cosconub (09-02-2010),pimpinallovertheworld666 (07-14-2010),Zoom (07-15-2010)

  8. #127
    pimpinallovertheworld666's Avatar
    Join Date
    Jan 2009
    Gender
    female
    Posts
    972
    Reputation
    10
    Thanks
    93
    My Mood
    Fine
    Nice Gordon...

  9. #128
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Quote Originally Posted by Gordon` View Post
    useful class i wrote to handle console commands

    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);
    			}
    		}
    	}
    };
    replace runconsolecommand with ur function

    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();
    THanks for that but it isnt needed... only d3d in gellins was semi-patched.. not PTC. But ty

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  10. #129
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,025
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    Whats the off statement for a D3D Crosshair.
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  11. #130
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Guys, how do u make the menu appear over hte box? my box overlaps menu.

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  12. #131
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,025
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    Draw the box first then the menu. Try that.
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  13. #132
    Gordon`'s Avatar
    Join Date
    Dec 2007
    Gender
    male
    Posts
    283
    Reputation
    24
    Thanks
    325
    Quote Originally Posted by CAFlames View Post


    THanks for that but it isnt needed... only d3d in gellins was semi-patched.. not PTC. But ty
    dont post bullshit if you dont know what the code does.


  14. #133
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Quote Originally Posted by CAFlames View Post
    Guys, how do u make the menu appear over hte box? my box overlaps menu.
    Draw box first then your menu and fonts
    -Rest in peace leechers-

    Your PM box is 100% full.

  15. #134
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Quote Originally Posted by Zoom View Post


    Draw box first then your menu and fonts
    Hmmm i need to draw box in endscene not with my menu so shud i just put if insert then sleep(100) right above draw.string?

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  16. #135
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    Quote Originally Posted by CAFlames View Post


    Hmmm i need to draw box in endscene not with my menu so shud i just put if insert then sleep(100) right above draw.string?
    why would you sleep endscene. Thats just asking for lag D:

Page 9 of 13 FirstFirst ... 7891011 ... LastLast

Similar Threads

  1. [Release] Class library with some useful functions.
    By t7ancients in forum C# Programming
    Replies: 8
    Last Post: 05-17-2011, 04:41 AM
  2. Useful Functions
    By Iamazn1 in forum Visual Basic Programming
    Replies: 6
    Last Post: 01-15-2011, 12:14 AM
  3. [Release] DrawCheckBox Function
    By DeadLinez in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 17
    Last Post: 09-10-2010, 04:49 AM
  4. [Discussion] Ideas for my next launcher release, look, functions & more
    By teun95 in forum CrossFire Hacks & Cheats
    Replies: 17
    Last Post: 03-02-2010, 04:38 PM
  5. [Release] USE OPK FOR COMBAT ARMS NO DOWNLOAD UNPATCHABLE AND UNDETECTABLE!!!
    By wetrichard in forum Combat Arms Hacks & Cheats
    Replies: 114
    Last Post: 05-24-2009, 09:40 AM