Getting coords
#2

Quote:
Originally Posted by Anthonyx3'
Посмотреть сообщение
Hey guys, for some reason my login stopped working, and i dont have backups so cant go back to backup for code. When a player logged in, he would be spawned at his last coords, but now players goes to 0.0 which is annoying, i cant find out my problem. Heres my code:


pawn Код:
PlayerInfo[playerid][X1] = dini_Float(file, "Posx");

            PlayerInfo[playerid][Y1] = dini_Float(file, "Posy");

            PlayerInfo[playerid][Z1] = dini_Float(file, "Posz");

            SetPlayerPos(playerid, PlayerInfo[playerid][X1],PlayerInfo[playerid][Y1],PlayerInfo[playerid][Z1]);

            SetSpawnInfo(playerid, PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][X1], PlayerInfo[playerid][Y1], PlayerInfo[playerid][Z1], 1.0, -1, -1, -1, -1, -1, -1);

            SpawnPlayer(playerid);
I have a feeling i did something wrong, i would appreciate anyones help, thanks
You don't need
pawn Код:
SetPlayerPos(playerid, PlayerInfo[playerid][X1],PlayerInfo[playerid][Y1],PlayerInfo[playerid][Z1])
as you are already defining the SpawnInfo

If it doesn't work without it, place it underneath OnPlayerSpawn()
Reply


Messages In This Thread
Getting coords - by Anthonyx3' - 30.12.2010, 02:59
Re: Getting coords - by _rAped - 30.12.2010, 03:02
Re: Getting coords - by Anthonyx3' - 30.12.2010, 03:05
Re: Getting coords - by _rAped - 30.12.2010, 03:08
Re: Getting coords - by Anthonyx3' - 30.12.2010, 03:10
Re: Getting coords - by Anthonyx3' - 30.12.2010, 03:40
Re: Getting coords - by _rAped - 30.12.2010, 03:48
Re: Getting coords - by Anthonyx3' - 30.12.2010, 04:02
Re: Getting coords - by Anthonyx3' - 30.12.2010, 04:12
Re: Getting coords - by _rAped - 30.12.2010, 04:14

Forum Jump:


Users browsing this thread: 1 Guest(s)