Need Help In Player Spawning
#1

http://pastebin.com/m13e6d171

when i player exits and comes back to the server it does not save the spawn please help me thats my script for it...


Its Really Important and Urgent
Reply
#2

Looks like you need to put this at the bottom of OnPlayerDisconnect. OnPlayerUpdateAccount(playerid);
Reply
#3

Delete Post Double By Mistake
Reply
#4

its on the top see

Код:
public OnPlayerDisconnect(playerid, reason)
{
	OnPlayerUpdateAccount(playerid);
	new Float:u,Float:v,Float:w;
	GetPlayerPos(playerid, u, v, w);
	AccountInfo[playerid][SpawnX] = u;
	AccountInfo[playerid][SpawnY] = v;
	AccountInfo[playerid][SpawnZ] = w;
	AccountInfo[playerid][SpawnVW] = GetPlayerVirtualWorld(playerid);
	AccountInfo[playerid][SpawnInt] = GetPlayerInterior(playerid);
	new Float:angle;
	GetPlayerFacingAngle(playerid, angle);
	AccountInfo[playerid][SpawnAngle] = angle;

	return 1;
}
Reply
#5

Quote:
Originally Posted by SkyWinder
its on the top see

Код:
public OnPlayerDisconnect(playerid, reason)
{
	OnPlayerUpdateAccount(playerid);
	new Float:u,Float:v,Float:w;
	GetPlayerPos(playerid, u, v, w);
	AccountInfo[playerid][SpawnX] = u;
	AccountInfo[playerid][SpawnY] = v;
	AccountInfo[playerid][SpawnZ] = w;
	AccountInfo[playerid][SpawnVW] = GetPlayerVirtualWorld(playerid);
	AccountInfo[playerid][SpawnInt] = GetPlayerInterior(playerid);
	new Float:angle;
	GetPlayerFacingAngle(playerid, angle);
	AccountInfo[playerid][SpawnAngle] = angle;

	return 1;
}
Код:
public OnPlayerDisconnect(playerid, reason)
{
	new Float:u,Float:v,Float:w;
	GetPlayerPos(playerid, u, v, w);
	AccountInfo[playerid][SpawnX] = u;
	AccountInfo[playerid][SpawnY] = v;
	AccountInfo[playerid][SpawnZ] = w;
	AccountInfo[playerid][SpawnVW] = GetPlayerVirtualWorld(playerid);
	AccountInfo[playerid][SpawnInt] = GetPlayerInterior(playerid);
	new Float:angle;
	GetPlayerFacingAngle(playerid, angle);
	AccountInfo[playerid][SpawnAngle] = angle;
    OnPlayerUpdateAccount(playerid);
	return 1;
}
Should work
Reply
#6

Quote:
Originally Posted by яυαяαι
Quote:
Originally Posted by SkyWinder
its on the top see

Код:
public OnPlayerDisconnect(playerid, reason)
{
	OnPlayerUpdateAccount(playerid);
	new Float:u,Float:v,Float:w;
	GetPlayerPos(playerid, u, v, w);
	AccountInfo[playerid][SpawnX] = u;
	AccountInfo[playerid][SpawnY] = v;
	AccountInfo[playerid][SpawnZ] = w;
	AccountInfo[playerid][SpawnVW] = GetPlayerVirtualWorld(playerid);
	AccountInfo[playerid][SpawnInt] = GetPlayerInterior(playerid);
	new Float:angle;
	GetPlayerFacingAngle(playerid, angle);
	AccountInfo[playerid][SpawnAngle] = angle;

	return 1;
}
Код:
public OnPlayerDisconnect(playerid, reason)
{
	new Float:u,Float:v,Float:w;
	GetPlayerPos(playerid, u, v, w);
	AccountInfo[playerid][SpawnX] = u;
	AccountInfo[playerid][SpawnY] = v;
	AccountInfo[playerid][SpawnZ] = w;
	AccountInfo[playerid][SpawnVW] = GetPlayerVirtualWorld(playerid);
	AccountInfo[playerid][SpawnInt] = GetPlayerInterior(playerid);
	new Float:angle;
	GetPlayerFacingAngle(playerid, angle);
	AccountInfo[playerid][SpawnAngle] = angle;
    OnPlayerUpdateAccount(playerid);
	return 1;
}
Should work
Let Me Try
Reply
#7

I sugest using dini dudb and dutils. Its a lot easier to do and ive never had any problems with it myself.
Reply
#8

Quote:
Originally Posted by SkyWinder
Quote:
Originally Posted by яυαяαι
Quote:
Originally Posted by SkyWinder
its on the top see

Код:
public OnPlayerDisconnect(playerid, reason)
{
	OnPlayerUpdateAccount(playerid);
	new Float:u,Float:v,Float:w;
	GetPlayerPos(playerid, u, v, w);
	AccountInfo[playerid][SpawnX] = u;
	AccountInfo[playerid][SpawnY] = v;
	AccountInfo[playerid][SpawnZ] = w;
	AccountInfo[playerid][SpawnVW] = GetPlayerVirtualWorld(playerid);
	AccountInfo[playerid][SpawnInt] = GetPlayerInterior(playerid);
	new Float:angle;
	GetPlayerFacingAngle(playerid, angle);
	AccountInfo[playerid][SpawnAngle] = angle;

	return 1;
}
Код:
public OnPlayerDisconnect(playerid, reason)
{
	new Float:u,Float:v,Float:w;
	GetPlayerPos(playerid, u, v, w);
	AccountInfo[playerid][SpawnX] = u;
	AccountInfo[playerid][SpawnY] = v;
	AccountInfo[playerid][SpawnZ] = w;
	AccountInfo[playerid][SpawnVW] = GetPlayerVirtualWorld(playerid);
	AccountInfo[playerid][SpawnInt] = GetPlayerInterior(playerid);
	new Float:angle;
	GetPlayerFacingAngle(playerid, angle);
	AccountInfo[playerid][SpawnAngle] = angle;
    OnPlayerUpdateAccount(playerid);
	return 1;
}
Should work
Let Me Try
Did NOT WORK

Please Keep Helping
Reply
#9

Under on player connect, do you set the variables to your desired data? If not then they would be blank.
Reply
#10

Do u mean this ?

http://pastebin.com/d6123a5f2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)