Quantcast

Jump to content

» «
Photo

Community Script Hook V .NET

V Released
1,194 replies to this topic
Loset
  • Loset

    Player Hater

  • Members
  • Joined: 28 Apr 2015
  • Israel

#61

Posted 29 April 2015 - 12:45 PM Edited by Loset, 29 April 2015 - 12:51 PM.

        Entity test = Game.Player.GetTargetedEntity();
            if (test is Vehicle)
            {
                Vehicle car = test as Vehicle;
                lastcar = car.GetHashCode();
 Vehicle newcar = Function.Call<Vehicle>(Hash.CREATE_VEHICLE, lastcar, Game.Player.Character.Position.X, Game.Player.Character.Position.Y, Game.Player.Character.Position.Z, 0.0,1,1);
            }

 

so I updated the hook from the sdk you made some amazing changes =P

and finally I got things working..  but I wonder how can I use this function .. it doesn't spawn new vehicles?

 

Never mind: just saw you updated world.createvehicle =P


crosire
  • crosire

    Rat

  • Members
  • Joined: 08 Jul 2012

#62

Posted 29 April 2015 - 12:51 PM

GetHashCode doesn't return the model hash, it's a function derivered from System.Object. To get the model hash you can use the GTA.Model class.

 

I suggest updating to the latest commit just pushed a few minutes ago. JohnnyCrazy added support for creating vehicles using the scripting API.

Vehicle newcar = World.CreateVehicle(new Model("some_model_name).Hash, Game.Player.Character.Position);

slik
  • slik

    Player Hater

  • Members
  • Joined: 18 Apr 2015
  • Ukraine

#63

Posted 29 April 2015 - 01:33 PM Edited by slik, 29 April 2015 - 01:37 PM.

 

GetHashCode doesn't return the model hash, it's a function derivered from System.Object. To get the model hash you can use the GTA.Model class.

 

I suggest updating to the latest commit just pushed a few minutes ago. JohnnyCrazy added support for creating vehicles using the scripting API.

Vehicle newcar = World.CreateVehicle(new Model("some_model_name).Hash, Game.Player.Character.Position);

I'd suggest something like this:

Ped newped = World.CreateEntity(new Ped( Ped specific options ), World specific options);
Vehicle newcar = World.CreateEntity(new Vehicle(new Model("some_model_name").Hash), Game.Player.Character.Position);

Loset
  • Loset

    Player Hater

  • Members
  • Joined: 28 Apr 2015
  • Israel

#64

Posted 29 April 2015 - 03:22 PM

can you add 

 

Any NETWORK_GET_PLAYER_INDEX(Ped PedHandle) // 0xBE1C1506


monsterxsync
  • monsterxsync

    Player Hater

  • Members
  • Joined: 28 Apr 2015
  • Australia

#65

Posted 29 April 2015 - 03:53 PM Edited by monsterxsync, 29 April 2015 - 04:43 PM.

This is just awesome... but i have a question how would i go about making a GUI for this in c#?  using GDI+ or something?
and how come i keep getting errors when trying to build this from source?
 

Error 1 error C3845: 'GTA::ScriptSettings::mValues': only static data members can be initialized inside a ref class or value type f:\github\scripthookvdotnet\source\Settings.hpp 36 1 ScriptHookVDotNet

fengyeblade
  • fengyeblade

    Blade Feng Land

  • Members
  • Joined: 01 Feb 2009

#66

Posted 29 April 2015 - 05:02 PM

thx   few years ago  HarezX(meybe)  make the scripthookdotnet. very good.


Loset
  • Loset

    Player Hater

  • Members
  • Joined: 28 Apr 2015
  • Israel

#67

Posted 29 April 2015 - 05:06 PM

                    Player me = new Player(Function.Call<int>(Hash.NETWORK_GET_PLAYER_INDEX, Game.Player.Character.ID));


                    me.WantedLevel = 4;
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL, me.ID, 4, false);
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL_NOW,me.ID, false);
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL, me.ID, 4, 0);
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL_NOW, me.ID, 0);


so after I added the hash.. =/ almost everytime I tried using Hash functions I failed =/


r34ld34l
  • r34ld34l

    PC Gamer

  • Members
  • Joined: 08 Apr 2012
  • Slovenia

