SA-MP Forums Archive
Stay within world Boundries - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Stay within world Boundries - problem (/showthread.php?tid=262842)



Stay within world Boundries - problem - Arcanize - 19.06.2011

I've got a new problem with this. (Stay within... )

If I am registering then aften "SetPlayerSpawn" player doesn't spawn. You have to click that "Spawn" button and those "---->" and "<----" arrows. If I click on arrow and after that on Spawn button then my monitor starts blingig. (White-white...) and the game says: "Stay within the world Boundries". I have to quit the game because I cant rid of that blinging.

Is SetPlayerSpawn right? How to get rid of this Boundries thing?


Thanks,
Arcanize



Re: Stay within world Boundries - problem - sleepysnowflake - 19.06.2011

Put them at the OnPlayerSpawn.


Re: Stay within world Boundries - problem - Mr4rtur - 19.06.2011

Do you have SetPlayerWorldBounds added somewhere in your script?


Re: Stay within world Boundries - problem - Arcanize - 19.06.2011

What I have to put there?

E/: No, I don't use that Boundries system.


Re: Stay within world Boundries - problem - Mr4rtur - 19.06.2011

Add SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000); to your SetPlayerSpawn script.


Re: Stay within world Boundries - problem - Arcanize - 19.06.2011

Tried, nothing...




It went that way again...


Re: Stay within world Boundries - problem - Mr4rtur - 19.06.2011

Show me your SetPlayerSpawn function.


Re: Stay within world Boundries - problem - sleepysnowflake - 19.06.2011

Do that on a test server and watch the results. If at the test server happens nothing, tehn it is from your other script.


Re: Stay within world Boundries - problem - Arcanize - 19.06.2011

Код:
public SetPlayerSpawn(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    for(new i = 0; i < MAX_PLAYERS; i++)
	    {
	        if(IsPlayerConnected(i))
	        {
	   			ResetBeacons(i);
	   		}
	    }
	    SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
	    SetTimerEx("ResetSpawnTimer", 8000, 0, "d", playerid);
	    if(pStats[playerid][pJailed] > 0)
	    {
	   		if(pStats[playerid][pJailed] == 1)
			{
		    	SetPlayerVirtualWorld(playerid,2);
		    	SetPlayerInterior(playerid, 6);
				SetPlayerPos(playerid,264.5743,77.5118,1001.0391);
				SendClientMessage(playerid, COLOR_WHITE, "Sinu vangistus ei ole veel lдbi!");
				return 1;
			}
   			else if(pStats[playerid][pJailed] == 3)
			{
		    	SetPlayerInterior(playerid, 0);
		    	SetPlayerPos(playerid, -10.9203,2328.7659,24.3034);
				SendClientMessage(playerid, COLOR_WHITE, "Sinu vangistus ei ole veel lдbi!");
				return 1;
			}
		}
	    if(pStats[playerid][pCrashed] == 1)
		{
		    if(pStats[playerid][pHospitalized] != 1)
		    {
    			SetPlayerPos(playerid,pStats[playerid][pCrashX],pStats[playerid][pCrashY],pStats[playerid][pCrashZ]);
	    		SetPlayerInterior(playerid,pStats[playerid][pCrashInt]);
				SetPlayerVirtualWorld(playerid,pStats[playerid][pCrashW]);
				pStats[playerid][pCrashed] = 0;
			}
		}
		else
		{
			SetPlayerPos(playerid,pStats[playerid][pCrashX], pStats[playerid][pCrashY], pStats[playerid][pCrashZ]);
			SetPlayerVirtualWorld(playerid, pStats[playerid][pCrashW]);
			SetPlayerInterior(playerid, pStats[playerid][pCrashInt]);
			SetPlayerHealth(playerid, 100);
		}
	    if(AdminDuty[playerid])
	    {
			SetPlayerHealth(playerid,99999);
			SetPlayerArmour(playerid,99999);
	    }

		return 1;
	}
	return 1;
}



Re: Stay within world Boundries - problem - Mr4rtur - 19.06.2011

I think you should use SetSpawnInfo instead SetPlayerPos.