SA-MP Forums Archive
Spawn Bug - 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)
+--- Thread: Spawn Bug (/showthread.php?tid=640931)



Spawn Bug - Hiei - 09.09.2017

Hi all, i have litte problem, when player complete register, i but them on this position
Код:
if(clickedid == TDEditor_TD26)
                 {
                 TextDrawHideForPlayer(playerid, TDEditor_TD24);
                 TextDrawHideForPlayer(playerid, TDEditor_TD25);
                 TextDrawHideForPlayer(playerid, TDEditor_TD26);
                 CancelSelectTextDraw(playerid);
                 SetCameraBehindPlayer(playerid);
                 TogglePlayerControllable(playerid, 1);
                 SetPlayerPos(playerid, -2752.70142, -626.48090, 500.00000);
                 }
And i has already create Plane interior object
Код:
CreateObject(14548, -2752.70142, -626.48090, 500.00000,   0.00000, 0.00000, -90.00000);
But not spawn in this, player spawn and fly from beach to sky like this video :
https://www.youtube.com/watch?v=xrCm...ature=*********
Anyone can help me?


Re: Spawn Bug - Escobabe - 09.09.2017

To set a player in interior, you must have the interior ID.
SetPlayerInterior(playerid, InteriorID).


Re: Spawn Bug - Hiei - 09.09.2017

Quote:
Originally Posted by Escobabe
Посмотреть сообщение
To set a player in interior, you must have the interior ID.
SetPlayerInterior(playerid, InteriorID).
Still this


Re: Spawn Bug - Escobabe - 09.09.2017

What do you mean "Still this"?


Re: Spawn Bug - Hiei - 09.09.2017

Quote:
Originally Posted by Escobabe
Посмотреть сообщение
What do you mean "Still this"?
It not change


Re: Spawn Bug - DomagojSellug - 09.09.2017

PHP код:
if(clickedid == TDEditor_TD26)
                 {
                 
TextDrawHideForPlayer(playeridTDEditor_TD24);
                 
TextDrawHideForPlayer(playeridTDEditor_TD25);
                 
TextDrawHideForPlayer(playeridTDEditor_TD26);
                 
CancelSelectTextDraw(playerid);
                 
SetCameraBehindPlayer(playerid);
                 
TogglePlayerControllable(playerid1);
                 
SetPlayerInterior(playerid1); // Sets the interior to the Shamal plane.
                 
SetPlayerPos(playerid, -2752.70142, -626.48090500.00000);
                 } 
Try this. You need to set an interior for the plane.

Also, a quick tip, download the Streamer Plugin and use CreateDynamicObject instead of CreateObject.


Re: Spawn Bug - Hiei - 09.09.2017

Quote:
Originally Posted by DomagojSellug
Посмотреть сообщение
PHP код:
if(clickedid == TDEditor_TD26)
                 {
                 
TextDrawHideForPlayer(playeridTDEditor_TD24);
                 
TextDrawHideForPlayer(playeridTDEditor_TD25);
                 
TextDrawHideForPlayer(playeridTDEditor_TD26);
                 
CancelSelectTextDraw(playerid);
                 
SetCameraBehindPlayer(playerid);
                 
TogglePlayerControllable(playerid1);
                 
SetPlayerInterior(playerid1); // Sets the interior to the Shamal plane.
                 
SetPlayerPos(playerid, -2752.70142, -626.48090500.00000);
                 } 
Try this. You need to set an interior for the plane.

Also, a quick tip, download the Streamer Plugin and use CreateDynamicObject instead of CreateObject.
It not change too LOL


Re: Spawn Bug - Hiei - 09.09.2017

Any help



Re: Spawn Bug - JasonRiggs - 09.09.2017

PHP код:
if(clickedid == TDEditor_TD26)
                 {
                 
TextDrawHideForPlayer(playeridTDEditor_TD24);
                 
TextDrawHideForPlayer(playeridTDEditor_TD25);
                 
TextDrawHideForPlayer(playeridTDEditor_TD26);
                 
CancelSelectTextDraw(playerid);
                 
SetCameraBehindPlayer(playerid);
                 
TogglePlayerControllable(playerid1);
                 
SetPlayerInterior(playerid0);
                 
SetPlayerPos(playerid, -2752.70142, -626.48090500.00000);
                 } 
try this.. Because I'm pretty sure that you haven't changed the interior ID.


Re: Spawn Bug - DomagojSellug - 09.09.2017

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
PHP код:
if(clickedid == TDEditor_TD26)
                 {
                 
TextDrawHideForPlayer(playeridTDEditor_TD24);
                 
TextDrawHideForPlayer(playeridTDEditor_TD25);
                 
TextDrawHideForPlayer(playeridTDEditor_TD26);
                 
CancelSelectTextDraw(playerid);
                 
SetCameraBehindPlayer(playerid);
                 
TogglePlayerControllable(playerid1);
                 
SetPlayerInterior(playerid0);
                 
SetPlayerPos(playerid, -2752.70142, -626.48090500.00000);
                 } 
try this.. Because I'm pretty sure that you haven't changed the interior ID.
Just read that he's got his own mapped plane. Do what Jason told you, I think that should fix it.