20.12.2013, 14:43
Hi, I've got a strange bug.
I want to use a string which can be edited dynamic to color the family's name in /families:
When I used that ^ command if would show the embedding works:
![](http://i43.tinypic.com/2mo1ptw.png)
But it isn't working on the /families:
SS:![](http://i41.tinypic.com/nvt6ci.png)
I hope one of you guys know what I am doing wrong or something.
Thanks in advance!
Remco.
I want to use a string which can be edited dynamic to color the family's name in /families:
PHP код:
CMD:fcolor(playerid, params[])
{
new family, colorcode[25], string2[26];
if(sscanf(params, "is[25]", family, colorcode))
{
SendClientMessage(playerid, COLOR_GREY, "/fcolor [familyid] [HEX-Colorcode]");
return 1;
}
format(string2, sizeof(string2), "%s",colorcode);
//strmid(FamilyInfo[family][fColor], string2, 0, 24);
strcpy(FamilyInfo[family][fColor], string2, 25);
format(string, sizeof(string), "You have adjusted Family %d's Color to ID {%s}%s", family,colorcode, FamilyInfo[family][fColor]);
SendClientMessage(playerid, COLOR_WHITE, string);
SaveFamilies();
return 1;
}
![](http://i43.tinypic.com/2mo1ptw.png)
But it isn't working on the /families:
PHP код:
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(FamilyInfo[i][FamilyTaken] == 1)
{
number ++;
format(string, sizeof(string), "** {%s}%s{F0F0F0} - Led by %s - Current Members: %d - Family Cookies: 0 - Strikes: %d of 3",FamilyInfo[i][fColor], FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyLeader],FamilyInfo[i][FamilyMembers],FamilyInfo[i][fCookies] ,FamilyInfo[i][FStrikes]);
SendClientMessage(playerid, COLOR_GRAD6, string);
}
}
![](http://i41.tinypic.com/nvt6ci.png)
I hope one of you guys know what I am doing wrong or something.
Thanks in advance!
Remco.