Results 1 to 5 of 5
  1. #1
    Finish's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    126
    Reputation
    11
    Thanks
    6
    My Mood
    Happy

    Thumbs down Wanna try a new PTC[mostly for my personal use]

    I was to make a PTC like

    PTC(" COMMAND HERE", Int of the Value);
    I got everything down pack but 1 problem

    I want it to be like this

    Code:
    void __cdecl PushToConsole(char* szVal, int value)
    {
    	void* vSetVar = (void*)0x0046F620;
    	
    	char scom[30];
    	sprintf(scom, szval & " %d", value);
    	/* You can see what i am trying to do. the joining of the 2 char*'s szval & " %d"  that is my problem that i cannot get to work.. i never did much with char*. */
    
    	_asm
    	{
    		push scom
    		call vSetVar
    		add esp, 4
    	}
    	
    }
    can someone help me out. I kno it looks pointless right now but i trying to get something new with it

  2. #2
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,193
    Reputation
    205
    Thanks
    1,437
    My Mood
    Mellow
    [php]
    void __cdecl PushToConsole(char* szVal, int value)
    {
    void* vSetVar = (void*)0x0046F620;

    char scom[30];
    sprintf(scom,"%s %d",szVal,value);
    /* You can see what i am trying to do. the joining of the 2 char*'s szval & " %d" that is my problem that i cannot get to work.. i never did much with char*. */

    _asm
    {
    push scom
    call vSetVar
    add esp, 4
    }

    }

    [/php]

    Fixed..

    Edit: You'd better set the value to a float type.

  3. The Following User Says Thank You to Void For This Useful Post:

    Finish (08-10-2010)

  4. #3
    TheFallenOwns's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    149
    Reputation
    10
    Thanks
    43
    would you please learn english?

  5. The Following User Says Thank You to TheFallenOwns For This Useful Post:

    J (08-09-2010)

  6. #4
    Gordon`'s Avatar
    Join Date
    Dec 2007
    Gender
    male
    Posts
    283
    Reputation
    24
    Thanks
    325
    PushToConsole("superduperbliblablukekelolololroflk ikwtfrolfz0mg", 1); would also give u a buffer overflow. so increase the size of the char array. best way is

    Code:
    char* scom = (char*)malloc(strlen(szVal)+ 10); 
    //+10 for some buffer space for the space and the number
    
    sprintf(...);
    
    asm {
      //bla bla
    }
    
    free(scom);


  7. The Following User Says Thank You to Gordon` For This Useful Post:

    Finish (08-10-2010)

  8. #5
    Finish's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    126
    Reputation
    11
    Thanks
    6
    My Mood
    Happy
    Thanks i kno what to do now

Similar Threads

  1. Tried to find U.ammo for mp5 but i run into problems.. :(
    By TheRedEye in forum WarRock - International Hacks
    Replies: 14
    Last Post: 05-25-2007, 06:33 AM
  2. anyone wanna buy lvl 84 with gunzp for lvl 25+ warrock
    By momomyst in forum WarRock - International Hacks
    Replies: 2
    Last Post: 05-16-2007, 02:29 AM
  3. Anyone Wanna Buy Lv 89 Rs Account For A 25+ Warrock Account?
    By xzezimax123 in forum WarRock - International Hacks
    Replies: 6
    Last Post: 05-15-2007, 12:03 PM
  4. My New Goth Look For 2007
    By SATANICAT in forum General
    Replies: 9
    Last Post: 01-08-2007, 03:20 PM
  5. [Done] I guess I wanna try something new
    By arunforce in forum Help & Requests
    Replies: 35
    Last Post: 07-08-2006, 04:01 AM