SA-MP Forums Archive
Solved - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Solved (/showthread.php?tid=120903)



Solved - icorne - 13.01.2010

How i can give a skin a name? And i want not all skins avaible but 5 skins or something.

Maybe u can use this:
Код:
IsValidSkin(skinid)
{
  #define	MAX_BAD_SKINS 22
  new badSkins[MAX_BAD_SKINS] =
  { };
  if (skinid < 0 || skinid > 299) return false;
  for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins[i]) return false; }
  #undef MAX_BAD_SKINS
  return 1;
}
Or this:
Код:
public OnGameModeInit()
{

	SetGameModeText("Netherlands AirSim");
	UsePlayerPedAnims();

	for(new i = 0; i < 299; i++)
  {
    if(IsValidSkin(i))
    {
      AddPlayerClass(i,0.0,0.0,0.0,0.0,24,450,27,350,-1,-1);
    }
	}

	return 1;
}
Yeah, I know. Im asking allot but i want have my flysim at the end of the week online. Its now 17% Good.


Re: Skins - icorne - 13.01.2010

Anyone?


Re: Skins - Grim_ - 13.01.2010

You seriously do not need to bump after 7 minutes.
And just make an array with pre-names for all the skins, loop through them, ect.


Re: Skins - mamorunl - 14.01.2010

If you only want 5 skins available, assign a variable to them at OnGamemodeInIt. If you have a lot, it is better to use the suggestion above.

* mamoru


Re: Skins - icorne - 14.01.2010

I want only 5 skins but how i script it? Im just an beginner.


Re: Skins - mamorunl - 14.01.2010

new skin1,skin2,skin3,skin4,skin5;

skin1 = AddPlayerClass();
skin2 = AddPlayerClass();
..