Log in to reply
 

Visual Studion some help please



  • I want to know if visual studion can open existing script
    can I open Superman script for exemple , to look what is inside ?

    I just want to know how its build and i would like to use the laser eyes, for my self.


  • MODERATOR

    @Necroxide You cannot view the code of compiled scripts in VS. You would have to use a decompiler to get the source code.



  • @Jitnaught Hex editing would probably work... but that's usually dangerous.


  • MODERATOR

    @krashadam Hex editing would work for editing simple things, but to view the source code it's not a good option.



  • dotPeek is a .NET decompiler which can decompile code back to semi-recognizable code. It's a good idea to use a decimal->hex converter to get back the natives they call.

    For .asi scripts and obfuscated .NET scripts you're gonna have to do some more work but maybe other people know what's to be done.


  • MODERATOR

    @ikt I would recommend dnSpy. It's basically ILSpy (good source code decompiler) + dotPeek (good UI, debugging, decompile to project, etc). It's also made so it can handle obfuscated assemblies (better). And it's open-source :D

    To get the natives scripts call just make sure ScriptHookVDotNet.dll is in the same folder as the script you're decompiling. dnSpy will automatically get the native names from there.



  • @JitnaughtThanx
    it helped a lot i'm new to this ,
    it worked but there is a specification that visual studio see the 29AAA / B8AAA type of names as errors,do you know what that is ? or its a mistake in the transformation of the files ?

    using GTA;
    using System;
    using System.Collections.Generic;
    using System.Windows.Forms;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System.IO;
    using System.Drawing;
    using GTA.Math;
    using GTA.Native;

    namespace CyclopsMOD
    {
    public class CyclopsMOD : Script­
    {

    public CyclopsMOD()
    {
        Tick += Ontick;
        KeyDown += OnKeyDown;
        KeyUp += OnkeyUp;
    
        Interval = 8;
    }
    void Ontick(object sender, EventArgs e)
    {
    }
    
    void OnKeyDown(object sender, KeyEventArgs e)
    {
    }
    
    void OnkeyUp(object sender, KeyEventArgs e)
    {
    
        if (e.KeyCode == Keys.I)
        {
            this.29AAA = World.CreateProp(this.09AAA.Model, THelper.getCreationPos(15.0, 15.0), false, false);
                Script.Wait(0);
            
            flag = !THelper.Exists(this.29AAA);
            if (!flag)
            
            {
                this.29AAA = CyclopsMOD.C30A1[0];
                CyclopsMOD.C30A1.RemoveAt(0);
            }
            else
            {
    
                this.29AAA.IsVisible = false;
                this.29AAA.AttachTo(Game.Player.Character,110A1, 0, Game.Player.Character, 110A1.GetOffsetFromWorldCoords(this,88AAA), Vector3.Zero);
                Vector3 vector = THelper.directionToRotation(Vector3.Normalize(this,09AAA.GetOffsetInWorldCoords(Vector3.RelativeRight) - this,09AAA.GetOffsetInWorldCoords(Vector3.Zero)), 0.0);
                Vector3 vector2;
                vector2.ctor(-2.8f, 0f, 3f);
                Vector3 rot = vector + vector2;
                this.98AA1 = THelper.RotationToDirection(rot);
                Cyclops.B30AA.Add(this);
                double size = 0.08;
                this.B8AAA.Add(THelper.ptfx_startOnEntity(this,29AAA, "proj_laser_player", "core", Vector3.Zero, Vector3.Zero, size, 1.0));
                THelper.ptfx_setColor(this.B8AAA[this.B8AAA.Count - 1], 0.0, 255.0, 0.0);
                this.B8AAA.Add(THelper.ptfx_startOnEntity(this,29AAA, "scr_trev2_flare_L", "scr_trevor2", Vector3.Zero, Vector3.Zero, 0.25, 1.0));
                THelper.ptfx_setColor(this.B8AAA[this.B8AAA.Count - 1], 0.0, 255.0, 0.0);
                this.B8AAA.Add(THelper.ptfx_startOnEntity(this,29AAA, "scr_trev2_flare_L", "scr_trevor2", Vector3.Zero, Vector3.Zero, size, 1.0));
                THelper.ptfx_setColor(this.B8AAA[this.B8AAA.Count - 1], 0.0, 255.0, 0.0);
                this.C8AA1 = DateAndTime.Now;
    
    • its just a copy of the super man script past in my script creation ... im trying to find the ''animation'' light effect and stuff and the 'impacte' affect on ped ect..

  • MODERATOR

    You must be missing a variable.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.