Log in to reply
 

[HELP] HOW TO CREATE A BLIP ON MAP WITH A CIRCLE IN WORLD, SO PLAYER CAN INTERACT?



  • I want to make some simple missions C# script, but i cant seem to find how to create a circle in world, i know that to create a blip you just need "World.CreateBlip(World.GetWaypointPosition());" but how can we actualy add a yellow or red circle in the world so the player can step on it?



  • Use World.DrawMarker and World.GetDistance. You need to call it in a loop to draw each fame.
    Vector3 position = new Vector3(0.0f, 0.0f, 0.0f);
    World.DrawMarker(MarkerType.VerticalCylinder, position, new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 0.0f, 0.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.Yellow);
    if (World.GetDistance(Game.Player.Character.Position, position) < 1.0f)
    {
    // do somthing here
    }


  • Banned

    @preto89 ^^^^^^^^^^^



  • yes thanks you , but how do you assgn variable to the "World.DrawMarker(MarkerType.VerticalCylinder, position, new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 0.0f, 0.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.Yellow);" like "Marker marker = world.drawmarker();" ?????



  • @aimless said in [HELP] HOW TO CREATE A BLIP ON MAP WITH A CIRCLE IN WORLD, SO PLAYER CAN INTERACT?:

    if (World.GetDistance(Game.Player.Character.Position, position) < 1.0f)
    {
    // do somthing here
    }

    that world get distance is supposed to be for interaction but doesnt seem to work , i tried sending some notification but nothing happends when im over the ring



  • @preto89 Markers dont have handles so they dont return anything. They just get drawn every frame you call them. Just put it inside a if statement with bool to turn on and off. You can also use checkpoints that do return a int handle. But they are limited to what you can do with them. Try UI.Notify("you reched the checkpoint" +Game.GameTime.ToString());


Log in to reply
 

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