new MaleSkins[][4] = { {6}, // Emmet {29}, // Drug Dealer {48} // hmyst }; new FemaleSkins[][4] = { {40}, // Normal Ped {41}, // Normal Ped {56} // Normal Ped };
if(!strcmp(Player[playerid][Gender], "Male") && Player[playerid][Skin] < 1) { new rand = random(sizeof(MaleSkins)); SetSpawnInfo(playerid, 0, MaleSkins[rand][0], Player[playerid][posX], Player[playerid][posY], Player[playerid][posZ], Player[playerid][posA], 0, 0, 0, 0, 0, 0); Player[playerid][Skin] = GetPlayerSkin(playerid); } else if(!strcmp(Player[playerid][Gender], "Female") && Player[playerid][Skin] < 1) { new rand = random(sizeof(FemaleSkins)); SetSpawnInfo(playerid, 0, FemaleSkins[rand][0], Player[playerid][posX], Player[playerid][posY], Player[playerid][posZ], Player[playerid][posA], 0, 0, 0, 0, 0, 0); Player[playerid][Skin] = GetPlayerSkin(playerid); } 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);
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);
A bit more organized:
pawn Код:
|
new MaleSkins[] =
{
6, // Emmet
29, // Drug Dealer
48 // hmyst
};
new FemaleSkins[] =
{
40, // Normal Ped
41, // Normal Ped
56 // Normal Ped
};