#68

Posted 29 April 2015 - 05:16 PM

 

                    Player me = new Player(Function.Call<int>(Hash.NETWORK_GET_PLAYER_INDEX, Game.Player.Character.ID));


                    me.WantedLevel = 4;
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL, me.ID, 4, false);
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL_NOW,me.ID, false);
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL, me.ID, 4, 0);
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL_NOW, me.ID, 0);


so after I added the hash.. =/ almost everytime I tried using Hash functions I failed =/

 

Is that for online?


Loset
  • Loset

    Player Hater

  • Members
  • Joined: 28 Apr 2015
  • Israel

#69

Posted 29 April 2015 - 05:22 PM

 

 

                    Player me = new Player(Function.Call<int>(Hash.NETWORK_GET_PLAYER_INDEX, Game.Player.Character.ID));


                    me.WantedLevel = 4;
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL, me.ID, 4, false);
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL_NOW,me.ID, false);
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL, me.ID, 4, 0);
                    Function.Call(Hash.SET_PLAYER_WANTED_LEVEL_NOW, me.ID, 0);


so after I added the hash.. =/ almost everytime I tried using Hash functions I failed =/

 

Is that for online?

 

kinda


xsploit
  • xsploit

    Crackhead

  • Members
  • Joined: 24 Apr 2015
  • Canada

#70

Posted 29 April 2015 - 05:42 PM

I'm just wondering if I can change all the models with world.set_player_model or something like that?

Reck1501
  • Reck1501

    Crackhead

  • Members
  • Joined: 25 Dec 2013

#71

Posted 29 April 2015 - 06:11 PM

I can't get this to load. I've tried downloading the pre-compiled version, and compiling it myself, neither of them works (doesn't load, and no error log)


TheVideoVolcano
  • TheVideoVolcano

    *bleep*

  • Members
  • Joined: 05 May 2014
  • United-Kingdom

#72

Posted 29 April 2015 - 07:38 PM

I can't get this to load. I've tried downloading the pre-compiled version, and compiling it myself, neither of them works (doesn't load, and no error log)

 

Please give us your ScriptHookDotNet.log


Reck1501
  • Reck1501

    Crackhead

  • Members
  • Joined: 25 Dec 2013

#73

Posted 29 April 2015 - 07:51 PM

 

I can't get this to load. I've tried downloading the pre-compiled version, and compiling it myself, neither of them works (doesn't load, and no error log)

 

Please give us your ScriptHookDotNet.log

 

As I said, there's no log. However, I tried reinstalling GTA V, and that seems to have fixed it


Raxdiam
  • Raxdiam

    Player Hater

  • Members
  • Joined: 18 Apr 2015
  • United-States

#74

Posted 29 April 2015 - 07:53 PM

Any examples of drawing text on-screen?


crosire
  • crosire

    Rat

  • Members
  • Joined: 08 Jul 2012

#75

Posted 29 April 2015 - 08:00 PM

 

As I said, there's no log. However, I tried reinstalling GTA V, and that seems to have fixed it

 

But you installed an ASI loader + Script Hook V, right? What does the asiloader.log file say?


TheVideoVolcano
  • TheVideoVolcano

    *bleep*

  • Members
  • Joined: 05 May 2014
  • United-Kingdom

#76

Posted 29 April 2015 - 08:07 PM

Any examples of drawing text on-screen?

 

*exhale* Well.... No apparent single native function that simply displays text, but this is how it is done in the scripts and alexander blades trainer.

 

Wish we had litteral_strings_now :@

 

SET_TEXT_FONT(0);
SET_TEXT_SCALE(0.55, 0.55);
SET_TEXT_COLOUR(255, 255, 255, 255);
SET_TEXT_WRAP(0.0, 1.0);
SET_TEXT_CENTRE(1);
SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0);
SET_TEXT_EDGE(1, 0, 0, 0, 205);
if (statusTextGxtEntry)
{
_SET_TEXT_ENTRY((char *)statusText.c_str());
} else
{
_SET_TEXT_ENTRY("STRING");
_ADD_TEXT_COMPONENT_STRING((char *)statusText.c_str());
}
UI::_DRAW_TEXT(0.5, 0.5);

 

Any examples of drawing text on-screen?

 

*exhale* Well.... No apparent single native function that simply displays text, but this is how it is done in the scripts and alexander blades trainer.

 

Wish we had litteral_strings_now :@

 

SET_TEXT_FONT(0);
SET_TEXT_SCALE(0.55, 0.55);
SET_TEXT_COLOUR(255, 255, 255, 255);
SET_TEXT_WRAP(0.0, 1.0);
SET_TEXT_CENTRE(1);
SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0);
SET_TEXT_EDGE(1, 0, 0, 0, 205);
if (statusTextGxtEntry)
{
_SET_TEXT_ENTRY((char *)statusText.c_str());
} else
{
_SET_TEXT_ENTRY("STRING");
_ADD_TEXT_COMPONENT_STRING((char *)statusText.c_str());
}
UI::_DRAW_TEXT(0.5, 0.5);

 

 

I'm just not sure how to display the actual text as I see no function like draw_text


Also, Crosire, If you leave gta v for a while and come back the insert key reload script functionality is lost. say if you are writting a fair bit of code


Raxdiam
  • Raxdiam

    Player Hater

  • Members
  • Joined: 18 Apr 2015
  • United-States

#77

Posted 29 April 2015 - 08:09 PM Edited by Raxdiam, 29 April 2015 - 08:26 PM.

 

Any examples of drawing text on-screen?

 

*exhale* Well.... No apparent single native function that simply displays text, but this is how it is done in the scripts and alexander blades trainer.

 

Wish we had litteral_strings_now :@

 

SET_TEXT_FONT(0);
SET_TEXT_SCALE(0.55, 0.55);
SET_TEXT_COLOUR(255, 255, 255, 255);
SET_TEXT_WRAP(0.0, 1.0);
SET_TEXT_CENTRE(1);
SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0);
SET_TEXT_EDGE(1, 0, 0, 0, 205);
if (statusTextGxtEntry)
{
_SET_TEXT_ENTRY((char *)statusText.c_str());
} else
{
_SET_TEXT_ENTRY("STRING");
_ADD_TEXT_COMPONENT_STRING((char *)statusText.c_str());
}
UI::_DRAW_TEXT(0.5, 0.5);

 

