06.09.2016, 14:14
I made one a week or two ago for a script I'm working on, if you wanna use it
PHP код:
new SkinRace[] = // 0 = Caucasian / 1 = African American / 2 = Asian / 3 = Latino
{
0,0,0,0,1,1,1,
1,3,1,1,1,1,1,
1,1,1,1,1,1,1,
1,1,0,1,1,0,0,
1,0,3,0,0,0,0,
3,3,0,0,0,1,3,
0,3,3,0,3,3,3,
2,0,1,0,0,0,0,
0,0,0,2,0,0,0,
1,1,1,1,1,0,1,
0,0,0,0,1,0,1,
0,0,0,1,0,1,1,
1,0,1,0,0,0,0,
0,0,0,0,0,0,0,
3,0,0,0,1,1,1,
1,1,1,3,3,3,0,
0,0,3,3,3,2,2,
0,2,2,2,2,0,0,
0,0,0,0,0,0,0,
0,1,0,1,0,0,1,
0,0,1,1,1,0,0,
0,1,1,0,0,0,0,
0,0,1,0,0,0,0,
0,0,1,0,0,1,0,
1,2,0,0,0,3,3,
3,1,0,0,0,1,0,
1,1,3,1,2,2,0,
0,1,0,0,0,0,1,
0,0,0,0,0,0,0,
0,0,0,0,0,2,0,
2,0,0,0,0,1,0,
0,1,1,1,1,1,3,
2,2,0,0,2,2,0,
0,0,0,0,0,0,0,
1,0,0,0,0,1,1,
1,0,0,0,1,0,0,
0,1,0,0,1,0,0,
0,1,0,1,2,0,1,
0,3,0,1,1,1,0,
3,1,3,0,0,1,0,
0,0,0,0,1,0,0,
0,0,0,0,0,3,1,
2,0,1,1,3,0,0,
0,0,0,0,0,0,1,
0,0,0,0
};
new SkinGender[] = // 0 = Male / 1 = Female
{
0,0,0,0,0,0,0,
0,0,1,1,1,1,1,
0,0,0,0,0,0,0,
0,0,0,0,0,0,0,
0,0,0,1,0,0,0,
0,0,0,1,1,1,1,
0,0,0,0,0,0,0,
0,0,0,0,1,1,1,
1,0,0,0,0,0,0,
1,1,1,0,0,0,1,
0,0,0,0,0,1,1,
1,0,0,0,0,0,0,
0,1,0,1,1,1,1,
1,1,1,0,0,0,0,
0,0,0,0,0,0,0,
0,0,0,0,0,0,0,
0,0,0,0,0,0,0,
0,0,0,0,0,0,0,
0,0,0,1,1,1,0,
0,0,0,0,0,1,1,
1,1,0,0,0,1,0,
0,1,0,1,1,1,0,
0,0,0,1,0,0,0,
0,0,0,0,0,0,0,
0,1,0,0,1,0,0,
0,0,0,1,0,0,0,
0,0,0,0,0,0,0,
0,1,1,1,1,1,1,
1,1,1,1,0,1,0,
0,0,1,0,1,0,0,
0,1,0,0,1,1,1,
0,1,1,0,0,0,0,
1,1,1,0,0,0,0,
1,1,1,0,0,0,1,
1,0,0,0,0,1,1,
1,1,0,0,0,0,1,
0,0,0,0,1,1,0,
0,0,0,0,1,0,0,
0,0,0,0,0,0,0,
0,0,0,0,0,0,0,
0,0,0,0,0,0,0,
0,0,0,0,0,0,0,
0,0,0,0,1,0,0,
0,0,0,0,0,1,1,
1,1,0,0,0,0,0,
0
};
PHP код:
GetSkinGender(skinid)
{
new string[20];
format(string,sizeof(string), "Invalid");
if(skinid < 0 || skinid > 311) return string;
new genderid;
genderid = SkinGender[skinid];
switch(raceid)
{
case 0: format(string,sizeof(string), "Male");
case 1: format(string,sizeof(string), "Female");
}
return string;
}
GetSkinEthnicity(skinid)
{
new string[20];
format(string,sizeof(string), "Invalid");
if(skinid < 0 || skinid > 311) return string;
new raceid;
raceid = SkinRace[skinid];
switch(raceid)
{
case 0: format(string,sizeof(string), "Caucasian");
case 1: format(string,sizeof(string), "African American");
case 2: format(string,sizeof(string), "Asian");
case 3: format(string,sizeof(string), "Latino");
}
return string;
}
PHP код:
// Example function
public Function(playerid) {
new string[20];
new skin = GetPlayerSkin(playerid); // skin = 21
format(string,sizeof(string), "You are a(n) %s %s.", GetSkinEthnicity(skin), GetSkinGender(skin));
SendClientMessage(playerid, -1, string);
// Will output "You are a(n) African American Male."
return 1;
}