Sorry about the topic, just wanted to keep it consistent with how uploaded mods are described by their creators.
Actually this is a simplified and improved location script because it's much simpler than the original one I posted not too long ago and it also provides the street name. The location can be displayed on foot or in vehicle. I have a key binding but this can be changed to ontick or have a checkbox in a menu if you want to adapt the script. Similarly the text displayed can be easily modified. Just dump the script in a file and call it something like DisplayLocation.3.cs or compile it yourself.
Requirements: you need to know where a script goes (scripts folder) and have SHVDN3 installed etc. The usual shit.
For best quality watch Video on youtube at the highest resolution your rig can support. Don't worry you won't be asked to subscribe, like, or ring an bells. F*** YouTube.
using GTA;
using GTA.Native;
using System;
using System.Windows.Forms;
using GTA.Math;
namespace Basics
{
public class Basics : Script
{
// Give street name
public Basics()
{
Tick += Basics_Tick;
KeyDown += Basics_KeyDown;
}
private void Basics_Tick(object sender, EventArgs e)
{ }
private void Basics_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F5)
{
Ped pp = Game.Player.Character;
int streetHash, crossStreetHash;
unsafe
{
Function.Call(Hash.GET_STREET_NAME_AT_COORD, pp.Position.X, pp.Position.Y, pp.Position.Z, &streetHash, &crossStreetHash);
Function.Call<string>(Hash.GET_NAME_OF_ZONE, pp.Position.X, pp.Position.Y, pp.Position.Z);
}
string StreetName = Function.Call<string>(Hash.GET_STREET_NAME_FROM_HASH_KEY, streetHash);
string CrossStreetName = Function.Call<string>(Hash.GET_STREET_NAME_FROM_HASH_KEY, crossStreetHash);
string ZoneName = Function.Call<string>(Hash.GET_NAME_OF_ZONE, pp.Position.X, pp.Position.Y, pp.Position.Z);
string ZoneDisplay = Game.GetLocalizedString(ZoneName);
// GTA.UI.Screen.ShowSubtitle(StreetName + " at " + CrossStreetName + "\n" + " Zone: "+ ZoneName + " Area: " + ZoneDisplay, 3500);
GTA.UI.Screen.ShowSubtitle("You are at ~g~"+ StreetName + "~w~ and " + CrossStreetName + "\n Area of " + ZoneDisplay, 3500);
}
}
}
}