Spawn problem - 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)
+--- Thread: Spawn problem (
/showthread.php?tid=606852)
Spawn problem -
N0FeaR - 10.05.2016
This happend when i spawn mabye you guys know whats the problem
http://imgur.com/04rMzDN
PHP код:
case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SpawnPlayer(playerid);
//LoadPlayerSpawnData(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
PHP код:
public OnPlayerSpawn(playerid)
{
LoadPlayerSpawnData(playerid);
if(PlayerInfo[playerid][PosX] == 0 && PlayerInfo[playerid][PosY] == 0 && PlayerInfo[playerid][PosZ] == 0)
{
PlayerInfo[playerid][PosX] = 1742.9600;
PlayerInfo[playerid][PosY] = -1861.4019;
PlayerInfo[playerid][PosZ] = 0.2426;
SetPlayerPos(playerid, 1742.9600, -1861.4019, 0.2426);
}
return 1;
}
Re: Spawn problem -
BloodyRP - 10.05.2016
U need to show us your LoadPlayerSpawnData(playerid) stock.
U need to post inside this callback something like:
PHP код:
PlayerInfo[playerid][PosX] = PlayerInfo[playerid][PosY] = PlayerInfo[playerid][PosZ] = 0;
And only after that u will get good spawn in OnPlayerSpawn.
Re: Spawn problem -
thaKing - 10.05.2016
PHP код:
TogglePlayerSpectating(playerid, false);
Re: Spawn problem -
Logic_ - 10.05.2016
show us your "LoadPlayerSpawnData(playerid); "
Re: Spawn problem -
Ultrascipter - 10.05.2016
Use SetSpawnInfo in Dialog.
SetSpawnInfo Wiki search
Re: Spawn problem -
N0FeaR - 10.05.2016
Quote:
Originally Posted by runcis
PHP код:
TogglePlayerSpectating(playerid, false);
|
Yeah i just realize that thx anyway!