Log in to reply
 

Need help with a script!



  • So it's the third day since I'm trying and I just can't get this right... All I want is to have this function in my script.
    You get 3 locations on the map which I have the coords for, also make the have blips on the map with the following properties: blip.set_Sprite((BlipSprite) 61);
    blip.set_Color((BlipColor) 69);
    blip.set_IsShortRange(true);
    blip.set_Name("Hospital"));
    Now when you are in 2 meters range I want to be able to do user input key. The key should be E. The functions when the key is pressed I know how to make myself.


  • MODERATOR

    @Eyon

    Vector3 coord1 = new Vector3(insert the XYZ for your first coord here);
    if (World.GetDistance(Game.Player.Character.Position, coord1) <= 2f) //must be on tick
    {
    DisplayHelpTextThisFrame("Press ~INPUT_CONTEXT~");
    }
    
    DisplayHelpTextThisFrame method is just this:
    void DisplayHelpTextThisFrame(string text)
    {
       Function.Call(Hash._SET_TEXT_COMPONENT_FORMAT, "STRING");
       Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, text);
       Function.Call(Hash._0x238FFE5C7B0498A6, 0, 0, 1, -1);
    }
    


  • @stillhere Omg thank you!


Log in to reply
 

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