SA-MP Forums Archive
Need Help In Player Spawning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help In Player Spawning (/showthread.php?tid=91057)



Need Help In Player Spawning - SkyWinder - 12.08.2009

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


Re: Need Help In Player Spawning - Backwardsman97 - 12.08.2009

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


Re: Need Help In Player Spawning - SkyWinder - 12.08.2009

Delete Post Double By Mistake


Re: Need Help In Player Spawning - SkyWinder - 12.08.2009

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;
}



Re: Need Help In Player Spawning - ruarai - 12.08.2009

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


Re: Need Help In Player Spawning - SkyWinder - 12.08.2009

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


Re: Need Help In Player Spawning - WrathOfGenesis - 12.08.2009

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


Re: Need Help In Player Spawning - SkyWinder - 12.08.2009

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


Re: Need Help In Player Spawning - WrathOfGenesis - 12.08.2009

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


Re: Need Help In Player Spawning - SkyWinder - 12.08.2009

Do u mean this ?

http://pastebin.com/d6123a5f2