how 2 different checkareas?
#1

How can I add more to this code:

PHP код:
public isPlayerInArea()
   {
       new 
Float:XFloat:YFloat:Z//We use this to store player position
       
for(new i=0MAX_PLAYERSi++) //This line defines a name for all player, the name is "i"
       
{
           
GetPlayerPos(iXYZ); //Here we are storing the player position on the variables X, Y, and Z defined previously
           
if (<= 2918 && >= 925 && >= 598 && <= 2606)
           
/* This line is the important one!. Here, is where you change those numbers, by the ones
           you get from the /pos command. As you can see, those coordinates, are only the X and Y ones, the Z
           doesnt matter*/
           
{
               
ResetPlayerWeapons(i);
           }
       }
   } 
because I want to create anoter square area where weapons will be reset if a player enters, for this area the
x = 17 - -218 and y = -174 - -386

so it should be this: if (X <= 17 && X >= -218 && Y >= -174 && Y <= -36

but where do I add the code into this script? Help please.
Reply
#2

Use incognitos streamer for your areas, its very versatile.

https://sampforum.blast.hk/showthread.php?tid=102865
Reply
#3

But im using MidoStreamer.
Reply
#4

Quote:
Originally Posted by Gemini
Посмотреть сообщение
But im using MidoStreamer.
Incognitos does it all, all tricks in 1 box, easy to impliment too.
Its just a suggestion.
Reply
#5

anymore solutions besides that streamer you're suggesting?
Reply
#6

ANYBODY? bump
Reply
#7

well this forum is very helpful, bump
Reply
#8

rofl we all aint got all time.
We also have a life ya? And don't bump that fast. Sometimes, people don't answer my topics (because they're probably too complicated for them XD)
However, I also made something that could be nice for ya.
https://sampforum.blast.hk/showthread.php?tid=229423
Check the topic and their functions and callback. You can check when someone enters an area (OnPlayerEnterArea), or you can just use "IsPlayerInArea" (or if that's already defined, automatic "IsPlayerInAreaEx").
You must use 'CreateArea' first!!!. Just check this script: http://kwarde.pastebin.com/zQzmaZti for its usage.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)