23.06.2011, 15:26
Like they said on the wiki
For example, you have those 3 skins already, and you wanna add a new playerclass with skin 1 (this will be passworded).
Then your OnPlayerRequestClass should look like this
Hope this helps
Код:
AddPlayerClass(221, 0, 0, 0, 130, 24, 300, 0, 0, 0, 0); //Class 0 AddPlayerClass(212, 0, 0, 0, 130, 24, 300, 0, 0, 0, 0); //Class 1 AddPlayerClass(199, 0, 0, 0, 130, 24, 300, 0, 0, 0, 0); //Class 2
Код:
AddPlayerClass(221, 0, 0, 0, 130, 24, 300, 0, 0, 0, 0); //Class 0 AddPlayerClass(212, 0, 0, 0, 130, 24, 300, 0, 0, 0, 0); //Class 1 AddPlayerClass(199, 0, 0, 0, 130, 24, 300, 0, 0, 0, 0); //Class 2 AddPlayerClass(1, 0, 0, 0, 130, 24, 300, 0, 0, 0, 0); // Class3
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0: Locked[playerid] = 0; // Class 0, skin 221
case 1: Locked[playerid] = 0; // Class 1, skin 212
case 2: Locked[playerid] = 0; // Class 2, skin 199
case 3: Locked[playerid] = 1; // Class 3, skin 1 <-- this one is locked
}
return 1;
}