SA-MP Forums Archive
Skin Selection - 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: Skin Selection (/showthread.php?tid=142638)



Skin Selection - Tony1337 - 19.04.2010

Hey Guys! Alright Here I have 2 teams, one team can select any skin but the zombie team cannot.. BUT For some reason the zombies and the humans both can change there skins, how can i make it so that only TEAM HUMAN Can change skins?
~THANKS


Код:
public OnGameModeInit()
{
  AddPlayerClass(20,1965.4980,2153.0464,10.8203,93.0301,0,0,0,0,0,0); // Zombies -- ID 0

	for(new i=0;i<300;i++)
	{
	  if((i == 7)||(i >= 9 && i <= 41)||(i >= 43 && i <= 64)||(i >= 66 && i <= 73)
	  ||(i >= 75 && i <= 85)||(i >= 87 && i <= 118)||(i >= 120 && i <= 148)||(i >= 150 && i <= 207)
	  ||(i >= 209 && i <= 264)||(i >= 274 && i <= 288)||(i >= 290 && i <= 299))
	  {
	   AddPlayerClass(i,2193.0452,1986.3723,12.2969,72.5183,0,0,0,0,0,0); // Humans -- ID 1
	  }
	}



Re: Skin Selection - Jay_ - 19.04.2010

Create a spoof span for the zombie team using SetSpawnInfo in OnPlayerRequestClass, and then call SpawnPlayer. For an example see barron.pwn


Re: Skin Selection - Tony1337 - 19.04.2010

So like this??

Код:
SetSpawnInfo(playerid,0,0,
			gSpawnPositions[playerid][0],
			gSpawnPositions[playerid][1],
			gSpawnPositions[playerid][2],
			gSpawnPositions[playerid][3],
			-1,-1,-1,-1,-1,-1);
Код:
AddPlayerClass(0,0.0,0.0,4.0,0.0,-1,-1,-1,-1,-1,-1);



Re: Skin Selection - Jay_ - 19.04.2010

Providing the gSpawnPositions array is a float, yes that would work fine


Re: Skin Selection - Tony1337 - 19.04.2010

Alright Cool but it still lets the zombies have every skin during class selection