Safe zone.
#1

Hi all.I want ask with one thing. I try do safe zone,i use GangZoneCreate all is well,but i want ask,do i need set timer every second check if player in that zone? or maybe can do it simplier
Reply
#2

You could use Incognito's streamer plugin for zones, it allows you to create zones in many different shapes. Check it out from the plugins board.
Reply
#3

https://sampwiki.blast.hk/wiki/Areacheck
Reply
#4

Yes,but if i with textdraw make that "Safe Zone" then if player is in that zone every second it will update to me or simplier i do with message and too,i get that message every 1 sec.
Reply
#5

AeroBlast i try your page what you give me but it still don't work here is my code:

Код:
OnGameModeInit:

SetTimer("isPlayerInArea", 1000, true);
Then after all my gm:

Код:
forward isPlayerInArea();
public isPlayerInArea()
{
new Float:X, Float:Y, Float:Z; //We use this to store player position
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
print("Hello");
GetPlayerPos(i, X, Y, Z);
if (X <= -55.0116 && X >= 35.5120 && Y <= 1208.9111 && Y >= 1239.7379)         
{
print("Hello2");
SetPlayerHealth(i,5000);
}
}
}
Ok why i use print? I use print because i want check ok,first print is work,but second is doesn't work then i think with this is bad:

Код:
if (X <= -55.0116 && X >= 35.5120 && Y <= 1208.9111 && Y >= 1239.7379)         
{
And too here is my four coord:

Код:
AddPlayerClass(20,-54.9971,1208.9401,19.3594,125.6477,0,0,0,0,0,0); // 1 Hotel corner
AddPlayerClass(20,-55.0116,1238.0369,19.3594,47.6675,0,0,0,0,0,0); // 2 Hotel corner
AddPlayerClass(20,32.5096,1239.7379,19.3438,309.7458,0,0,0,0,0,0); // 3 Hotel corner
AddPlayerClass(20,35.5120,1208.9111,19.0166,222.5389,0,0,0,0,0,0); // 4 Hotel corner
But when i want do gang zone it's work fine...
Reply
#6

instead of timer
you can put it OnPlayerUpdate
Right?
Reply
#7

No. Putting the checks in OnPlayerUpdate is a very very bad idea. It is called way too often for all players. Use a timer instead.
Reply
#8

any help?
Reply
#9

I bet, the problem is in coordinates. Use iPLEOMAX gangzone creator, it will give 100% correct coordinates.
Reply
#10

I think in coord is good,because how i say with that coordinates i do gang zone and all works fine,but check if player in that zone it i can't do. I don't know maybe method is bad of my coord or something else.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)