06.09.2017, 11:22
when leave game, how to get player pos and when player connect, player spawn with this position ?
help meeeee
help meeeee
GetPlayerPos(PlayerInfo[playerid][oldX], PlayerInfo[playerid][oldY], PlayerInfo[playerid][oldZ]); |
SetPlayerPos(PlayerInfo[playerid][oldX], PlayerInfo[playerid][oldY], PlayerInfo[playerid][oldZ]); |
Make Enums for the player for example
oldX, oldY, oldZ, and put under OnPlayerDisconnect and make sure that you save these enums in the player's .ini if u are using DINI or YINI or save it in the player's table if you're using MySQL.. Then go ahead under OnPlayerConnect and put under it and we are done.. |