Quote:
Originally Posted by dice7
Quote:
Originally Posted by Y_Leѕѕ
Quote:
Originally Posted by |∞|-Рцппσĵσ-|∞|
pawn Код:
public IsACivillianSkin(skinid) { #define MAX_LAW_SKINS 16 new BadLawSkin[MAX_LAW_SKINS] = { 166, 165, 164, 163, 280, 281, 282, 283, 288, 284, 285, 287, 57, 265, 266, 267 }; for (new i = 0; i < MAX_LAW_SKINS; i++) if(skinid == BadLawSkin[i]) return false; #undef MAX_LAW_SKINS return 1; }
|
Again, doesn't need to be public. Also you may want to read this topic, specifically the part I've directly linked to:
http://forum.sa-mp.com/index.php?top...post_reduction
|
It's just that people absolutely love to copy from Godfather
pawn Код:
IsACivillianSkin(skinid) { switch(skinid) { case 166, 165, 164, 163, 280, 281, 282, 283, 288, 284, 285, 287, 57, 265, 266, 267: {return 0;} } return 1; }
|
You don't need those brackets {} at case becase you're useing one function or whatever
pawn Код:
IsACivillianSkin(skinid)
{
switch(skinid)
{
case 166, 165, 164, 163, 280, 281, 282, 283, 288, 284, 285, 287, 57, 265, 266, 267: return 0;
}
return 1;
}