AddplayerClass
#1

Just a question im a beginner in this when I addplayerclass on the start of the gamemode is there a way wich i can make a sequence of available skins instead of allways changing the skin id like:

Instead of

AddPlayerClass(0,1765.2147,-1345.7694,15.7556,175.4445,0,0,0,0,0,0);
AddPlayerClass(0,1765.2147,-1345.7694,15.7556,175.4445,0,0,0,0,0,0);
AddPlayerClass(0,1765.2147,-1345.7694,15.7556,175.4445,0,0,0,0,0,0);
AddPlayerClass(0,1765.2147,-1345.7694,15.7556,175.4445,0,0,0,0,0,0);
AddPlayerClass(0,1765.2147,-1345.7694,15.7556,175.4445,0,0,0,0,0,0);

etc

Like

AddPlayerClass(0;100,1765.2147,-1345.7694,15.7556,175.4445,0,0,0,0,0,0);

So it would make skins available from 0 to 100 in skin ids ofc idk if theres any way of doing this tell me pls
Reply
#2

Try this:
pawn Код:
public OnGameModeInit()
{
    for(new i = 0; i < 100; i++)
    {
        AddPlayerClass(i, 1765.2147,-1345.7694,15.7556,175.4445,0,0,0,0,0,0);
    }
    return 1;
}
I haven't experimented with this code before, but it should work. Think of it as:
pawn Код:
for(new i = minimum; i < maximum; i++)
Reply
#3

Skin ID 74 is invalid. So it would be inside the loop:
pawn Код:
if(i == 74) continue;
AddPlayerClass(i, 1765.2147,-1345.7694,15.7556,175.4445,0,0,0,0,0,0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)