I'm aware of how it's done in Alexander Blade's native trainer, but my attempt to adapt it to C# did not work, and I'm out of ideas, which is my reason for asking here.


crosire
  • crosire

    Rat

  • Members
  • Joined: 08 Jul 2012

#78

Posted 29 April 2015 - 08:42 PM Edited by Crosire, 29 April 2015 - 08:44 PM.

Directly translates to the following C# code (until there is a proper wrapper for UI drawing in the scripting API):

using GTA.Native;

string statusText = "Status";
bool statusTextGxtEntry = false;

Function.Call(Hash.SET_TEXT_FONT, 0);
Function.Call(Hash.SET_TEXT_SCALE, 0.55f, 0.55f);
Function.Call(Hash.SET_TEXT_COLOUR, 255, 255, 255, 255);
Function.Call(Hash.SET_TEXT_WRAP, 0.0f, 1.0f);
Function.Call(Hash.SET_TEXT_CENTRE, 1);
Function.Call(Hash.SET_TEXT_DROPSHADOW, 0, 0, 0, 0, 0);
Function.Call(Hash.SET_TEXT_EDGE, 1, 0, 0, 0, 205);
if (statusTextGxtEntry)
{
Function.Call(Hash._SET_TEXT_ENTRY, statusText);
}
else
{
Function.Call(Hash._SET_TEXT_ENTRY, "STRING");
Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, statusText);
}
Function.Call(Hash._DRAW_TEXT, 0.5f, 0.5f);

 

Also, Crosire, If you leave gta v for a while and come back the insert key reload script functionality is lost. say if you are writting a fair bit of code

 

 

Yeah, it currently seems to crash after being inactive for a while.

 

 

--------

 

 

Just uploaded a new binary (v0.3.0) build from the latest commit on Github. It includes a lot of additions to the scripting API and a few fixes: now lets you create peds, vehicles, etc.

 

Thanks to everybody who was involved =).


timnboys
  • timnboys

    Player Hater

  • Members
  • Joined: 23 Apr 2015
  • United-States

#79

Posted 29 April 2015 - 09:17 PM

