public OnGameModeInit()
{
for( new SkinID; SkinID < MAX_SKIN_ID; SkinID ++ )
{
switch( SkinID )
{
//Add the exceptions here - Normal users will NOT be allowed to select them!
case 0: SkinID ++;
//Not allowed to select this due to it being the Carl Johnson skin model!
case 165: SkinID ++;
case 166: SkinID ++;
case 211: SkinID ++;
case 217: SkinID ++;
case 294: SkinID ++;
//Not allowed to select these due to them being a 'Staff only' skin model!
case 265: SkinID ++;
case 266: SkinID ++;
case 267: SkinID ++;
case 274: SkinID ++;
case 275: SkinID ++;
case 276: SkinID ++;
case 277: SkinID ++;
case 278: SkinID ++;
case 279: SkinID ++;
case 280: SkinID ++;
case 281: SkinID ++;
case 282: SkinID ++;
case 283: SkinID ++;
case 284: SkinID ++;
case 285: SkinID ++;
case 286: SkinID ++;
case 287: SkinID ++;
case 288: SkinID ++;
//Not allowed to select these due to them being a 'Specialized Service' skin model!
default: AddPlayerClass( SkinID, 0,0,0,0, 0,0, 0,0, 0,0 );
//They are allowed to use these skins, and have, as a result, been created!
}
}
return 1;
}
stock IsValidSkin(skinid)
{
new noskin[25] = {0, 165, 166, 211, 217, 294, 265, 266, 267, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288};
for(new i; i<25; i++)
{
if(skinid == noskin[i]) return 0;
}
return 1;
}
public OnGameModeInit()
{
for( new SkinID; SkinID < MAX_SKIN_ID; SkinID ++ )
{
if(IsValidSkin(SkinID) == 1) AddPlayerClass( SkinID, 0,0,0,0, 0,0, 0,0, 0,0 );
}
return 1;
}
You could always do something like the following:
pawn Code:
|
stock IsValidSkin(skinid)
{
switch(skinid)case 0,165,166,211,217,265,266,267,274,275,276,277,278,279,280,281,283,283,284,285,286,287,288,294: return 0;
return 1;
}