[Script Help] Help Me
#3

You should convert it to hex instead of strings, right now you would need to use numbers. For example try it with 4278255615, that should give your gang a magenta color.

Step 1: Change the enum var of FamilyBandana to integer (simply remove the string brackets).
Step 2: Change the lines below in the set command from
pawn Код:
new string[128], family, color[32];
        if(sscanf(params, "is", family, color))

..

        format(FamilyInfo[family][FamilyBandana], sizeof(color), color);

..

        format(string, sizeof(string), "AdmCmd: %s has set gang ID %d's bandana to '%s'.", GetPlayerNameEx(playerid), family, color);
to
pawn Код:
new string[128], family, color;
        if(sscanf(params, "ix", family, color))

..

        FamilyInfo[family][FamilyBandana] = color;

..

        format(string, sizeof(string), "AdmCmd: %s has set gang ID %d's bandana to '%x'.", GetPlayerNameEx(playerid), family, color);
Step 3: Change this line from the bandana command from
pawn Код:
gangcolor = strval(FamilyInfo[PlayerInfo[playerid][pGang]][FamilyBandana]);
to
pawn Код:
gangcolor = FamilyInfo[PlayerInfo[playerid][pGang]][FamilyBandana];
I don't know if you use that value anywhere else but there you go.
Reply


Messages In This Thread
[Script Help] Help Me - by Jekrz - 23.05.2015, 02:50
Re: [Script Help] Help Me - by Jekrz - 23.05.2015, 03:07
Re: [Script Help] Help Me - by Crayder - 23.05.2015, 03:32
Re: [Script Help] Help Me - by Jekrz - 23.05.2015, 03:43
Re: [Script Help] Help Me - by TaiRinsuru - 16.05.2016, 07:48

Forum Jump:


Users browsing this thread: 2 Guest(s)