I am going to just ask if anyone would throw me a tip on how to change the player's model? as I need to change their model to one of the cop models.


crosire
  • crosire

    Rat

  • Members
  • Joined: 08 Jul 2012

#80

Posted 29 April 2015 - 09:32 PM Edited by Crosire, 29 April 2015 - 09:33 PM.

I am going to just ask if anyone would throw me a tip on how to change the player's model? as I need to change their model to one of the cop models.

Not part of the scripting API yet, but try something like this manually (requires version 0.3.0):

GTA.Model copmodel = "s_m_y_cop_01";
copmodel.Request(1000);
GTA.Native.Function.Call(GTA.Native.Hash.SET_PLAYER_MODEL, Game.Player, copmodel.Hash);

This attempts to load the cop model into memory (1 second timeout) and then sets that model as player model.


TheVideoVolcano
  • TheVideoVolcano

    *bleep*

  • Members
  • Joined: 05 May 2014
  • United-Kingdom

#81

Posted 30 April 2015 - 12:31 AM Edited by TheVideoVolcano, 30 April 2015 - 12:31 AM.

Directly translates to the following C# code (until there is a proper wrapper for UI drawing in the scripting API):

using GTA.Native;

string statusText = "Status";
bool statusTextGxtEntry = false;

Function.Call(Hash.SET_TEXT_FONT, 0);
Function.Call(Hash.SET_TEXT_SCALE, 0.55f, 0.55f);
Function.Call(Hash.SET_TEXT_COLOUR, 255, 255, 255, 255);
Function.Call(Hash.SET_TEXT_WRAP, 0.0f, 1.0f);
Function.Call(Hash.SET_TEXT_CENTRE, 1);
Function.Call(Hash.SET_TEXT_DROPSHADOW, 0, 0, 0, 0, 0);
Function.Call(Hash.SET_TEXT_EDGE, 1, 0, 0, 0, 205);
if (statusTextGxtEntry)
{
Function.Call(Hash._SET_TEXT_ENTRY, statusText);
}
else
{
Function.Call(Hash._SET_TEXT_ENTRY, "STRING");
Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, statusText);
}
Function.Call(Hash._DRAW_TEXT, 0.5f, 0.5f);

 

Also, Crosire, If you leave gta v for a while and come back the insert key reload script functionality is lost. say if you are writting a fair bit of code

 

 

Yeah, it currently seems to crash after being inactive for a while.

 

 

--------

 

 

Just uploaded a new binary (v0.3.0) build from the latest commit on Github. It includes a lot of additions to the scripting API and a few fixes: now lets you create peds, vehicles, etc.

 

Thanks to everybody who was involved =).

 

Hmmm... this is very useful. It actually works, (when rewritten for vb.net)

 

Private Sub msg(ByVal msg As String, ByVal duration As Int16, Optional ByVal isGxtEntry As Boolean = False)

        Dim statusText As String = msg
        Dim statusTextGxtEntry As Boolean = isGxtEntry
       
        Native.Function.Call(Native.Hash.SET_TEXT_FONT, 0)
        Native.Function.Call(Native.Hash.SET_TEXT_SCALE, 0.55F, 0.55F)
        Native.Function.Call(Native.Hash.SET_TEXT_COLOUR, 255, 255, 255, 255)
        Native.Function.Call(Native.Hash.SET_TEXT_WRAP, 0.0F, 1.0F)
        Native.Function.Call(Native.Hash.SET_TEXT_CENTRE, 1)
        Native.Function.Call(Native.Hash.SET_TEXT_DROPSHADOW, 0, 0, 0, 0, 0)
        Native.Function.Call(Native.Hash.SET_TEXT_EDGE, 1, 0, 0, 0, 205)

        If (statusTextGxtEntry) Then

            Native.Function.Call(Native.Hash._SET_TEXT_ENTRY, statusText)

        Else

            Native.Function.Call(Native.Hash._SET_TEXT_ENTRY, "STRING")
            Native.Function.Call(Native.Hash._ADD_TEXT_COMPONENT_STRING, statusText)
            Native.Function.Call(Native.Hash._DRAW_TEXT, 0.5F, 0.5F)
          
        End If
    End Sub

