24.12.2011, 23:26
This is what I've created as a start:
EDIT: The female skin function works but if I try to switch to a male skin, for example skin ID 1 it stays on Gender 2.
pawn Код:
new maleskins[] = {1, 2, 7};
new femaleskins[] = {9, 10, 11};
public SetPlayerGender(playerid)
{
if(IsPlayerConnected(playerid))
{
new skin = GetPlayerSkin(playerid);
for(new x; x<sizeof(maleskins); x++)
{
if(skin == maleskins[x]) PlayerInfo[playerid][pGender] = 1;
}
for(new x; x<sizeof(femaleskins); x++)
{
if(skin == femaleskins[x]) PlayerInfo[playerid][pGender] = 2;
}
}
return 1;
}