[Include] Simple get player sex
#7

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 || skinid 311) return string;
 
    new 
genderid;
    
genderid SkinGender[skinid];
 
    switch(
raceid)
    {
        case 
0format(string,sizeof(string), "Male");
        case 
1format(string,sizeof(string), "Female");
    }
    return 
string;
}
GetSkinEthnicity(skinid)
{
    new 
string[20];
    
format(string,sizeof(string), "Invalid");
    if(
skinid || skinid 311) return string;
 
    new 
raceid;
    
raceid SkinRace[skinid];
  
    switch(
raceid)
    {
        case 
0format(string,sizeof(string), "Caucasian");
        case 
1format(string,sizeof(string), "African American");
        case 
2format(string,sizeof(string), "Asian");
        case 
3format(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, -1string);
    
// Will output "You are a(n) African American Male."
    
return 1;

Reply


Messages In This Thread
Simple get player sex - by DarkLight - 03.09.2016, 17:52
Re: Simple get player sex - by Stinged - 03.09.2016, 20:31
Re: Simple get player sex - by ExTaZZ69 - 03.09.2016, 20:55
Re: Simple get player sex - by DarkLight - 03.09.2016, 20:55
Re: Simple get player sex - by Kathleen - 03.09.2016, 21:09
Re: Simple get player sex - by DarkLight - 03.09.2016, 21:11
Re: Simple get player sex - by Counterafk - 06.09.2016, 14:14
Re: Simple get player sex - by Chump - 07.09.2016, 12:43
Re: Simple get player sex - by Logic_ - 07.09.2016, 13:27
Re: Simple get player sex - by Quinncell - 08.09.2016, 15:16

Forum Jump:


Users browsing this thread: 1 Guest(s)