all player classes
#1

Hi,

I want to put all the classes from the game to my gamemode with AddPlayerClass(), how can I make it easily?
Reply
#2

Add this under OnGameModeInit()
pawn Код:
for(new s = 0; s < 300; s++)
  {
    if(IsInvalidSkin(s)) continue;
    else AddPlayerClass(s, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  }
then add this anywhere :
pawn Код:
stock IsInvalidSkin(skinid)
{
    #define MAX_BAD_SKINS  14
    if(skinid > 310) return true;
    new badSkins[MAX_BAD_SKINS] = {
        3, 4, 5, 6, 8, 42, 65, 74, 86,
        119, 149, 208, 273, 289
    };
    for (new i = 0; i < MAX_BAD_SKINS; i++)
    {
      if (skinid == badSkins[i]) return true;
    }
    return false;
}
then its done
Reply
#3

thanks a lot
Reply
#4

I'm scripting beginner, so I'm just learning these 'for' and other things, if it's not problem for you, can you imagine what does it do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)