SA-MP Forums Archive
Help with character spawn - 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 with character spawn (/showthread.php?tid=88318)



Help with character spawn - stud4125 - 25.07.2009

ok so i have the interior for a house but how do i get character to spawn in house?


Re: Help with character spawn - StrickenKid - 25.07.2009

SetPlayerPos( x, y, z);
SetPlayerInterior(int id);


Re: Help with character spawn - stud4125 - 25.07.2009

Quote:
Originally Posted by <__Ǝthan__>
SetPlayerPos( x, y, z);
SetPlayerInterior(int id);
Thanks but i am using this form

Код:
 AddPlayerClass(100,2513.1167,-1670.8700,13.5096,84.3190,24,99999,4,1,30,99999); // TBK Spawn



Re: Help with character spawn - stud4125 - 25.07.2009

yeah how do i add it to it?


Re: Help with character spawn - (.Aztec); - 25.07.2009

Keep your primary coordinates on the AddPlayerClass, and do the following:

Under 'public OnPlayerSpawn' add the following:

SetPlayerInterior(playerid, ChangeThisToYourInteriorID);

Example:

Код:
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, 346.870025,309.259033,1000.0);
SetPlayerInterior(playerid, 6);
return 1;
}
That would make the user spawn in a jail cell.