Jump to content

Creating blips for Entities and Vector3 programmatically


Commander2706
 Share

Recommended Posts

Hi dear fellow modders!

Has anyone found out yet, how to create a blip for an entity or on a Vector3 (RagePluginHook)?

I found the hashes for the sprites in the ScriptHookRDRDotNet_API:

public enum BlipSprite : uint
	{
		Dominoes = 0x9D9FE583,
		DominoesAllFives = 0xFD189BDE,
		DominosAllThrees = 0xA1C2EBE4,
		FiveFingerFillet = 0x75B54B90,
		FiveFingerFilletGuts = 0x7869CF4,
		FiveFingerFilletBurnout = 0x3C88E424,
		Poker = 0x4A2357A9,
		SaddleBag = 0xB0E5E617,
		Doctor = 0x984E7CA9,
		EatingUtensils = 0x37BEBE4E,
		DonateToCamp = 0x8B7E38C4,
		ObjectiveChore = 0xDDFBA6AB,
		Ammunition = 0x5DF6DEBD,
		HealthSupplies = 0xD68D851B,
		Provisions = 0x919BC110,
		SmallBlackDot = 0x4ECB0761,
		Wheel = 0x3C5469D5,
		Stranger = 0x935EE440,
		Drinking = 0x4A0E7F51,
		HuntingGrounds = 0x1DCFAA8C,
		Fishing = 0xA216510E,
		MoneyWheel = 0xD4859AFE,
		Bank = 0x25249A47,
		Herd = 0x193BD50E,
		CaravanCamp = 0xA0417C98,
		HomeRobbery = 0x1A7A040D
	}

 

In the NativeDB under MAP there is also the native function for setting the Blip's sprite, but I'm not sure how to call it in my project:

 

void SET_BLIP_SPRITE( Blip blip, Hash hash, BOOL p2 )  //0x74F74D3207ED525C

I want to achieve having a permanent blip on a Ped and a temporary Blip on a location, that get's deleted once you're there; mainly like the GPS routes for missions.

 

If anyone knows something and feels like sharing it, I would very much appreciate it 🙂

Edited by Commander2706
Link to comment
Share on other sites

You should be able to create new Blips using the Blip class. It supports an entity or position overload. If you want to change its sprite. you can use the native you already found and use blip.Handle for the first parameter.

  • Thanks 1
Link to comment
Share on other sites

It worked! Thank you very much!

So that's basically the code:

Blip _foreWorkerBlip = new Blip(_foreWorker);
var _handle = _foreWorkerBlip.Handle;
var _nativeHandle = new NativeArgument(_handle);
Game.CallNative("SET_BLIP_SPRITE", _nativeHandle, _blipHash, true);

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...