SA-MP Forums Archive
Stay within world boundaries ... - 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: Stay within world boundaries ... (/showthread.php?tid=421880)



Stay within world boundaries ... - Squirrel - 11.03.2013

Well I got this issue and I tried everything to fix it but somehow it wont work.

I dont really get why am I getting this error... I tried resolving it for last 5 hours, but no sucess.

Код:
public OnPlayerSpawn(playerid)
{
	SetPlayerPos(playerid, 2317.130615, 692.398498, 11.460937);


    TextDrawHideForPlayer(playerid, Textdraw0);
	TextDrawHideForPlayer(playerid, Textdraw1);
	TextDrawHideForPlayer(playerid, Textdraw2);
	TextDrawHideForPlayer(playerid, Textdraw3);
	TextDrawHideForPlayer(playerid, Textdraw4);
	TextDrawHideForPlayer(playerid, Textdraw5);
	TextDrawHideForPlayer(playerid, Textdraw6);
	return 1;
}
Код:
public OnPlayerRequestSpawn(playerid)
{
	return 1;
}
Код:
public OnPlayerRequestClass(playerid, classid) //Default SA:MP pos
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}
It happens on the spawn.


Re: Stay within world boundaries ... - Threshold - 11.03.2013

pawn Код:
public OnPlayerConnect(playerid)
{
    SetPlayerWorldBounds(playerid, 20000, -20000, 20000, -20000);
    return 1;
}
This should work for you, otherwise you should try looking for other SetPlayerWorldBounds lines.


Re: Stay within world boundaries ... - Squirrel - 11.03.2013

I tried with that already. Wont work :/

OnPlayerRequestSpawn is normal, it shows you the normal area etc.. Once you click Spawn it messes everything up.


EDIT: Can it be because ProxDetector maybe? :/

Anyhow there are only 700 lines in the script tho, here is the link you can check it out to see if there is anything I added wrongly.
http://pastebin.com/r4sjs1De


Re: Stay within world boundaries ... - Threshold - 11.03.2013

You don't have any AddPlayerClass lines, which can sometimes cause errors in gamemodes. Try adding a few, as you are using OnPlayerRequestClass with an invalid classid.

https://sampwiki.blast.hk/wiki/AddPlayerClass


Re: Stay within world boundaries ... - Squirrel - 11.03.2013

Yepp! That worked. Thanks mate! Appreciated

+Rep