This function only print on screen for about 50ms, How exactly do I do get it do stay on screen for a certain duration? Alexander use a function called 'GetTickCount()' but I don't understand when he defined that function in his trainer as it has (or seems) to have no origin.

 

He uses...

 

if GetTickCount() < maxTickCount

and getTickCount() + waitTime;


unknown modder
  • unknown modder

    Bon Jon Bovi

  • Members
  • Joined: 04 Jul 2012
  • United-Kingdom

#82

Posted 30 April 2015 - 12:41 AM

Hmmm... this is very useful. It actually works, (when rewritten for vb.net)

 

Private Sub msg(ByVal msg As String, ByVal duration As Int16, Optional ByVal isGxtEntry As Boolean = False)

        Dim statusText As String = msg
        Dim statusTextGxtEntry As Boolean = isGxtEntry
       
        Native.Function.Call(Native.Hash.SET_TEXT_FONT, 0)
        Native.Function.Call(Native.Hash.SET_TEXT_SCALE, 0.55F, 0.55F)
        Native.Function.Call(Native.Hash.SET_TEXT_COLOUR, 255, 255, 255, 255)
        Native.Function.Call(Native.Hash.SET_TEXT_WRAP, 0.0F, 1.0F)
        Native.Function.Call(Native.Hash.SET_TEXT_CENTRE, 1)
        Native.Function.Call(Native.Hash.SET_TEXT_DROPSHADOW, 0, 0, 0, 0, 0)
        Native.Function.Call(Native.Hash.SET_TEXT_EDGE, 1, 0, 0, 0, 205)

        If (statusTextGxtEntry) Then

            Native.Function.Call(Native.Hash._SET_TEXT_ENTRY, statusText)

        Else

            Native.Function.Call(Native.Hash._SET_TEXT_ENTRY, "STRING")
            Native.Function.Call(Native.Hash._ADD_TEXT_COMPONENT_STRING, statusText)
            Native.Function.Call(Native.Hash._DRAW_TEXT, 0.5F, 0.5F)
          
        End If
    End Sub

This function only print on screen for about 50ms, How exactly do I do get it do stay on screen for a certain duration? Alexander use a function called 'GetTickCount()' but I don't understand when he defined that function in his trainer as it has (or seems) to have no origin.

 

He uses...

 

if GetTickCount() < maxTickCount

and getTickCount() + waitTime;

 

Draw_text functions need to be called each game time, if you want a message to stay there, perhaps consider using print instead

this code will need a slight bit of tweaking for you but the natives and what to call them with are still there

	void UI::Print(char *Text, int time)
	{
		Natives::_0xB87A37EEB7FAA67D((char *)"STRING");
		Natives::_ADD_TEXT_COMPONENT_STRING(Text);
		Natives::_0x9D77056A530643F6(time, 1);
	}

timnboys
  • timnboys

    Player Hater

  • Members
  • Joined: 23 Apr 2015
  • United-States

#83

Posted 30 April 2015 - 12:52 AM Edited by timnboys, 30 April 2015 - 01:49 AM.

 

I am going to just ask if anyone would throw me a tip on how to change the player's model? as I need to change their model to one of the cop models.

Not part of the scripting API yet, but try something like this manually (requires version 0.3.0):

GTA.Model copmodel = "s_m_y_cop_01";
copmodel.Request(1000);
GTA.Native.Function.Call(GTA.Native.Hash.SET_PLAYER_MODEL, Game.Player, copmodel.Hash);

This attempts to load the cop model into memory (1 second timeout) and then sets that model as player model.

Okay it appears I forgot to replace ScriptHookDotNet.asi for the 0.3.0 version which for anyone else having this issue of methodnotfound error you have to replace your .asi too for each version. 


Raxdiam
  • Raxdiam

    Player Hater

  • Members
  • Joined: 18 Apr 2015
  • United-States

#84

Posted 30 April 2015 - 01:09 AM

Draw_text functions need to be called each game time, if you want a message to stay there, perhaps consider using print instead
this code will need a slight bit of tweaking for you but the natives and what to call them with are still there

	void UI::Print(char *Text, int time)
	{
		Natives::_0xB87A37EEB7FAA67D((char *)"STRING");
		Natives::_ADD_TEXT_COMPONENT_STRING(Text);
		Natives::_0x9D77056A530643F6(time, 1);
	}

