Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

julionib

Detect "owner" or "creator" of game object

Recommended Posts

julionib

Ok see if this fixes your issue, haven't properly tested myself yet, supports IV patch 7 and EFLC patch 2 (source included).

Place limits.asi wherever your asi loader requires then just run the game as usual.

 

http://jenksta.iv-m.com/iv/mission_cleanup.zip

hey man i tested the code and seems to work but it cant completely fix the issue, how much you incremented the "limit"?

 

also i have a error msg every time game starts but after this error messages i can proceed loading game

 

Untitled.jpg

 

maybe because of this error the .asi file is not working, the address is 0 on ASILog.txt while others .asi files load in "non zero" memory address:

 

Loading ASI E:\Program Files X\Grand Theft Auto IV 1.0.7.0\limits.asi
ASI loaded : E:\Program Files X\Grand Theft Auto IV 1.0.7.0\limits.asi, Address 0x00000000
edit: i fixed error msg making a copy of the DLL to gtaiv.exe folder, but it still being loaded in 0x00000, this is normal?
Edited by julionib

Share this post


Link to post
Share on other sites
jenksta

Hi the error is due to the msvc runtime used to compile it, if you have visual studio installed just compile it locally and use that and it should work fine. Either that or download the latest msvc runtime for vs2013. As for the limit it should be double what it was before (256->512). Although as I said I never thoroughly tested it with reproducing your issue so any problems feel free to post them and I'll try my best to fix them.

Share this post


Link to post
Share on other sites
pedro2555

I must have spent like 40min to an hour debugging a freaking script that was crashing constantly at loading, only to find out it was because of the issue discussed in here, just reloaded the game and the problem was fixed.. arh! What a pain...

Share this post


Link to post
Share on other sites
julionib

how you debug?

Share this post


Link to post
Share on other sites
pedro2555

how you debug?

 

That's a good question. Actually I can only debug using code isolation techniques, because I make heavy use of AdvancedHook.dll and it stops every time I attach a debugger to it. Which is extremely annoying in most situations.

 

But if you don't use any binary that prevents debuggers from attaching to it, you can place normal breakpoints in your code and attach GTA.exe to Visual Studio, and I bet you didn't know that ;D. Under the menu option 'DEBUG' there is the 'Attach to Process' option, just have your script running already and attach GTA.exe to Visual Studio, sometimes is a bit weird, but 99% works like a charm. Too bad those guys at LCPD:FR are bunch of retarded ego full developers and prevented debuggers to attach to their AdvancedHook,dll.

Share this post


Link to post
Share on other sites
NTAuthority

>attaching at a later time

ha, my method is better in allowing you to just F5, but sadly I can't post it here as a side effect of it is that it is a crack :(

Edited by NTAuthority

Share this post


Link to post
Share on other sites
LordOfTheBongs

put it on pastebin ;)

Share this post


Link to post
Share on other sites
julionib

lol my actual "debug" method is put console + screen messages, i need to improve this ^^

Share this post


Link to post
Share on other sites
LordOfTheBongs

lol my actual "debug" method is put console + screen messages, i need to improve this ^^

it works

Share this post


Link to post
Share on other sites
pedro2555

lol my actual "debug" method is put console + screen messages, i need to improve this ^^

 

Yeah that's my last method, and it is a bit painful.

Share this post


Link to post
Share on other sites
pedro2555

>attaching at a later time

ha, my method is better in allowing you to just F5, but sadly I can't post it here as a side effect of it is that it is a crack :(

 

Will it solve my problem with anti-debugger code in AdvancedHook.dll? If yes, I'm interested.

 

And you can post it even if the side effect is being a crack, what can't be done is, oh look this is how you crack GTA IV, which you just did, or at least started, if you haven't said that you could have just posted your debugging solution. But you can always PM me.

Share this post


Link to post
Share on other sites
AgentWD40

stumbled across this code, should help detect which objects/peds/vehicles are yours even when script crashes or reloading scripts. :turn:

 

c#

public static int MemoryAddress(this GTA.Object obj)        {            PropertyInfo info = typeof(GTA.Object).GetProperty("MemoryAddress", BindingFlags.NonPublic | BindingFlags.Instance);            int address = (int)info.GetValue(obj, null);            return address;        }

vb

Public Shared Function MemoryAddress(obj As GTA.Object) As Integer	Dim info As PropertyInfo = GetType(GTA.Object).GetProperty("MemoryAddress", BindingFlags.NonPublic Or BindingFlags.Instance)	Dim address As Integer = CInt(info.GetValue(obj, Nothing))	Return addressEnd Function
Edited by hardsty1e

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.