Make zone player can't out. - 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: Make zone player can't out. (
/showthread.php?tid=618508)
Make zone player can't out. -
MerryDeer - 06.10.2016
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
Re: Make zone player can't out. -
Mencent - 06.10.2016
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.
Re: Make zone player can't out. -
Rdx - 06.10.2016
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;
}
Re: Make zone player can't out. -
MerryDeer - 07.10.2016
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?
Re: Make zone player can't out. -
IndependentGaming - 07.10.2016
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