SA-MP Forums Archive
Log in - Server Closed to connection - 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: Log in - Server Closed to connection (/showthread.php?tid=310026)



Log in - Server Closed to connection - Larry123 - 10.01.2012

Hello

Yesterday i script commands and tried to test it i get this picture:

I Mean, "Server Closed to connection" is after public SpawniM2ngija(playerid), code is right and everything else too, at least yesterday was, can be here any problem ?
Code:
public SpawniM2ngija(playerid)
{
    SpawnPlayer(playerid);
	SendClientMessage(playerid, -1, "Oled sisselogitud - Andry Roleplay");
	SendClientMessage(playerid, -1, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
	format(stri, sizeof(stri), "Mдngumoodi versioon: %s", Versioon);
	SendClientMessage(playerid, -1, stri);
	format(stri, sizeof(stri), "Viimane uuendus: %s", VUuendus);
	SendClientMessage(playerid, -1, stri);
	SendClientMessage(playerid, -1, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
	if(M2ngijaInfo[playerid][mPosX] == 0 && M2ngijaInfo[playerid][mPosY] == 0 && M2ngijaInfo[playerid][mPosZ] == 0)
	{
	    SetPlayerPosition(playerid, 631.0473,-571.5751,16.3359,270.5452,0);
	    SendClientMessage(playerid, -1, "Spawnisime sind uude asukohta.");
	}
	if(M2ngijaInfo[playerid][mPosX] != 0)
	{
    	SetPlayerPosition(playerid, M2ngijaInfo[playerid][mPosX], M2ngijaInfo[playerid][mPosY], M2ngijaInfo[playerid][mPosZ], M2ngijaInfo[playerid][mAngle], M2ngijaInfo[playerid][mInt]);
    	SendClientMessage(playerid, -1, "Taastasime sinu endise asukoha.");
 	}
 	if(M2ngijaInfo[playerid][mKarakter] > 0) return SetPlayerSkin(playerid, M2ngijaInfo[playerid][mKarakter]);
	if(M2ngijaInfo[playerid][mKarakter] == 0) return SetPlayerSkin(playerid, 208);
 	return 1;
}



Re: Log in - Server Closed to connection - Norck - 10.01.2012

There is a bug in the current release: if you use SpawnPlayer without SetSpawnInfo, then player gets kicked. So you need to call SetSpawnInfo before SpawnPlayer.


Re: Log in - Server Closed to connection - Larry123 - 10.01.2012

But i don`t need SetSpawnInfo, so how can i put this into this code and do with it nothing. Or is there a way to do an other "SpawnPlayer" function?


Re: Log in - Server Closed to connection - Larry123 - 10.01.2012

So, i putted SetSpawnInfo in OnPlayerRequestClass, (SpawniM2ngija come after this) and now he is spamming my public SpawniM2ngija texts and spamms these SetSpawnInfo spawn coordinates.

(In picture text is spamming every millisecond )



Re: Log in - Server Closed to connection - Larry123 - 10.01.2012

So is there any solution or what i have to do? i still want to spawn player ( Lose these arrows and spawn button bottom of screen)


Re: Log in - Server Closed to connection - Larry123 - 10.01.2012

BUMP, need fast help because all my things are waiting behind this


Re: Log in - Server Closed to connection - Larry123 - 11.01.2012

BUMP


Re: Log in - Server Closed to connection - Larry123 - 12.01.2012

BUMP


Re: Log in - Server Closed to connection - Twinki1993 - 12.01.2012

call SetSpawnInfo before SpawnPlayer.

Read what people wrote.


Re: Log in - Server Closed to connection - Larry123 - 13.01.2012

I said that if i but SetSpawnInfo(playerid, 0,0,0,0,0,0,0..); before spawnplayer then text is getting spamming.