how to put all skins in simple way in script
#7

Quote:
Originally Posted by kLx
Put this in bottom of your script:
pawn Код:
IsValidSkin(skinid)
{
  #define   MAX_BAD_SKINS 22
  new badSkins[MAX_BAD_SKINS] =
  { 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273, 289 };
  if (skinid < 0 || skinid > 299) return false;
  for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins[i]) return false; }
  #undef MAX_BAD_SKINS
  return 1;
}
and use this:
pawn Код:
public OnGameModeInit()
{  
  for(new i = 0; i < 299; i++)
  {
    if(IsValidSkin(i))
    {
      AddPlayerClass(i,0.0,0.0,0.0,0.0,-1,-1,-1,-1,-1,-1);
    }
  }
  return 1;
}
Why not using switch?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)