Translated to C#:

void Print(string text, int time = 2500)
{
    GTA.Native.Function.Call(Hash._0xB87A37EEB7FAA67D, "STRING");
    GTA.Native.Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, text);
    GTA.Native.Function.Call(Hash._0x9D77056A530643F6, time, 1);
}

 
Translated to VB:

Private Sub SetStatusText(text As String, Optional time As Integer = 2500)
    GTA.Native.Function.Call(Hash._0xB87A37EEB7FAA67D, "STRING")
    GTA.Native.Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, text)
    GTA.Native.Function.Call(Hash._0x9D77056A530643F6, time, 1)
End Sub

This seems to work for me. Thank you unknown modder.

  • TheVideoVolcano likes this

unknown modder
  • unknown modder

    Bon Jon Bovi

  • Members
  • Joined: 04 Jul 2012
  • United-Kingdom

#85

Posted 30 April 2015 - 01:26 AM

I dont know why you have added vector2 as a native return type, there isnt a single native in the game that returns 2 items.


TheVideoVolcano
  • TheVideoVolcano

    *bleep*

  • Members
  • Joined: 05 May 2014
  • United-Kingdom

#86

Posted 30 April 2015 - 02:05 AM

 

Draw_text functions need to be called each game time, if you want a message to stay there, perhaps consider using print instead
this code will need a slight bit of tweaking for you but the natives and what to call them with are still there

	void UI::Print(char *Text, int time)
	{
		Natives::_0xB87A37EEB7FAA67D((char *)"STRING");
		Natives::_ADD_TEXT_COMPONENT_STRING(Text);
		Natives::_0x9D77056A530643F6(time, 1);
	}

Translated to C#:

void Print(string text, int time = 2500)
{
    GTA.Native.Function.Call(Hash._0xB87A37EEB7FAA67D, "STRING");
    GTA.Native.Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, text);
    GTA.Native.Function.Call(Hash._0x9D77056A530643F6, time, 1);
}

 
Translated to VB:

Private Sub SetStatusText(text As String, Optional time As Integer = 2500)
    GTA.Native.Function.Call(Hash._0xB87A37EEB7FAA67D, "STRING")
    GTA.Native.Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, text)
    GTA.Native.Function.Call(Hash._0x9D77056A530643F6, time, 1)
End Sub

This seems to work for me. Thank you unknown modder.

 

 

Where do the hash.0x9D77056A530643F6 and hash._0xB87A37EEB7FAA67D come from?

 

They aren't in the native db or scocl scripts


monsterxsync
  • monsterxsync

    Player Hater

  • Members
  • Joined: 28 Apr 2015
  • Australia

#87

Posted 30 April 2015 - 03:41 AM

 


Where do the hash.0x9D77056A530643F6 and hash._0xB87A37EEB7FAA67D come from?
They aren't in the native db or scocl scripts
would also like to know this :) cant find em anywhere

 

 


Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#88

Posted 30 April 2015 - 05:55 AM

Guys when I use a native function,the log says "the type or namespace name "Hash" does not exist in the name space 'GTA.Native'(are you missing an assembly reference?)

In vs it gives no errors :/

Please help

crosire
  • crosire

    Rat

  • Members
  • Joined: 08 Jul 2012

#89

Posted 30 April 2015 - 06:02 AM

Guys when I use a native function,the log says "the type or namespace name "Hash" does not exist in the name space 'GTA.Native'(are you missing an assembly reference?)

In vs it gives no errors :/

Please help

Make sure you use the latest ASI (0.2.0 or higher).

 

I dont know why you have added vector2 as a native return type, there isnt a single native in the game that returns 2 items.

Just in case you use a native returning a Vector3, but you don't care for the Z component.

 

 

This function only print on screen for about 50ms, How exactly do I do get it do stay on screen for a certain duration? Alexander use a function called 'GetTickCount()' but I don't understand when he defined that function in his trainer as it has (or seems) to have no origin.

 

He uses...

 

if GetTickCount() < maxTickCount

and getTickCount() + waitTime;

 

As unknown modders said, it has to run every frame. To achieve that set the script "Interval" property to zero.


Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#90

Posted 30 April 2015 - 06:24 AM

oh okay :p thanks i forgot that  :D thanks for help.





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users