[Help] Autogates
#2

pawn Код:
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"
{
GetPlayerPos(i, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously
if (X <= 2047 && X >= 2031 && Y <= 2779 && Y >= 2769)
/* 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
doesn't matter*/

{
MoveObject(maingate, 222.00, 1875.53, 13.80, 1); // MoveObject(ObjectID, X, Y, Z, speed); - Object id is the "New"
}
else // else means that if nothing is in it, perform this action:
{
MoveObject(maingate, 214.45, 1875.53, 13.80, 1); // This will close the gate
}
}
Reply


Messages In This Thread
[Help] Autogates - by [mad]MLK - 16.07.2009, 21:06
Re: [Help] Autogates - by refshal - 16.07.2009, 21:07
Re: [Help] Autogates - by [mad]MLK - 16.07.2009, 21:14
Re: [Help] Autogates - by refshal - 16.07.2009, 21:15
Re: [Help] Autogates - by saiberfun - 16.07.2009, 21:17
Re: [Help] Autogates - by [mad]MLK - 16.07.2009, 21:24
Re: [Help] Autogates - by refshal - 16.07.2009, 21:27
Re: [Help] Autogates - by [mad]MLK - 16.07.2009, 21:35
Re: [Help] Autogates - by [mad]MLK - 17.07.2009, 04:23
Re: [Help] Autogates - by Jakku - 27.09.2009, 06:50

Forum Jump:


Users browsing this thread: 1 Guest(s)