Quantcast

Jump to content

» «
Photo

Visible Armour Mod Error Always! :(

23 replies to this topic
jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#1

Posted 06 December 2011 - 08:45 PM Edited by jitsuin, 06 December 2011 - 08:54 PM.

OK so when I first used Visible Armour mod it worked no problem. Now I tried using again and I always get an error! sad.gif

I am on GTA IV 1.0.4, using scripthook.dll 0.4.0.0, scripthookdotnet.asi 1.7.1.7 Beta, and using xlive.dll asi loader. Everytime I load the scripts I get an error. I even tried removing all scripts from my scripts folder and it wont work. I even removed all .asi's except for my trainer v6.3 asi. So I dont think its a conflict with another script or asi. I have lots of texture mods and I know this script tell the game to put on the vest listed under Special, where u can find duffel bag and backpack, when u change clothes in trainer.

Im not using the ammo bag mod while trying this either. Any help? Did anyone have the same problem and figure out how to fix. I really really wanna use this in because i love as much realism as possible.

Thanks to lilmcnessy for making this...I wish u made open source but no problem, I understand wink.gif

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#2

Posted 06 December 2011 - 09:10 PM

Another thing....here is the readme:

QUOTE
Mod Made By Lilmcnessy

DotNet Version 1
Whenever you are wearing armour you will now automatically wear it visibly.

Bugs
-Unknown Yet

1.Make sure you have an asi loader and Hazardx's .net scripthook and Aru's scripthook
2.Place Components Mod.net.dll in your scripts folder in your gta 4 directory
Keys
None

Do not steal my mod and claim it as your own.
If you are rehosting give proper credit to me for making the mod and please inform me.


So is this telling me i need to download the separate components mod for this to work?? I thought i got this working once before and i wasnt using that components mod...i guess ill try again and post back here tonight if thats the fix. In the meantime I would like to know if anybody knows the solution.

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#3

Posted 07 December 2011 - 05:49 AM

ok so using his components mod did not help. So now i have his .dll decompiled and i can see the program language in c#. So the error im getting is saying something like, and im sayin this from memory...

SystemMethod unable to find Int32 getpedskin.blah blah blah, basically some method does not exist that its looking for. Script loads fine but error during tick

So i have very little coding skills...none really but im a bright guy and can learn. So now i am looking at his script in C# and i have MS Visual C# 2010 express...can someone give me a little help with pointing me in the right direction so i can edit the error and recompile or is this going to be way beyond my knowlege...thanks!!

MODS WILL YOU PLEASE MOVE THIS TO THE CODING SECTION...thanks smile.gif

AngryAmoeba
  • AngryAmoeba

    Symbiote

  • Members
  • Joined: 12 Jan 2009

#4

Posted 07 December 2011 - 07:46 AM Edited by AngryAmoeba, 07 December 2011 - 07:52 AM.

Search for the part of his code that uses the missing method mentioned in the error message. It's probably something like Player.PedSkin.GetComponentModel().

Change it to use this format instead: Player.Skin.Component.Bags.ModelIndex

To enable the visible armor, use this:
Player.Skin.Component.Bags.ModelIndex = 2;
And use this to disable it:
Player.Skin.Component.Bags.ModelIndex = 0;

hackoncrack
  • hackoncrack

    Player Hater

  • BUSTED!
  • Joined: 01 Aug 2011

#5

Posted 07 December 2011 - 02:19 PM

delete

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#6

Posted 07 December 2011 - 02:20 PM

Thank you AA, I appreciate your response, I am going to try and figure it out tonight. I will post my success or failure...

And I just wanna say your Arrest Warrant mod is one of my favorite mods I have installed, the game is unplayabe for me any other way, hopefully it doesnt take u long to release one for GTA V wink.gif

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#7

Posted 08 December 2011 - 02:30 AM

I changed two lines to what u said and 9 errors went to 1 error when I ran the script in MS Visual C# 2010 Express!! smile.gif

This is what im stumped on now...

if (base.Player.Skin.GetComponentModel(3) == 2)

What do I change GetComponentModel to? I am googling to try and find out. I am on the gtamodding wiki and i am guessing SET_CHAR_COMPONENT_VARIATION but not sure...thanks!

AngryAmoeba
  • AngryAmoeba

    Symbiote

  • Members
  • Joined: 12 Jan 2009

#8

Posted 08 December 2011 - 03:02 AM

I think you can probably change that to:

if (base.Player.Skin.Component.Bags.ModelIndex == 2)

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#9

Posted 08 December 2011 - 03:40 AM

ok, going to compile and test. I just set my system path to csc.exe and am in the command prompt, googling what to do next...lol...getting close wink.gif

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#10

Posted 08 December 2011 - 03:48 AM Edited by jitsuin, 08 December 2011 - 03:59 AM.

Actually i tried to build in the IDE and now i am getting two errors: The type or namespace name 'GTA' and 'Script' could not be found. What references am i missing?

The only reference i added was the scripthookdotnet.dll that was in the developers folder

Ok i think im onto something...

QUOTE
We also need to add the System.Drawing and System.Windows.Forms refrences. These will be under the .net tab.


from here: http://www.gtaforums...howtopic=401577

just added those 2, did not work... confused.gif

AngryAmoeba
  • AngryAmoeba

    Symbiote

  • Members
  • Joined: 12 Jan 2009

#11

Posted 08 December 2011 - 04:11 AM

GTA and Script should both be in ScriptHookDotNet.dll (in scripts\for Developers\bin)...

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#12

Posted 08 December 2011 - 04:17 AM Edited by jitsuin, 08 December 2011 - 04:25 AM.

Sorry I misread you, yeah i added already, i wonder why it is not detecting those namespaces

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#13

Posted 08 December 2011 - 04:26 AM

^edit

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#14

Posted 08 December 2011 - 04:32 AM Edited by jitsuin, 08 December 2011 - 04:45 AM.

OK i fixed that by changing the target framework of the script to 4.0, now the only errors i am getting is:

'GTA.Script.Interval.Set': cannot explicitly call operator or accessor

and

'GTA.Script.Tick.Add': cannot explicitly call operator or accessor

I decompiled again and started new project...strike 1, i think it is beacuse i deleted a file called _Module_.cs thinking it was a junk file that was a product of the decompile

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#15

Posted 08 December 2011 - 04:50 AM

ok i think im where i want to be but on the _Module_.cs file it is saying Identifier expected, this is the code on_Module_.cs:

CODE
internal class <Module>
{

}

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#16

Posted 08 December 2011 - 05:02 AM

ok it just cant find Module now....jeez i dunno what to do next

AngryAmoeba
  • AngryAmoeba

    Symbiote

  • Members
  • Joined: 12 Jan 2009

#17

Posted 08 December 2011 - 05:55 AM

Honestly it'd probably be easier to learn how to make your own version of the script. You might learn a lot by looking at the example scripts in the "for Developers" folder.

The script would do something like this, I think:
CODE
if (Player.Character.Armor > 0) {
   if (Player.Skin.Component.Bags.ModelIndex == 0) {
       Player.Skin.Component.Bags.ModelIndex = 2;
   }
} else if (Player.Skin.Component.Bags.ModelIndex == 2) {
   Player.Skin.Component.Bags.ModelIndex = 0;
}

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#18

Posted 08 December 2011 - 05:57 AM

you are probably right, gonna start digging around at those examples...thanks!

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#19

Posted 08 December 2011 - 07:40 AM Edited by jitsuin, 08 December 2011 - 08:14 AM.

i dont know why i could not ever get it to compile, the proper references were added and i followed the tutorial posted by Andrew. I even copied Andrew's code and tried to compile and it wont find GTA or Script in the scripthookdotnet reference. Driving me crazy! I know I am probably missing something basic. sad.gif

i even tried to compile test scripts from the dev/bin folder and still cant find GTA or Scripts reference, i must be missing some kind of properties setting confused.gif

Not giving up though wink.gif

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#20

Posted 08 December 2011 - 09:04 AM Edited by jitsuin, 08 December 2011 - 04:09 PM.

im so close, i wasnt refrencing correctly before in the command prompt, i wasnt typing:

csc /r:System.DLL /r:System.Windows.Forms.DLL /r:System.Drawing.DLL /r:GTA.DLL VisibleArmour.cs


now i get error CS0006, i dont think i was supposed to put DLL after GTA...

ok 2nd time i put /r:ScripthookDotNet.DLL and i got error CS2001, it couldnt find the location, where is this default path it is looking? Gonna go put it in the same location as the other .DLL i guess.

edit: i needed to place scripthookdotnet.dll in the same directory as the input visiblearmour.cs file

jitsuin
  • jitsuin

    Meat Popsicle

  • BUSTED!
  • Joined: 06 Dec 2011

#21

Posted 08 December 2011 - 09:30 AM Edited by jitsuin, 08 December 2011 - 09:36 AM.

I DID IT...10 freakin hours later!!! Now im gonna go shoot myself...lol

Not only did I manage to compile but now my guy is wearing armor!!!!!!! Thank you so much AA!!! And it works flawlessly using your code Angy Amoeba smile.gif

AngryAmoeba
  • AngryAmoeba

    Symbiote

  • Members
  • Joined: 12 Jan 2009

#22

Posted 08 December 2011 - 10:22 AM

Nice. cool.gif icon14.gif

TeJo.Hr
  • TeJo.Hr

    Player Hater

  • Members
  • Joined: 02 Nov 2003

#23

Posted 12 December 2011 - 11:33 PM

Awesome job, my most missed script is working now! colgate.gif

EmperorMustapha
  • EmperorMustapha

    Player Hater

  • BUSTED!
  • Joined: 29 Oct 2012

#24

Posted 30 October 2012 - 06:18 AM

this f*ckin noob!! jitsuin you are a f*cking retard!!!!!!!!!!!!!!!!!!!!!!!!!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users