GTAGaming Forums

GTAGaming Forums (
-   Grand Theft Auto IV Mods (
-   -   Scripthook C++ Custom Blip Colours (

WaffleHouseTits 05-29-2013 01:48 AM

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 06-01-2013 02:26 AM


All times are GMT -6. The time now is 04:07 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2015, vBulletin Solutions, Inc.