11.03.2011, 08:06
(
Последний раз редактировалось Gemini; 11.03.2011 в 09:57.
)
How can I add more to this code:
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.
PHP код:
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 <= 2918 && X >= 925 && Y >= 598 && Y <= 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);
}
}
}
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.