Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] Vehicle Kills Command
Re: [SSGM 4.0 Plugin] Vehicle Kills Command [message #489728 is a reply to message #471987] Fri, 07 November 2014 03:58 Go to previous messageGo to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
VehDestroyed is offset 0x50 of cPlayer.

The code used to access VehDestroyed is:

.text:11001647                 push    eax
.text:11001648                 call    ebx ; Find_Player(int) ; Find_Player(int)
.text:1100164A                 push    esi
.text:1100164B                 mov     ebp, eax

....

.text:110016A6                 mov     eax, [ebp+50h]



So you can just use something like:

cPlayer *Player = Find_Player(blabla)
int VehsDestroyed;

_asm
{
    mov eax, Player
    mov eax, [eax+0x50]
    mov [VehsDestroyed], eax
}



Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Skin] Stealth Black Hand "Venom" Retexture
Next Topic: mgagd_ag_2 Fix
Goto Forum:
  


Current Time: Sat Nov 02 19:05:35 MST 2024

Total time taken to generate the page: 0.00855 seconds