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



Help - ViruZZzZ_ChiLLL - 30.04.2010

Question:
How can I make a certain skin, spawn at a certain place??
________
Airstream


Re: Help - 0ne - 30.04.2010

Onplayerspawn

Код:
if(Getplayerskin(playerid) == skinid)
{
spawn
}
else if(Getplayerskin(playerid) == skinid)
{
spawn
}
and so on


edit: Or maybe he's right lol

(down arrow)


Re: Help - [XST]O_x - 30.04.2010

AddPlayerClass(skin, Float, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)?


Re: Help - Torran - 30.04.2010

Quote:
Originally Posted by O_x
AddPlayerClass(skin, Float, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)?
I think he'd know that :P

pawn Код:
public OnPlayerSpawn(playerid)
{
  if(GetPlayerSkin(playerid) == 29)
  {
     SetPlayerPos(playerid, 0.0, 0.0, 0.0);
  }
  return 1;
}



Re: Help - [XST]O_x - 30.04.2010

Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by O_x
AddPlayerClass(skin, Float, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)?
I think he'd know that :P

pawn Код:
public OnPlayerSpawn(playerid)
{
  if(GetPlayerSkin(playerid) == 29)
  {
    SetPlayerPos(playerid, 0.0, 0.0, 0.0);
  }
  return 1;
}
dude isn't it actually the same result?


Re: Help - Torran - 30.04.2010

Quote:
Originally Posted by O_x
Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by O_x
AddPlayerClass(skin, Float, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)?
I think he'd know that :P

pawn Код:
public OnPlayerSpawn(playerid)
{
  if(GetPlayerSkin(playerid) == 29)
  {
    SetPlayerPos(playerid, 0.0, 0.0, 0.0);
  }
  return 1;
}
dude isn't it actually the same result?
Yes but he would know AddPlayerClass so he obviously means that


Re: Help - ViruZZzZ_ChiLLL - 30.04.2010

Actually I have this
Код:
for(new s = 0; s < 300; s++)
  {
	if(IsInvalidSkin(s)) continue;
	else AddPlayerClass(s, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  }
Код:
stock IsInvalidSkin(skinid) 
{
	#define	MAX_BAD_SKINS  14
	if(skinid > 310) return true; 
	new badSkins[MAX_BAD_SKINS] = {
		3, 4, 5, 6, 8, 42, 65, 74, 86,
		119, 149, 208, 273, 289
	};
	for (new i = 0; i < MAX_BAD_SKINS; i++) 
	{
	  if (skinid == badSkins[i]) return true; 
	}
	return false;
}
________
Los angeles dispensary


Re: Help - 0ne - 30.04.2010

use my suggestion then.


Re: Help - [MWR]Blood - 30.04.2010

Use this:

pawn Код:
if(GetPlayerSkin(playerid) == skin)
{
SetPlayerPos(playerid,X,Y,Z);
}
else
{
//if u wanna random spawn
new rand = random(3);
switch (rand)
{
case 0:SetPlayerPos(playerid,X,Y,Z);
case 1:SetPlayerPos(playerid,X,Y,Z);
case 2:SetPlayerPos(playerid,X,Y,Z);
}
return 1;
}
I hope it works