Make zone player can't out.
#1

Hi,

How to make zone, player can't out? i don't want use world boundries, but i want to have same effect, maybe just teleport back if player go out of zone
Reply
#2

Hello!

You can use the dynamic Areas of the streamer.
https://sampforum.blast.hk/showthread.php?tid=102865

Always when the Player leave the area you teleport the Player back into the area.
Try it, when you Need help then feel free to ask.
Reply
#3

Create area +

Код:
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
	if(areaid == your_area_id)
	{
		SendClientMessage(playerid, -1, "You cant exit this area.");

		new Float:x, Float:y, Float:z;
		Streamer_GetFloatData(STREAMER_TYPE_AREA, your_area_id, E_STREAMER_X, x);
		Streamer_GetFloatData(STREAMER_TYPE_AREA, your_area_id, E_STREAMER_Y, y);
		Streamer_GetFloatData(STREAMER_TYPE_AREA, your_area_id, E_STREAMER_Z, z);
		SetPlayerPos(playerid, x, y, z);
	}
	return 1;
}
Reply
#4

Streamer_GetFloatData(STREAMER_TYPE_AREA, your_area_id, E_STREAMER_X, x);
Streamer_GetFloatData(STREAMER_TYPE_AREA, your_area_id, E_STREAMER_Y, y);
Streamer_GetFloatData(STREAMER_TYPE_AREA, your_area_id, E_STREAMER_Z, z);

What X,Y,Z it's get?
Reply
#5

Quote:
Originally Posted by MerryDeer
Посмотреть сообщение
Streamer_GetFloatData(STREAMER_TYPE_AREA, your_area_id, E_STREAMER_X, x);
Streamer_GetFloatData(STREAMER_TYPE_AREA, your_area_id, E_STREAMER_Y, y);
Streamer_GetFloatData(STREAMER_TYPE_AREA, your_area_id, E_STREAMER_Z, z);

What X,Y,Z it's get?
Thats up to you to create a command to create the area
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)