23.05.2015, 03:32
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
to
Step 3: Change this line from the bandana command from
to
I don't know if you use that value anywhere else but there you go.
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);
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);
pawn Код:
gangcolor = strval(FamilyInfo[PlayerInfo[playerid][pGang]][FamilyBandana]);
pawn Код:
gangcolor = FamilyInfo[PlayerInfo[playerid][pGang]][FamilyBandana];