Quantcast

Jump to content

» «
Photo

[VC] gta vice city - tracer bullet

11 replies to this topic
VintProg
  • VintProg

    Square Civilian

  • Members
  • Joined: 26 Jun 2010

#1

Posted 16 April 2014 - 02:34 PM

 

 

source code c++

void VC_DrawFuncHUD() {
 
auto CBulletInfo__AddBullet  = (void (__cdecl*)(CEntity_ * entity, int wpnIndex, float x1, float y1, float z1, float x2, float y2, float z2))0x05C47C0;
auto AddParticle = (void (__cdecl*)(char, RwV3d*, RwV3d*, CEntity_ *, float, RwRGBA*, int,int,int,int ) )0x0563CC0;
 
 
if (GetAsyncKeyState(0x4D) != 0 ) {
    CPed *pPed =        CPlayerPed::GetPlayerPed();
 
        CBulletInfo__AddBullet((CEntity_*)pPed , 29, _Camera->cams[_Camera->activeCam].camPos.x, 
                _Camera->cams[_Camera->activeCam].camPos.y,
                _Camera->cams[_Camera->activeCam].camPos.z + 0.1f,
                 _Camera->cams[_Camera->activeCam].targetPoint.x,
                  _Camera->cams[_Camera->activeCam].targetPoint.y,
                   _Camera->cams[_Camera->activeCam].targetPoint.z
                );
 
 
        RwV3d v1;
        RwV3d v2;
        RwRGBA rw;
 
        v1 = _Camera->cams[_Camera->activeCam].camPos;
        v2 = _Camera->cams[_Camera->activeCam].targetPoint;
 
        rw.alpha = 255;
        rw.blue  = rand() % 255;
        rw.green = rand() % 255;
        rw.red   = rand() % 255;
 
        AddParticle(56, &v1, &v2, 0, 0.0, &rw, 0, 0, 0, 8300);
   }
 
}

//Use inject code

void injectFunction (DWORD address, DWORD function) {
DWORD _old;
    VirtualProtect((LPVOID)address,4,  PAGE_READWRITE, &_old); 
    BYTE * patch = (BYTE *)address;
    *patch = 0xE9;    // JMP
    *(DWORD *)(patch+1) = (function-(address+5));    
     VirtualProtect((LPVOID)address,4, _old, &_old); 
}



injectFunction(0x043E490, (DWORD)VC_DrawFuncHUD);

  • Mark01 likes this

Silent
  • Silent

    Altering R* Vision™ since 2008

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#2

Posted 16 April 2014 - 05:12 PM

Nice, but I guess it'd be better if you provided a compiled ASI too... and maybe even the slightest description :p

ALMOST610
  • ALMOST610

    Have you driven a Ford... Lately?

  • Feroci
  • Joined: 30 Jan 2009
  • Australia

#3

Posted 23 April 2014 - 04:51 AM

Well this is a new one, hadnt heard you were working on this one VintProg, looks like another interesting thing from you.


xNCx
  • xNCx

    Street Cat

  • Members
  • Joined: 15 May 2008
  • None

#4

Posted 24 April 2014 - 07:58 PM

What the... :D

 

Waiting for a compiled script so I can see it on my own.


Silent
  • Silent

    Altering R* Vision™ since 2008

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#5

Posted 24 April 2014 - 09:37 PM

The source is pretty much uncompileable unless a person who wants to compile it has some proper VC headers too.

Including a compiled code would save a lot of hassle.

sharpie_eastern
  • sharpie_eastern

    Do it thyself

  • Members
  • Joined: 25 Oct 2008
  • United-States

#6

Posted 14 September 2014 - 05:21 AM Edited by sharpie_eastern, 14 September 2014 - 06:55 AM.

Maybe there's something he doesn't want us to know :blink:

  • Jinx. likes this

HM128
  • HM128

    alovelyday

  • Feroci
  • Joined: 09 Jul 2006
  • None
  • Best Map 2013 "ViceCityStories PC Edition"

#7

Posted 14 September 2014 - 10:22 PM Edited by HackMan128, 15 September 2014 - 10:46 AM.

I completed headers and compiled this stuff, ASI plugin and source code here.

Push m key to shot bullets

 

Spoiler

ThirteenAG
  • ThirteenAG

    Gangsta

  • Feroci
  • Joined: 29 Dec 2008
  • None
  • Contribution Award [Mods]

#8

Posted 17 September 2014 - 11:07 PM Edited by ThirteenAG, 17 September 2014 - 11:09 PM.

I don't want to create another thread for such small mod, so i'm gonna post here. This is a remake of cleo version, which was planned a long time ago. 1.0 exe required, as always.



wBqbXjM.jpg

github.com/ThirteenAG/Bullettraces_gta3vc/releases/latest
  • HM128, Gramps, Tadzik and 1 other like this

HM128
  • HM128

    alovelyday

  • Feroci
  • Joined: 09 Jul 2006
  • None
  • Best Map 2013 "ViceCityStories PC Edition"

#9

Posted 18 September 2014 - 02:29 PM

Is version for GTA III using PlayOneShot function to play any sounds from game?


ThirteenAG
  • ThirteenAG

    Gangsta

  • Feroci
  • Joined: 29 Dec 2008
  • None
  • Contribution Award [Mods]

#10

Posted 18 September 2014 - 02:51 PM

Is version for GTA III using PlayOneShot function to play any sounds from game?

I guess.
57C840 ; cDMAudio::PlayOneShot((int, unsigned short, float))

Btw, there was a small update, it's better to redownload.

SaL_Leone
  • SaL_Leone

    Homie

  • Members
  • Joined: 28 Dec 2012
  • None
  • Best WIP Mod 2014 [Grand Theft Auto 3D]

#11

Posted 18 September 2014 - 03:30 PM Edited by SaL_Leone, 18 September 2014 - 03:31 PM.

I don't want to create another thread for such small mod, so i'm gonna post here. This is a remake of cleo version, which was planned a long time ago. 1.0 exe required, as always.



wBqbXjM.jpg

github.com/ThirteenAG/Bullettraces_gta3vc/releases/latest

Wow,I've always looking for this!Can i have permission?For VCS mod?It is like in VCS.


ThirteenAG
  • ThirteenAG

    Gangsta

  • Feroci
  • Joined: 29 Dec 2008
  • None
  • Contribution Award [Mods]

#12

Posted 18 September 2014 - 03:40 PM

Feel free.
  • SaL_Leone likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users