Random Skins
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
A bit more organized:
pawn Код:
if (Player[playerid][Skin] < 1)
{
    if (!strcmp(Player[playerid][Gender], "Male")) Player[playerid][Skin] = MaleSkins[random(sizeof MaleSkins)];
    else Player[playerid][Skin] = FemaleSkins[random(sizeof FemaleSkins)];
}
else Player[playerid][Skin] = cache_get_field_content_int(0, "Skin");

SetSpawnInfo(playerid, 0, Player[playerid][Skin], Player[playerid][posX], Player[playerid][posY], Player[playerid][posZ], Player[playerid][posA], 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
EDIT: It is much better to save the gender as an integer like 1 for male and 2 for female.
Thanks so much!
Reply


Messages In This Thread
Random Skins - by Allura - 06.08.2016, 11:45
Re: Random Skins - by Konstantinos - 06.08.2016, 11:56
Re: Random Skins - by Allura - 06.08.2016, 13:02
Re: Random Skins - by Konstantinos - 06.08.2016, 13:06

Forum Jump:


Users browsing this thread: 1 Guest(s)