Positions problem.
#1

I have this on OnPlayerDisconnect()
pawn Код:
GetPlayerPos(playerid, PlayerInfo[playerid][pCrashPos_x], PlayerInfo[playerid][pCrashPos_y], PlayerInfo[playerid][pCrashPos_z]);
and this on OnPlayerLogin()

pawn Код:
GetPlayerPos(playerid, PlayerInfo[playerid][pCrashPos_x], PlayerInfo[playerid][pCrashPos_y], PlayerInfo[playerid][pCrashPos_z]);

The problem: When i login it will respawned me on the hospital..

I have a SpawnType, too.
Reply
#2

If you save the position when player disconnects, then you should set the position when player logs in.
It spawns you inside your hospital because when you login you save the position again instead of setting it.
Reply
#3

pawn Код:
SetPlayerPos(playerid, PlayerInfo[playerid][pCrashPos_x], PlayerInfo[playerid][pCrashPos_y], PlayerInfo[playerid][pCrashPos_z]);
Use this under OnPlayerLogin.
Reply
#4

Quote:
Originally Posted by viKKmaN
Посмотреть сообщение
If you save the position when player disconnects, then you should set the position when player logs in.
It spawns you inside your hospital because when you login you save the position again instead of setting it.
Daca imi poti zice pe romana ar fi mai bine ca te-as intelege cu mai multa usurinta.



@-Luis: I have already that in OnPlayerLogin()
Reply
#5

Try this code:

OnPlayerDisconnect
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
PlayerInfo[playerid][pCrashPos_x] = x;
PlayerInfo[playerid][pCrashPos_y] = y;
PlayerInfo[playerid][pCrashPos_z] = z;
OnPlayerLogin
pawn Код:
SetPlayerPos(playerid, PlayerInfo[playerid][pCrashPos_x], PlayerInfo[playerid][pCrashPos_y], PlayerInfo[playerid][pCrashPos_z]);
Reply
#6

I tried, look what problem i have..

When i log in, i will respawn at that coords, and after i will respawn at hospital..Is something like..

First time: SetplayerPos .... and after SpawnPlayer ..

I can't understand. I can make screenshot's if you want.
Reply
#7

Well, if you logged off and you died, it will spawn at the hospital.

Try this, start the server, when you get ejected out of the hospital, walk to somewhere. Then log off by typing /q. Then reboot the server and check where you spawn now.
Reply
#8

Same problem. I respawned at that position, and after i was in bed.. at hospital.
Reply
#9

ScreenShots:
/imageshack/img253/2245/samp769v.png -> there I logged out. [/q]
/imageshack/img689/8580/samp770h.png -> after i log in
/imageshack/img534/9007/samp771.png -> after i log in
/imageshack/img20/4953/samp772.png -> after i log in
/imageshack/img714/3189/samp773l.png -> after i log in
Reply
#10

Are you setting the interior when you login also?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)