Go Back   GTAGaming Forums > Grand Theft Auto Mods > Grand Theft Auto IV Mods
Register FAQ Members List Calendar Mark Forums Read

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 05-29-2013   #1
Registered User
Join Date: May 2013
Posts: 13
WaffleHouseTits is an unknown quantity at this point
Scripthook C++ Custom Blip Colours

I have been beating my head against the wall with this one for hours now, perhaps I am just fried. If someone could enlighten me, I would be most grateful.

I am trying to determine the network players assigned colour (seems like ID 0 is ALWAYS orange), and assign a custom blip to that player. I can get blips just fine, however, not the proper colour. The orange player ends up pink or something. Anyways, I figure you'll want a code sample so here is my function.

void SpeedoThread::AddBlipsToPlayers(Scripting::Ped &ped, b8 ForAll)
	Blip plyr;
	ColourIndex poo;

	u32 netplayerindex;
	Ped loopped;

	if (ForAll) {
		for (u32 n=0; n<=31; n++) {	
			netplayerindex = ConvertIntToPlayerIndex(n);
			if ((strcmp(GetPlayerName(netplayerindex ), InvalidName)) && (!HasNetworkPlayerLeftGame(netplayerindex)) 
				&& IsPlayerPlaying(netplayerindex) && IsNetworkPlayerActive(netplayerindex) && netplayerindex != GetPlayer()) {	 
				GetPlayerChar(netplayerindex , &loopped);
				SetBlipAsFriendly(plyr, true);
				ChangeBlipNameFromAscii(plyr, GetPlayerName(netplayerindex));
				ChangeBlipScale(plyr, .6);

				//ChangeBlipColour(plyr, n);
				ChangeBlipColour(plyr, GetPlayerColour(netplayerindex));

				AddBlipForChar(loopped, &plyr);

	} else {
		AddBlipForChar(ped, &plyr);
WaffleHouseTits is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 02:07 PM.