Player Position Setting on Connect
#1

I have recently been starting to incorporate MySQL functions and features into my server and have created a working login script that collects a players information from a database and throws it to the server.

This includes setting a players position on spawn and selecting a city via the database(its using grand larcenys city selection script).

I have had a few issues where my login position ends up on top of the airport control tower in Los Santos even though that is NOT the save location and my friends location (even after setting the same identical co ordinates as me) hangs and doesnt allow a login. It hangs on city selection (which is already set from downloading the player info on connect and shouldnt show).

On disconnecting the player location updates automatically and for some reason a really really odd co ordinate is saved, sometimes x is -7000 and most recently it saved z as 17000 (the numbers are rounded to approximately what they were).

Where is it getting these co ordinates from when I know this script works as I have been using it for a couple of weeks in testing and why is it not spawning my friend at all (even when using a function I made called /spawn to spawn you automatically and /normal to fix any camera and interior bugs). My friend is unable to login at all at the moment.

I am using Bluegills R7 mysql plugin and 0.3e server and client versions.

ANY suggestions are welcome and I will investigate anything that might fix the problem, at the moment I am putting it down to either 1. the plugin or 2. the server software misinterpretting something

causes, test code, suggestions, methods, theories, you name it, ill llook and see if it works.
Reply
#2

If you just want when a player spawned to teleport him to the location you want
Here is a funciton for it:

public OnPlayerSpawn(playerid)
{
SetPlayerPos(0,2496.7319,-1667.7465,13.343;
return 1;
}
This wil teleport me to grove street if i hit spawn
there are also ways to have multiple spawns it will automated select the one thats next
i dont know that script and i am tired so i cant write it down hope i helped you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)