[Include] Simple get player sex
#3

Just nooo, don't use else if. Use switch().
You could do something like:
Код:
switch()
{
	case 10..13: return true;
	case 20..28: return true;
	case default: return false;
}
or this:
Код:
Skins[311] = {1, 1, 0, 0, 1, 1, ...};
 
IsPlayerMale(playerid)
{
    if(Skins[GetPlayerSkin(playerid)] == 0) return 1;
    return 0;
}
 
IsPlayerFemale(playerid)
{
    if(Skins[GetPlayerSkin(playerid)] == 1) return 1;
    return 0;
}
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: 2 Guest(s)