Quantcast

Jump to content

» «
Photo

Generic GTA 4 documentation

38 replies to this topic
Erem
  • Erem

  • Members
  • Joined: 17 Mar 2010

#31

Posted 18 March 2010 - 08:19 PM

QUOTE (NTAuthority @ Mar 18 2010, 08:11)
Does passing a random RGBA (in a single DWORD) value still work as it did in San Andreas?

I've never modded San Andreas so I can't really say.

I just tried creating 20 blips in Alice and used CHANGE_BLIP_COLOUR(blip.a, math.random(0, 65535)) to set each to a random colour in the range 0 - 65535, and each blip was a different shade of blue.

I don't know whether that answers your question or not.

NTAuthority
  • NTAuthority

    hell, no, tunnel, no

  • Feroci
  • Joined: 09 Sep 2008
  • European-Union
  • Best Script or Plugin 2016 [SkyGfx] [Contribution]
    Best Conversion 2014 [ViIV for GTANY]
    Most Knowledgeable [Tech] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Contribution Award [Mods]

#32

Posted 19 March 2010 - 07:58 AM

QUOTE (Erem @ Mar 18 2010, 21:19)
I just tried creating 20 blips in Alice and used CHANGE_BLIP_COLOUR(blip.a, math.random(0, 65535)) to set each to a random colour in the range 0 - 65535, and each blip was a different shade of blue.

I don't know whether that answers your question or not.

Yep, that's supposed to happen if the support for it is still there. smile.gif Thanks for testing it, I need it for a future IV mod of mine.

CheaterNo1
  • CheaterNo1

    Snitch

  • Members
  • Joined: 09 Mar 2009

#33

Posted 14 April 2010 - 11:04 AM

QUOTE (ZAZ @ Jan 15 2010, 19:12)
QUOTE (spaceeinstein @ Jan 14 2010, 11:04)

I have made a complete list of AWARD_ACHIEVEMENT by comparing the list on Rockstar's site and the ones in the game. I don't want to test it right now but is it possible to cheat the achievements?

Sure it is and 51 isnt "Taking a Liberty", it just continues with TLAD- and TBoGT-achieves
51 TLAD: One Percenter
52 TLAD: The Lost Boy
53 TLAD: Easy Rider
...
65 TBoGT: Gold Star

opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#34

Posted 28 April 2010 - 05:38 PM Edited by opium_addict, 28 April 2010 - 06:01 PM.

CODE
__declspec( noinline ) u32 GTA4_GetHandleFromPed( CPool< void* >* pPool, void *Ped )
{
_asm mov ecx, pPool;
_asm mov eax, Ped;
_asm sub eax, [ecx];
_asm cdq;
_asm idiv dword ptr [ecx+12];
_asm mov edx, eax;
_asm mov eax, [ecx+4];
_asm movzx eax, byte ptr [eax+edx];
_asm shl edx, 8;
_asm add eax, edx;
}

// ASSEMBLY FUNCTIONS, MAYBE CAN NOT BE A CLASS FUNCTION

CPool< void* >* RiotThread::GetPedPoolNative()
{
return reinterpret_cast< CPool< void* >* >( *reinterpret_cast< DWORD* >( Game::GetBase() + 0x18A72BC ) );
}

u32 RiotThread::GetPedCount()
{
if( GetPedPoolNative() == NULL ) return 0;

return GetPedPoolNative()->Count();
}

b8 RiotThread::GetPedByIndex( int idx, Ped *Out )
{
if( !Out ) return false;

Out->Set( 0 );

if( GetPedCount() == 0 )
†return false;

void *CurrentPedIdx = GetPedPoolNative()->at( idx );

if( CurrentPedIdx == NULL )
†return false;

Out->Set( GTA4_GetHandleFromPed( GetPedPoolNative(), CurrentPedIdx ) );

return Out->IsValid();
}


for 1.0.6.0, this will allow you to get a Scripting::Ped from CPed, i didn't know where to post it so i picked here, i could probably link to it from aru's scripthook topic also.

Credits: Jenksta, listener, without them it would not have been done

CPool is here: http://public.sannyb...io-20090115.rar

Drunk Russian 9
  • Drunk Russian 9

    Soldier

  • Members
  • Joined: 13 Nov 2007

#35

Posted 01 May 2010 - 06:00 PM

Has anyone found a function for selecting gears? There must be one . . . cryani.gif

opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#36

Posted 01 May 2010 - 11:16 PM

QUOTE (Drunk Russian 9 @ May 1 2010, 12:00)
Has anyone found a function for selecting gears? There must be one . . . cryani.gif

You could probably memory-search for that type of thing, i might later, but if its not a native then it is likely an offset from your CVehicle somewhere

If you want just pickup tsearch or whatever, and use a native trainer to "pause" the game (you might even be able to "pause" in SP, with ESC, and itll freeze the gear state)
then search for gear, it is probably likely a single BYTE, WORD or INT (1,2,4 bytes), my bet is on 1 byte since there is always so few of them, anyway, search for the value which is probably 0 (or 1) to GEAR_MAX which is probably 6 or 8 in most vehicles.

Drunk Russian 9
  • Drunk Russian 9

    Soldier

  • Members
  • Joined: 13 Nov 2007

#37

Posted 06 May 2010 - 11:35 PM

I have no clue as to how to go about searching. If you could help t'would be great.

opium_addict
  • opium_addict

    CODE WRECKER

  • Members
  • Joined: 02 Aug 2008

#38

Posted 22 May 2010 - 01:28 PM

I updated the wiki bone-related functions and made a new page "Ped_Bones", here is the correct listing from assembly, all bones included:
http://www.gtamoddin...title=Ped_Bones

spaceeinstein
  • spaceeinstein

    Chocolate

  • GTA Mods Staff
  • Joined: 17 Jul 2003
  • Hong-Kong
  • Major Contribution Award [Mods]
    Helpfulness Awards [Mods]

#39

Posted 16 July 2010 - 06:27 PM Edited by spaceeinstein, 19 July 2010 - 12:01 AM.

I'm trying to compile a list of all GXT entries in TBOGT. Only a few tables are completed.
http://spaceeinstein...m/GTATBOGT.text
Does anyone have or can anyone make a full list? Its tough doing all these by hand.

Completed tables:
ARN02
CLBPRC1
CLBPRC2
CLBPRC3
CLBPRC4
CLBPRC5
CLBPRC6
CLBPRC7
CLBPRC8
FRI2
MARG2
TONY8
TONY10




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users