Multi Starting Skin
#1

Код:
if(PlayerInfo[playerid][pSex] == 1) 
       PlayerInfo[playerid][pSkin] = 299;
     else 
       PlayerInfo[playerid][pSkin] = 192;
   
     SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
     Refund(playerid);
     TogglePlayerControllable(playerid, true);
     return 1;
}
How to make it more Starting Skins for Male and Female not only 299 and 192
Reply
#2

up for this
Reply
#3

Do arrays with skins:
Код:
new Males[] =
{
0,1,...
};
new Females[] =
{
192,...
};
And change your code to:
Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)