Please tell me there is an easier way to do this.
#1

Im doing

pawn Код:
AddPlayerClass(0, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(1, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(2, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(3, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(4, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(5, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(6, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(7, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(8, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(0, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(10, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(11, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(12, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(13, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(14, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(15, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(16, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(17, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(18, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(19, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(20, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(21, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(22, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(23, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(24, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(25, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(26, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(27, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(28, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(29, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(30, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(31, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(32, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(33, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(34, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(35, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(36, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(37, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(38, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(39, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(40, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(41, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(42, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(43, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(44, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(45, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(46, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(47, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(48, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(49, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(50, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(51, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(52, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(53, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(54, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(55, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(56, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(57, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(58, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(59, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(60, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(61, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(62, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(63, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(64, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(65, 1568.5302,-1894.3060,13.5600,359.0767, 0, 0, 0, 0, 0, 0);
I want it all setting in the same place. Just with different skin. Is there an easier way to do this?
Reply
#2

Use this:
pawn Код:
// Under OGMI
    for(new i = 0; i < 299; ++i)
    {
        if(IsValidSkin(i)) AddPlayerClass(i, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
    }

// Somewhere else..
stock IsValidSkin(SkinID)
{
    if(0 < SkinID < 300)
    {
        switch(SkinID)
        {
            case 3..6, 8, 42, 65, 74, 86, 119, 149, 208, 273, 289: return 0;
        }
        return 1;
    }
    return 0;
}
Not my code, use search next time
Reply
#3

You could also use this:

pawn Код:
new InvalidSkinID[300] =
{
    1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
and:

pawn Код:
for(new s = 0; s < 299; s++)
        if(InvalidSkinID[s] == 0) AddPlayerClass(s, DEFAULT_SPAWN_X, DEFAULT_SPAWN_Y, DEFAULT_SPAWN_Z, DEFAULT_SPAWN_ZANG, 0, 0, 0, 0, 0, 0);
Thanks to "Babul" for giving me that code about a week ago.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)