Post: SPRX C++ Take Weapon
09-08-2014, 03:51 PM #1
lutsch1234
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({}); Hi Guys i want to ask you if anyone knows how to take all weapons from a Client. I found the xbox way :

public static void TakeWeapon(int client)
{
Jtag.Call(0x82272B60, getClientState(client), Jtag.Call(0x820F7828, getClientState(client)),1);
}
Its the C# Version i tried to write it for ps3 in C++ also i changed the secound Offset but i dont know what the first Offset is. If you know how to do it please post it down below. Thank you all.
09-08-2014, 05:44 PM #2
GMTPS3
Do a barrel roll!
0x1C409C - BG_TakePlayerWeapon(playerState_s *ps, unsigned int weaponIndex, int takeAwayAmmo)
09-08-2014, 06:10 PM #3
lutsch1234
Bounty hunter
So thats the Function for get Client state for C++ :
int getClientState(int client)
{
return 0x82F99580 + (0x3980 * client);
};

Then i do this :
void TakeWeapon1(int client)
{
*(char*)(0x1C409C, getClientState(client), *(char*)(0x3D7D8, getClientState(client)),1);
}

dont know if it works with *(char*) but PS3.ReadByte get me an error
09-08-2014, 06:52 PM #4
ItsLollo1000
Little One
Originally posted by lutsch1234 View Post
So thats the Function for get Client state for C++ :
int getClientState(int client)
{
return 0x82F99580 + (0x3980 * client);
};

Then i do this :
void TakeWeapon1(int client)
{
*(char*)(0x1C409C, getClientState(client), *(char*)(0x3D7D8, getClientState(client)),1);
}

dont know if it works with *(char*) but PS3.ReadByte get me an error


Just Look at sebs giveweapon c++ he also Uses take player weapon
09-08-2014, 10:47 PM #5
isn't this released...

The following 2 users say thank you to OLDSCHOOLMODZHD for this useful post:

Smooth, Swaqq
09-09-2014, 10:13 PM #6
lutsch1234
Bounty hunter
yes i tried that out but it only works if i put it as a mod in a mod menu if i trie to do it like this:
void Mods(uint64_t arg)
{for(int i = 0; i < 18; i++)
for(;Winky Winky
{
if(InGame())
{ onPlayerSpawned2();
// onPlayerdieed();
//sleep(1000);
//ChangeCamo(i,Gold);
//SV_GameSendServerCommand(i,"c Press^2DPAD^1UP^4To^6Get^8a^1Sniper");

}
if(DeineMuddaBlaestGut(i, Up))

{

TakeWeapon(i, iw5_msr_mp, 0);


}}}
my ps3 freeze so i cant do it like seb i also tried ChangeCamo(i, Gold) = freeze and i tried TakeWeapon(i, 0, 0); = freeze so if you have any other Idee how to get this working please tell me
09-10-2014, 08:04 PM #7
JackMods-
Can’t trickshot me!
Originally posted by lutsch1234 View Post
Hi Guys i want to ask you if anyone knows how to take all weapons from a Client. I found the xbox way :

public static void TakeWeapon(int client)
{
Jtag.Call(0x82272B60, getClientState(client), Jtag.Call(0x820F7828, getClientState(client)),1);
}
Its the C# Version i tried to write it for ps3 in C++ also i changed the secound Offset but i dont know what the first Offset is. If you know how to do it please post it down below. Thank you all.


From Sebs Give Weapon Script seb5594 Enzo

    
#define G_Client(clientIndex) ( 0x0110A280 + ( clientIndex * 0x3980) )

void TakeWeapon(int clientIndex, int WeaponIndex, int takeAwayAmmo)
{
opd_s BG_TPW = { 0x001C409C, TOC };
void(*BG_TakePlayerWeapon)(int *playerState, int WeaponIndex, int takeAwayAmmo) = (void(*)(int*, int, int))&BG_TPW;
BG_TakePlayerWeapon((int*)G_Client(clientIndex), WeaponIndex, takeAwayAmmo);
}

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo