Spawning Issues
#1

Whenever I spawn, I always end up in the sky, without a body either.
Here's a pastebin: http://pastebin.com/v15eAuK5
I'm suppose to spawn where I was last time, but, that didn't work apparently, with the resulting issue above.

Any idea?
Reply
#2

Just post the code that spawns the players in [/pawn].
Reply
#3

I haven't glanced over your code but the problem you've stated seemed more like of an TogglePLayerSpectation, if you happen to have SetSpawnInfo It will put on player spectating mode and force player to spawn you can imagine what is most likely to end up like
Reply
#4

Quote:
Originally Posted by DavidLuango
Посмотреть сообщение
I haven't glanced over your code but the problem you've stated seemed more like of an TogglePLayerSpectation, if you happen to have SetSpawnInfo It will put on player spectating mode and force player to spawn you can imagine what is most likely to end up like
TogglePlayerSpectating(playerid, 0); made me spawn at 0.0, 0.0, 0.0.

I then replaced TogglePlayerSpectating with SpawnPlayer(playerid);

And yes, there is a SetSpawnInfo there.
Reply
#5

Quote:
Originally Posted by stormchaser206
Посмотреть сообщение
TogglePlayerSpectating(playerid, 0); made me spawn at 0.0, 0.0, 0.0.

I then replaced TogglePlayerSpectating with SpawnPlayer(playerid);

And yes, there is a SetSpawnInfo there.
There is your problem, You did TogglePlayerSpectation(playerid,1) and never stopped spectating.

TogglePlayerSpectationg 0 turns off your spectation mode.

You are flying because you are still specing, make sure you remove TogglePlayerSpectating(Playerid, 1) to avoid the error.

Or Do TogglePlayerSpectating(playerid, 1);
TogglePlayerSpectating(playerid, 0);
SetSpawnInfo(playerid, x,y,z);

This should do it if it dont just remove TogglePlayerSPectating.

1 = Turns on
0 = Turns off.
Reply
#6

Quote:
Originally Posted by DavidLuango
Посмотреть сообщение
There is your problem, You did TogglePlayerSpectation(playerid,1) and never stopped spectating.

TogglePlayerSpectationg 0 turns off your spectation mode.

You are flying because you are still specing, make sure you remove TogglePlayerSpectating(Playerid, 1) to avoid the error.

Or Do TogglePlayerSpectating(playerid, 1);
TogglePlayerSpectating(playerid, 0);
SetSpawnInfo(playerid, x,y,z);

This should do it if it dont just remove TogglePlayerSPectating.

1 = Turns on
0 = Turns off.
Made a few changes to what you said in my code, and bam, it worked.
Thanks!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)