Player doesn't spawn in correct interior
#1

So it spawns the player on the correct coordinates but not on his last interior...

This is what I have at OnPlayerSpawn

Код:
SetPlayerInterior(playerid, Player[playerid][LastInt]);
And I checked, when I left the server in my account file the interior is correct.
Any idea what could be wrong? It saves just fine.
Reply
#2

What about virtual world? Are you saving the player's VW? If not, it is necessary. As every interior is having a virtual world AFAIK.
Reply
#3

Quote:
Originally Posted by LivingLikeYouDo
Посмотреть сообщение
What about virtual world? Are you saving the player's VW? If not, it is necessary. As every interior is having a virtual world AFAIK.
Yes I am saving and retrieving VW aswell
Reply
#4

Then check if the VW is being set of the player. Do debugging or anything you think would help.
Other than that, check if the interior is being loaded properly. If you use MySQL, check mysql_log.txt if you enable debugging.
Reply
#5

Quote:
Originally Posted by LivingLikeYouDo
Посмотреть сообщение
Then check if the VW is being set of the player. Do debugging or anything you think would help.
Other than that, check if the interior is being loaded properly. If you use MySQL, check mysql_log.txt if you enable debugging.
Right so under the line where it changes his Interior, I've set a debug message and I do actually get it in my chat. Meaning that the code is being runned... I have no idea what the problem could be..
Код:
SetPlayerInterior(playerid, Player[playerid][LastInt]);
    SendClientMessage(playerid, -1, "Int change?");
Reply
#6

u making gm from 0 with default sa-mp server files ?
Reply
#7

Quote:
Originally Posted by cyberlord
Посмотреть сообщение
u making gm from 0 with default sa-mp server files ?
Yes, what does that have to do with this?
Reply
#8

Quote:
Originally Posted by Sellize
Посмотреть сообщение
Yes, what does that have to do with this?
i had the same problem several days ago but i manage to solve it ,
so first what u want to do is to check that u set player interior only there u want and noware else ( meen that there is no commande below to sent player interior to another like 0 )
not sure u are using mysql or not but if so check mysql log that mysql takes good value from database
and if so that should work if not set player world as well on playerspwans and check that hey take good values from database if yes then everything should work ( i solve this problem on my game mode by removing one serplayerpos to 0 line from onplayerspawn below my setplayerinterior from data base , so i have set good interior from data base but after that its have been changed to 0 and hare comes problem )
Reply
#9

Try this debug:
pawn Код:
SetPlayerInterior(playerid, Player[playerid][LastInt]);
printf("Player int = %d", GetPlayerInterior(playerid));
Make sure that the %d must print the interior saved in your database, if not, then it is an issue with your loading system.
Reply
#10

Quote:
Originally Posted by LivingLikeYouDo
Посмотреть сообщение
Try this debug:
pawn Код:
SetPlayerInterior(playerid, Player[playerid][LastInt]);
printf("Player int = %d", GetPlayerInterior(playerid));
Make sure that the %d must print the interior saved in your database, if not, then it is an issue with your loading system.
It printed interior 0, a different one from the file.
So I guess it's got to do with the loading system then
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)