17.12.2014, 05:47
Do arrays with skins:
And change your code to:
Код:
new Males[] = { 0,1,... }; new Females[] = { 192,... };
Код:
if(PlayerInfo[playerid][pSex] == 1) { new rand = random(sizeof(Males)); PlayerInfo[playerid][pSkin] = Males[rand]; } else { new rand = random(sizeof(Females)); PlayerInfo[playerid][pSkin] = Females[rand]; } SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); Refund(playerid); TogglePlayerControllable(playerid, true); return 1; }