Quantcast

Jump to content

» «
Photo

Need help coding scripts in c#

3 replies to this topic
shakedlevy
  • shakedlevy

    Player Hater

  • New Members
  • Joined: 20 Aug 2014
  • Israel

#1

Posted 20 August 2014 - 03:19 PM Edited by shakedlevy, 20 August 2014 - 03:20 PM.

Helo i want to make  a Script for GTA IV using c# (Mincrosoft visual studio) and i have a few questions

1. what is the code for the money and the wanted level ?

2. How i make a menu open in click event and have option inside

 

Thanks  a lot :lol:


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

  • Members
  • Joined: 24 Aug 2013
  • United-States

#2

Posted 20 August 2014 - 03:27 PM

Alright, have you done any coding for GTA IV whatsoever? If not, you should look through this webpage for helping you create your first script.

 

There is a thing called IntelliSense in Visual Studio that shows you each property within a class. Maybe you should look within Game.LocalPlayer, then look for things that contain the word 'money' or 'wantedlevel'. 

Example for money.

Example for wanted level.


shakedlevy
  • shakedlevy

    Player Hater

  • New Members
  • Joined: 20 Aug 2014
  • Israel

#3

Posted 20 August 2014 - 03:57 PM

Thank you is help me


LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

  • Members
  • Joined: 24 Aug 2013
  • United-States

#4

Posted 20 August 2014 - 04:00 PM Edited by LetsPlayOrDy, 20 August 2014 - 04:05 PM.

No problem. Just before you post stuff on here, look through the functions SHDN has (using IntelliSense), and if you can't find what you're looking for, look through the natives, which you can call by using the GTA.Native.Function.Call function.

 

Oh and with the menu thing, use KeyDown and PerFrameDrawing for that.

Example:

bool menuOn = false;

public class MenuTest()
{
  KeyDown += MenuTest_KeyDown;
  PerFrameDrawing += MenuTest_PerFrameDrawing;
}

public void MenuTest_KeyDown(object sender, GTA.KeyEventArgs e)
{
  if (e.Key == Keys.M)
  {
    menuOn = !menuOn;
  }
}

public void MenuTest_PerFrameDrawing(object sender, GraphicsEventArgs e)
{
  if (menuOn)
  {
    e.Graphics.DrawText(...);
  }
}




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users