Warrock - Code Snippets

02/19/2013 14:10 R3d_L!n3#736
Quote:
Originally Posted by __underScore View Post
Yazzn is totally right as the given snippet does not say whether the variable i really is used for what you think it is.
Will dude i dont think he define 'I' as his index , cuz he already said he doesnt get his postion
02/19/2013 14:36 boknoy24#737
please help :/ . just my problem is when i saving the position then ON the opk in my 1st teammate are the position not mine.
02/21/2013 01:39 boknoy24#738
Quote:
Originally Posted by boknoy24 View Post
please help :/ . just my problem is when i saving the position then ON the opk in my 1st teammate are the position not mine.
help please :(. OPK that has saving position just like teleport :(
02/21/2013 14:21 iSkyLikeX#739
Quote:
Originally Posted by boknoy24 View Post
help please :(. OPK that has saving position just like teleport :(
Code:
void MakeTeleport()
{
  for(int i = 0; i < 32; i++)
  {
    cPlayer mPlayer = StructClass::getPlayer(i);
    if(mPlayer != null)
    {
       mPlayer->X = PlayerPositionsX[i];
       mPlayer->Y = PlayerPositionsY[i];
       mPlayer->Z = PlayerPositionsZ[i];
    }
  }
  SavePositions();
}

void SavePositions()
{
  for(int i = 0; i < 32; i++)
  {
    cPlayer mPlayer = StructClass::getPlayer(i);
    if(mPlayer != null)
    {  
      PlayerPositionsX[i] = mPlayer->X;
      PlayerPositionsY[i] = mPlayer->Y;
      PlayerPositionsZ[i] = mPlayer->Z;
    }
  }
  MakeTeleport();
}
;) Should Work Like this!
02/21/2013 19:17 SonyRazzer#740
Quote:
Originally Posted by iSkyLikeX View Post
Code:
void MakeTeleport()
{
  for(int i = 0; i < 32; i++)
  {
    cPlayer mPlayer = StructClass::getPlayer(i);
    if(mPlayer != null)
    {
       mPlayer->X = PlayerPositionsX[i];
       mPlayer->Y = PlayerPositionsY[i];
       mPlayer->Z = PlayerPositionsZ[i];
    }
  }
  SavePositions();
}
void SavePositions()
{
  for(int i = 0; i < 32; i++)
  {
    cPlayer mPlayer = StructClass::getPlayer(i);
    if(mPlayer != null)
    {  
      PlayerPositionsX[i] = mPlayer->X;
      PlayerPositionsY[i] = mPlayer->Y;
      PlayerPositionsZ[i] = mPlayer->Z;
    }
  }
  MakeTeleport();
}
;) Should Work Like this!
for(int i = 0; i < 32; i++)

->

Code:
for ( INT PlayerSlot = 0; PlayerSlot < pLocalServer->MaxPlayers; ++ PlayerSlot )
02/21/2013 19:31 +Yazzn#741
Code:
for (auto &player : wr_player_pool->remote_player)
02/21/2013 19:43 SonyRazzer#742
Quote:
Originally Posted by Yazzn (: View Post
Code:
for (auto &player : wr_player_pool->remote_player)
Trolololol, was kommt denn jetzt für Kranke scheiße ?
Kannst du mir das mal bitte erklären .. ?
02/21/2013 19:48 Raz9r#743
Ist doch seine Sache, wie er über ein Array iteriert. Wenn er gerne die erweiterte For-Schleife verwenden möchte, kann er das ja machen. :-)
02/22/2013 04:41 boknoy24#744
i got it anyone ;) thanks for helping :D

EDIT: btw i got prob here

[Only registered and activated users can see links. Click Here To Register...]

unlike this on zombie mode.

[Only registered and activated users can see links. Click Here To Register...]

not in one place. they are spread in first pic.
i using saving position opk.
02/26/2013 16:07 ignorehax#745
Hey, I would like to ask for a source to speedhack, because I do not know why the Mem does not work anymore.
02/26/2013 18:59 n4n033#746
Quote:
Originally Posted by ignorehax View Post
Hey, I would like to ask for a source to speedhack, because I do not know why the Mem does not work anymore.
you need to use UnknownPK Unpatch method to get it working back.

Code:
VOID xWriteMemory(PVOID dwAdress,VOID* dwValue,INT dwBytes)
{
    DWORD dwProtect,dwProtected;  
    VirtualProtect(dwAdress,dwBytes,PAGE_EXECUTE_READWRITE,&dwProtect);
    memcpy(dwAdress,dwValue,dwBytes);   
    VirtualProtect(dwAdress,dwBytes,dwProtect,&dwProtected);
}
template <typename T>void WriteMEM(void* adr,T Vaule,T *Input = NULL)
{
        if(Input == 0)
                xWriteMemory((void*)adr,(void*)&Vaule,sizeof(T));
        else
                xWriteMemory((void*)Input,(void*)adr,sizeof(T));
}
02/26/2013 21:14 ~ExoduS~*#747
Quote:
Originally Posted by n4n033 View Post
you need to use UnknownPK Unpatch method to get it working back.

Code:
VOID xWriteMemory(PVOID dwAdress,VOID* dwValue,INT dwBytes)
{
    DWORD dwProtect,dwProtected;  
    VirtualProtect(dwAdress,dwBytes,PAGE_EXECUTE_READWRITE,&dwProtect);
    memcpy(dwAdress,dwValue,dwBytes);   
    VirtualProtect(dwAdress,dwBytes,dwProtect,&dwProtected);
}
template <typename T>void WriteMEM(void* adr,T Vaule,T *Input = NULL)
{
        if(Input == 0)
                xWriteMemory((void*)adr,(void*)&Vaule,sizeof(T));
        else
                xWriteMemory((void*)Input,(void*)adr,sizeof(T));
}
but this methode crash and making partyprogramm too on 32bit system :D
02/26/2013 21:58 GigaByte™#748
Quote:
Originally Posted by ignorehax View Post
Hey, I would like to ask for a source to speedhack, because I do not know why the Mem does not work anymore.
WR made an update like half a year ago blocking code that changes "raw" memory... UnknownPK made what N4N033 posted, public, allowing almost everyone to use it... by that many other people just made their own code out of that (since there's not only one way for making things).

I think speed can be made with its offset and you shouldn't have problems. ;)
02/27/2013 12:02 n4n033#749
Quote:
Originally Posted by ~ExoduS~* View Post
but this methode crash and making partyprogramm too on 32bit system :D
not if you got a good detour ;)
02/27/2013 13:27 [N]oSoul#750
fk all :D

Health Bar :D

Credits to : MaxyLopez98

Quote:
if( cEsp.FZ_HEALTHBAR== 1 )
{
char szhealth[100];
int Red1,Green1;
Red1 = 255-((GetGlobalInfo(MaxPlayer)->HEALTH/10)*2.55);
Green1 = (GetGlobalInfo(MaxPlayer)->HEALTH/10)*2.55;
DrawBox((int)EspView.x-80, (int)EspView.y-115, 100, 5,D3DCOLOR_ARGB( 255 ,20, 20, 20),pDevice);
DrawBox((int)EspView.x-80, (int)EspView.y-115, GetGlobalInfo(MaxPlayer)->HEALTH/10, 5,D3DCOLOR_ARGB( 255, Red1, Green1, 0),pDevice);
DrawRectangle((int)EspView.x-80, (int)EspView.y-115,100, 5, 1,LightBlue,pDevice);
sprintf(szhealth,"%d HP\n ",(int)GetGlobalInfo(MaxPlayer)->HEALTH/100);
Frenz->DrawTextC((int)EspView.x-100, (int)EspView.y-120,D3DCOLOR_ARGB(255,000,191,255), szhealth, pFont);
EspView.y += 14;
}