SA-MP Forums Archive
Spawn Boring problem - 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 Boring problem (/showthread.php?tid=646219)



Spawn Boring problem - tbedy - 12.12.2017

Код:
public OnPlayerSpawn(playerid)
{
 	SetSpawnInfo( playerid, 0, 0, 2498.2107,-1638.8793,18.6032, 269.15, 26, 36, 28, 150, 0, 0 );
	SetPlayerPos(playerid, 2498.2107,-1638.8793,18.6032);
	SetPlayerColor(playerid,COLOR_GREY);
	SetPlayerInterior(playerid, 0);
Код:
public OnPlayerRequestClass(playerid, classid)
{
        SetSpawnInfo( playerid, 0, 0, 2498.2107,-1638.8793,18.6032, 269.15, 26, 36, 28, 150, 0, 0 );
        SetPlayerInterior(playerid, 0);
	SetPlayerPos(playerid, 2498.2107,-1638.8793,18.6032);
	return 1;
}
And still bugged spawn ... Not at that position...

Tried with only SetPlayerPos / SetSpawnInfo and both together like in this code
Same problem


Re: Spawn Boring problem - RogueDrifter - 12.12.2017

Quote:
Originally Posted by tbedy
Посмотреть сообщение
Код:
public OnPlayerSpawn(playerid)
{
 	SetSpawnInfo( playerid, 0, 0, 2498.2107,-1638.8793,18.6032, 269.15, 26, 36, 28, 150, 0, 0 );
	SetPlayerPos(playerid, 2498.2107,-1638.8793,18.6032);
	SetPlayerColor(playerid,COLOR_GREY);
	SetPlayerInterior(playerid, 0);
Код:
public OnPlayerRequestClass(playerid, classid)
{
        SetSpawnInfo( playerid, 0, 0, 2498.2107,-1638.8793,18.6032, 269.15, 26, 36, 28, 150, 0, 0 );
        SetPlayerInterior(playerid, 0);
	SetPlayerPos(playerid, 2498.2107,-1638.8793,18.6032);
	return 1;
}
And still bugged spawn ... Not at that position...

Tried with only SetPlayerPos / SetSpawnInfo and both together like in this code
Same problem
Maybe you're running other filterscripts that force the player's position elsewhere?


Re: Spawn Boring problem - tbedy - 12.12.2017

There is no filterscripts at all....

Pics of flashing spawn: https://imgur.com/a/bcWAW


Re: Spawn Boring problem - Xeon™ - 12.12.2017

Oh that's normal because of AddPlayerClass position is setted to 0.0

so in the first spawn you will be teleported to there, about slow loading its your OnPlayerConnect callback fault you have to optimize it.


Re: Spawn Boring problem - tbedy - 12.12.2017

Can''t agree with you Xeon bcs while I had Teams it was working fine..

i deleted all teams and now is bugged

my onplayerconnect at least stay same


Re: Spawn Boring problem - Xeon™ - 12.12.2017

AddPlayerClass in under OnGameModeInit


Re: Spawn Boring problem - tbedy - 12.12.2017

Tried to add "addplayerclass" and tried without any addplayerclass

Код:
public OnPlayerConnect(playerid)
{
	SetSpawnInfo(playerid, 0, 0, 2498.2107,-1638.8793,18.6032, 269.15, 26, 36, 28, 150, 0, 0 );
	SpawnPlayer(playerid);
still doesn't work... same


Re: Spawn Boring problem - tbedy - 12.12.2017

Now i done some changes and now it's doing same thing:

https://imgur.com/rnymT8S

still flashing but staying on this position - freezed
TogglePlayerControllable(playerid,1); >>>> doesn't work